Merge "Add charset option for db setting"

This commit is contained in:
Jenkins 2013-10-02 17:52:36 +00:00 committed by Gerrit Code Review
commit 74f8c55726
3 changed files with 11 additions and 0 deletions

View File

@ -133,6 +133,7 @@ class openstack::all (
$mysql_account_security = true,
$mysql_bind_address = '0.0.0.0',
$allowed_hosts = '%',
$charset = 'latin1',
# Keystone
$keystone_host = '127.0.0.1',
$keystone_db_user = 'keystone',
@ -294,6 +295,7 @@ class openstack::all (
neutron_db_password => $neutron_db_password,
neutron_db_dbname => $neutron_db_name,
allowed_hosts => $allowed_hosts,
charset => $charset,
enabled => $enabled,
}
} else {

View File

@ -31,6 +31,7 @@
# [ceilometer_db_user]. Name of ceilometer DB user. Optional. Defaults to 'ceilometer'.
# [ceilometer_db_dbname]. Name of ceilometer DB. Optional. Defaults to 'ceilometer'.
# [allowed_hosts] List of hosts that are allowed access. Optional. Defaults to false.
# [charset] Name of mysql charset. Optional. Defaults to 'latin1'.
# [enabled] If the db service should be started. Optional. Defaults to true.
#
# === Example
@ -85,6 +86,7 @@ class openstack::db::mysql (
$ceilometer_db_dbname = 'ceilometer',
# General
$allowed_hosts = false,
$charset = 'latin1',
$enabled = true
) {
@ -109,6 +111,7 @@ class openstack::db::mysql (
password => $keystone_db_password,
dbname => $keystone_db_dbname,
allowed_hosts => $allowed_hosts,
charset => $charset,
}
# Create the Glance db
@ -117,6 +120,7 @@ class openstack::db::mysql (
password => $glance_db_password,
dbname => $glance_db_dbname,
allowed_hosts => $allowed_hosts,
charset => $charset,
}
# Create the Nova db
@ -125,6 +129,7 @@ class openstack::db::mysql (
password => $nova_db_password,
dbname => $nova_db_dbname,
allowed_hosts => $allowed_hosts,
charset => $charset,
}
# create cinder db
@ -134,6 +139,7 @@ class openstack::db::mysql (
password => $cinder_db_password,
dbname => $cinder_db_dbname,
allowed_hosts => $allowed_hosts,
charset => $charset,
}
}
@ -144,6 +150,7 @@ class openstack::db::mysql (
password => $neutron_db_password,
dbname => $neutron_db_dbname,
allowed_hosts => $allowed_hosts,
charset => $charset,
}
}
@ -153,6 +160,7 @@ class openstack::db::mysql (
password => $ceilometer_db_password,
dbname => $ceilometer_db_dbname,
allowed_hosts => $allowed_hosts,
charset => $charset,
}
}
}

View File

@ -295,6 +295,7 @@ describe 'openstack::all' do
it 'should have openstack::db::mysql configured' do
should contain_class('openstack::db::mysql').with(
:charset => 'latin1',
:mysql_root_password => 'sql_pass',
:mysql_bind_address => '0.0.0.0',
:mysql_account_security => true,