Update Cinder encryption parameters

https://review.openstack.org/280492 switched Cinder to use castellan
instead of an internal key manager. This meant some configuration
options changed names and/or locations.

Depends-On: I7cf25ffc2a25964c6d688fbfa58efbe09f9f75f2
Change-Id: I7b3603f1e5efbf3a69b8db2fa5b23f24706050e1
This commit is contained in:
Javier Pena 2016-08-30 18:49:11 +02:00 committed by Emilien Macchi
parent 4ff096f0c9
commit f657f9b787
2 changed files with 12 additions and 12 deletions

View File

@ -28,7 +28,7 @@
#
# [*keymgr_api_class*]
# (optional) Key Manager service class.
# Example of valid value: cinder.keymgr.barbican.BarbicanKeyManager
# Example of valid value: castellan.key_manager.barbican_key_manager.BarbicanKeyManager
# Defaults to $::os_service_default
#
# [*keymgr_encryption_api_url*]
@ -376,9 +376,9 @@ class cinder::api (
}
cinder_config {
'keymgr/api_class': value => $keymgr_api_class;
'keymgr/encryption_api_url': value => $keymgr_encryption_api_url;
'keymgr/encryption_auth_url': value => $keymgr_encryption_auth_url;
'key_manager/api_class': value => $keymgr_api_class;
'barbican/barbican_endpoint': value => $keymgr_encryption_api_url;
'barbican/auth_endpoint': value => $keymgr_encryption_auth_url;
}
if $auth_strategy_real {

View File

@ -67,9 +67,9 @@ describe 'cinder::api' do
is_expected.to contain_cinder_config('DEFAULT/os_privileged_user_password').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('DEFAULT/os_privileged_user_tenant').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('DEFAULT/os_privileged_user_auth_url').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('keymgr/api_class').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('keymgr/encryption_api_url').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('keymgr/encryption_auth_url').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('key_manager/api_class').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('barbican/barbican_endpoint').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('barbican/auth_endpoint').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('oslo_middleware/enable_proxy_headers_parsing').with('value' => '<SERVICE DEFAULT>')
end
end
@ -253,7 +253,7 @@ describe 'cinder::api' do
req_params.merge({ :keymgr_encryption_auth_url => 'http://localhost:5000/v3' })
end
it { is_expected.to contain_cinder_config('keymgr/encryption_auth_url').with(
it { is_expected.to contain_cinder_config('barbican/auth_endpoint').with(
:value => 'http://localhost:5000/v3'
)}
end
@ -380,15 +380,15 @@ describe 'cinder::api' do
describe 'with barbican parameters' do
let :params do
req_params.merge!({
:keymgr_api_class => 'cinder.keymgr.barbican.BarbicanKeyManager',
:keymgr_api_class => 'castellan.key_manager.barbican_key_manager.BarbicanKeyManager',
:keymgr_encryption_api_url => 'https://localhost:9311/v1',
:keymgr_encryption_auth_url => 'https://localhost:5000/v3',
})
end
it 'should set keymgr parameters' do
is_expected.to contain_cinder_config('keymgr/api_class').with_value('cinder.keymgr.barbican.BarbicanKeyManager')
is_expected.to contain_cinder_config('keymgr/encryption_api_url').with_value('https://localhost:9311/v1')
is_expected.to contain_cinder_config('keymgr/encryption_auth_url').with_value('https://localhost:5000/v3')
is_expected.to contain_cinder_config('key_manager/api_class').with_value('castellan.key_manager.barbican_key_manager.BarbicanKeyManager')
is_expected.to contain_cinder_config('barbican/barbican_endpoint').with_value('https://localhost:9311/v1')
is_expected.to contain_cinder_config('barbican/auth_endpoint').with_value('https://localhost:5000/v3')
end
end