diff --git a/manifests/db.pp b/manifests/db.pp index ee17b9f..14ce6d3 100644 --- a/manifests/db.pp +++ b/manifests/db.pp @@ -6,7 +6,7 @@ # # [*database_connection*] # (Optional) Url used to connect to database. -# Defaults to "mysql://vitrage:secrete@localhost:3306/vitrage". +# Defaults to "mysql+pymysql://vitrage:secrete@localhost:3306/vitrage". # # [*database_max_retries*] # (Optional) Maximum number of database connection retries during startup. @@ -39,7 +39,7 @@ # Defaults to $::os_service_default. # class vitrage::db ( - $database_connection = 'mysql://vitrage:secrete@localhost:3306/vitrage', + $database_connection = 'mysql+pymysql://vitrage:secrete@localhost:3306/vitrage', $database_idle_timeout = $::os_service_default, $database_min_pool_size = $::os_service_default, $database_max_pool_size = $::os_service_default, diff --git a/spec/classes/vitrage_db_spec.rb b/spec/classes/vitrage_db_spec.rb index af2120e..2e474e1 100644 --- a/spec/classes/vitrage_db_spec.rb +++ b/spec/classes/vitrage_db_spec.rb @@ -6,7 +6,7 @@ describe 'vitrage::db' do context 'with default parameters' do it { is_expected.to contain_oslo__db('vitrage_config').with( :db_max_retries => '', - :connection => 'mysql://vitrage:secrete@localhost:3306/vitrage', + :connection => 'mysql+pymysql://vitrage:secrete@localhost:3306/vitrage', :idle_timeout => '', :min_pool_size => '', :max_pool_size => '', @@ -54,7 +54,7 @@ describe 'vitrage::db' do context 'with MySQL-python library as backend package' do let :params do - { :database_connection => 'mysql://vitrage:vitrage@localhost/vitrage', } + { :database_connection => 'mysql+pymysql://vitrage:vitrage@localhost/vitrage', } end it { is_expected.to contain_package('python-mysqldb').with(:ensure => 'present') }