fix mysql connection

Change-Id: I520539b8397912e5b4b27b2c5384d6a727041942
This commit is contained in:
melissaml 2018-03-05 12:35:49 +08:00 committed by Tobias Urdin
parent 338dc7057c
commit 4dac8ec975
5 changed files with 6 additions and 6 deletions

View File

@ -59,7 +59,7 @@ class { '::neutron':
# configure authentication
class { 'neutron::server':
auth_password => 'keystone_neutron_secret',
sql_connection => 'mysql://neutron:neutron_sql_secret@127.0.0.1/neutron?charset=utf8',
sql_connection => 'mysql+pymysql://neutron:neutron_sql_secret@127.0.0.1/neutron?charset=utf8',
}
# ml2 plugin with vxlan as ml2 driver and ovs as mechanism driver

View File

@ -13,7 +13,7 @@ class { '::neutron':
# The API server talks to keystone for authorisation
class { '::neutron::server':
auth_password => 'password',
database_connection => 'mysql://neutron:password@192.168.1.1/neutron',
database_connection => 'mysql+pymysql://neutron:password@192.168.1.1/neutron',
}
# Configure nova notifications system

View File

@ -16,7 +16,7 @@ class { '::neutron':
class { '::neutron::server':
auth_password => 'password',
database_connection => 'mysql://neutron:password@192.168.1.1/neutron',
database_connection => 'mysql+pymysql://neutron:password@192.168.1.1/neutron',
}
# configure l3-agent to use the new router by name

View File

@ -31,7 +31,7 @@ class { '::neutron::server':
enabled => false,
manage_service => false,
keystone_password => 'password',
connection => 'mysql://neutron:password@192.168.1.1/neutron',
connection => 'mysql+pymysql://neutron:password@192.168.1.1/neutron',
}
class { '::neutron::agents::dhcp':

View File

@ -47,11 +47,11 @@ describe 'neutron::db' do
context 'with MySQL-python library as backend package' do
let :params do
{ :database_connection => 'mysql://neutron:neutron@localhost/neutron' }
{ :database_connection => 'mysql+pymysql://neutron:neutron@localhost/neutron' }
end
it { is_expected.to contain_oslo__db('neutron_config').with(
:connection => 'mysql://neutron:neutron@localhost/neutron',
:connection => 'mysql+pymysql://neutron:neutron@localhost/neutron',
)}
end