Manage 'default_volume_type' in cinder for plugins
This change adds an ability to override the 'default_volume_type' value in the plugins. Change-Id: I92dde505a4445eae41b812d4ecc9ca94d0a3b989 Closes-Bug: #1619498 Signed-off-by: Maksim Malchuk <mmalchuk@mirantis.com>
This commit is contained in:
parent
b044da4d64
commit
b1e1320dfd
|
@ -4,6 +4,7 @@ class openstack_tasks::openstack_cinder::openstack_cinder {
|
|||
|
||||
#Network stuff
|
||||
prepare_network_config(hiera_hash('network_scheme', {}))
|
||||
|
||||
$cinder_hash = hiera_hash('cinder', {})
|
||||
$management_vip = hiera('management_vip')
|
||||
$volume_group = hiera('cinder_volume_group', 'cinder')
|
||||
|
@ -22,7 +23,7 @@ class openstack_tasks::openstack_cinder::openstack_cinder {
|
|||
$primary_controller = hiera('primary_controller')
|
||||
$proxy_port = hiera('proxy_port', '8080')
|
||||
$kombu_compression = hiera('kombu_compression', '')
|
||||
|
||||
$default_volume_type = pick($cinder_hash['default_volume_type'], $::os_service_default)
|
||||
$db_type = 'mysql'
|
||||
$db_host = pick($cinder_hash['db_host'], hiera('database_vip'))
|
||||
$db_user = pick($cinder_hash['db_user'], 'cinder')
|
||||
|
@ -166,24 +167,25 @@ class openstack_tasks::openstack_cinder::openstack_cinder {
|
|||
|
||||
if ($bind_host) {
|
||||
class { 'cinder::api':
|
||||
auth_uri => $auth_uri,
|
||||
identity_uri => $identity_uri,
|
||||
keystone_user => $keystone_user,
|
||||
keystone_tenant => $keystone_tenant,
|
||||
keystone_password => $cinder_user_password,
|
||||
os_region_name => $region,
|
||||
bind_host => $bind_host,
|
||||
ratelimits => hiera('cinder_rate_limits'),
|
||||
service_workers => $service_workers,
|
||||
privileged_user => true,
|
||||
os_privileged_user_password => $cinder_user_password,
|
||||
os_privileged_user_tenant => $keystone_tenant,
|
||||
os_privileged_user_auth_url => $privileged_auth_uri,
|
||||
os_privileged_user_name => $keystone_user,
|
||||
keymgr_encryption_auth_url => $keymgr_encryption_auth_url,
|
||||
nova_catalog_admin_info => 'compute:nova:adminURL',
|
||||
nova_catalog_info => 'compute:nova:internalURL',
|
||||
sync_db => $primary_controller,
|
||||
auth_uri => $auth_uri,
|
||||
identity_uri => $identity_uri,
|
||||
keystone_user => $keystone_user,
|
||||
keystone_tenant => $keystone_tenant,
|
||||
keystone_password => $cinder_user_password,
|
||||
os_region_name => $region,
|
||||
bind_host => $bind_host,
|
||||
ratelimits => hiera('cinder_rate_limits'),
|
||||
service_workers => $service_workers,
|
||||
privileged_user => true,
|
||||
os_privileged_user_password => $cinder_user_password,
|
||||
os_privileged_user_tenant => $keystone_tenant,
|
||||
os_privileged_user_auth_url => $privileged_auth_uri,
|
||||
os_privileged_user_name => $keystone_user,
|
||||
keymgr_encryption_auth_url => $keymgr_encryption_auth_url,
|
||||
nova_catalog_admin_info => 'compute:nova:adminURL',
|
||||
nova_catalog_info => 'compute:nova:internalURL',
|
||||
sync_db => $primary_controller,
|
||||
default_volume_type => $default_volume_type,
|
||||
}
|
||||
|
||||
class { 'cinder::scheduler': }
|
||||
|
|
|
@ -89,6 +89,11 @@ describe manifest do
|
|||
)
|
||||
end
|
||||
|
||||
let(:default_volume_type) { Noop.puppet_function 'pick', cinder_hash['default_volume_type'], facts[:os_service_default] }
|
||||
it { should contain_class('cinder::api').with(
|
||||
'default_volume_type' => default_volume_type,
|
||||
)}
|
||||
|
||||
it 'should declare ::cinder class with correct database_max_* parameters' do
|
||||
should contain_class('cinder').with(
|
||||
'database_max_pool_size' => max_pool_size,
|
||||
|
|
Loading…
Reference in New Issue