Merge "Configure cinder's default volume type"
This commit is contained in:
@@ -49,6 +49,10 @@
|
|||||||
# specified.
|
# specified.
|
||||||
# Defaults to hiera('cinder::api::keymgr_backend', 'cinder.keymgr.conf_key_mgr.ConfKeyManager')
|
# Defaults to hiera('cinder::api::keymgr_backend', 'cinder.keymgr.conf_key_mgr.ConfKeyManager')
|
||||||
#
|
#
|
||||||
|
# [*default_volume_type*]
|
||||||
|
# (Optional) The name of the default volume type.
|
||||||
|
# Defaults to hiera('cinder::api::default_volume_type', '')
|
||||||
|
#
|
||||||
# [*step*]
|
# [*step*]
|
||||||
# (Optional) The current step in deployment. See tripleo-heat-templates
|
# (Optional) The current step in deployment. See tripleo-heat-templates
|
||||||
# for more details.
|
# for more details.
|
||||||
@@ -68,14 +72,17 @@ class tripleo::profile::base::cinder::api (
|
|||||||
$cinder_api_network = hiera('cinder_api_network', undef),
|
$cinder_api_network = hiera('cinder_api_network', undef),
|
||||||
$enable_internal_tls = hiera('enable_internal_tls', false),
|
$enable_internal_tls = hiera('enable_internal_tls', false),
|
||||||
$keymgr_backend = hiera('cinder::api::keymgr_backend', 'cinder.keymgr.conf_key_mgr.ConfKeyManager'),
|
$keymgr_backend = hiera('cinder::api::keymgr_backend', 'cinder.keymgr.conf_key_mgr.ConfKeyManager'),
|
||||||
|
$default_volume_type = hiera('cinder::api::default_volume_type', ''),
|
||||||
$step = Integer(hiera('step')),
|
$step = Integer(hiera('step')),
|
||||||
# DEPRECATED PARAMETERS
|
# DEPRECATED PARAMETERS
|
||||||
$keymgr_api_class = undef,
|
$keymgr_api_class = undef,
|
||||||
) {
|
) {
|
||||||
if $::hostname == downcase($bootstrap_node) {
|
if $::hostname == downcase($bootstrap_node) {
|
||||||
$sync_db = true
|
$sync_db = true
|
||||||
|
$manage_type = true
|
||||||
} else {
|
} else {
|
||||||
$sync_db = false
|
$sync_db = false
|
||||||
|
$manage_type = false
|
||||||
}
|
}
|
||||||
|
|
||||||
include ::tripleo::profile::base::cinder
|
include ::tripleo::profile::base::cinder
|
||||||
@@ -111,4 +118,8 @@ class tripleo::profile::base::cinder::api (
|
|||||||
include ::cinder::ceilometer
|
include ::cinder::ceilometer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if $step == 4 and $manage_type and $default_volume_type != '' {
|
||||||
|
cinder::type { $default_volume_type : }
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Add the ability to create Cinder's default volume type. This capability
|
||||||
|
will be used to fix `bug 1782217
|
||||||
|
<https://bugs.launchpad.net/tripleo/+bug/1782217>`__.
|
@@ -77,6 +77,7 @@ describe 'tripleo::profile::base::cinder::api' do
|
|||||||
:keymgr_backend => 'castellan.key_manager.barbican_key_manager.BarbicanKeyManager',
|
:keymgr_backend => 'castellan.key_manager.barbican_key_manager.BarbicanKeyManager',
|
||||||
)
|
)
|
||||||
is_expected.to contain_class('cinder::ceilometer')
|
is_expected.to contain_class('cinder::ceilometer')
|
||||||
|
is_expected.to contain_cinder__type('tripleo')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -86,12 +87,13 @@ describe 'tripleo::profile::base::cinder::api' do
|
|||||||
:bootstrap_node => 'other.example.com',
|
:bootstrap_node => 'other.example.com',
|
||||||
} }
|
} }
|
||||||
|
|
||||||
it 'should trigger complete configuration but with no db sync' do
|
it 'should trigger complete configuration but with no db sync or default volume type' do
|
||||||
is_expected.to contain_class('cinder::api').with(
|
is_expected.to contain_class('cinder::api').with(
|
||||||
:sync_db => false,
|
:sync_db => false,
|
||||||
:keymgr_backend => 'castellan.key_manager.barbican_key_manager.BarbicanKeyManager',
|
:keymgr_backend => 'castellan.key_manager.barbican_key_manager.BarbicanKeyManager',
|
||||||
)
|
)
|
||||||
is_expected.to contain_class('cinder::ceilometer')
|
is_expected.to contain_class('cinder::ceilometer')
|
||||||
|
is_expected.to_not contain_cinder__type('tripleo')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
1
spec/fixtures/hieradata/step4.yaml
vendored
1
spec/fixtures/hieradata/step4.yaml
vendored
@@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
step: 4
|
step: 4
|
||||||
|
cinder::api::default_volume_type: 'tripleo'
|
||||||
cinder::api::keymgr_backend: 'castellan.key_manager.barbican_key_manager.BarbicanKeyManager'
|
cinder::api::keymgr_backend: 'castellan.key_manager.barbican_key_manager.BarbicanKeyManager'
|
||||||
nova::compute::keymgr_backend: 'castellan.key_manager.barbican_key_manager.BarbicanKeyManager'
|
nova::compute::keymgr_backend: 'castellan.key_manager.barbican_key_manager.BarbicanKeyManager'
|
||||||
# items needed for tripleo::profile::base::cinder::volume
|
# items needed for tripleo::profile::base::cinder::volume
|
||||||
|
Reference in New Issue
Block a user