Add missing glance cinder store settings
In case of cinder backend of glance, for public images,
cinder should have dedicated tenant for glance.
So adding below conf params for cinder backend,
- cinder_store_project_name
- cinder_store_user_name
- cinder_store_password
Closes-Bug: #1809104
Change-Id: I474806d74c2815ca8899b74ee619e5107d81cc24
(cherry picked from commit 57f5853a4e
)
This commit is contained in:
parent
2312a822a1
commit
db0b4b8d20
|
@ -52,6 +52,18 @@
|
|||
# Should be a valid boolean value
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*cinder_store_project_name*]
|
||||
# (optional) Project name where the image volume is stored in cinder.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*cinder_store_user_name*]
|
||||
# (optional) User name to authenticate against cinder.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*cinder_store_password*]
|
||||
# (optional) A valid password for the user specified by `cinder_store_user_name'
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*multi_store*]
|
||||
# (optional) Boolean describing if multiple backends will be configured
|
||||
# Defaults to false
|
||||
|
@ -63,6 +75,9 @@ class glance::backend::cinder(
|
|||
$cinder_catalog_info = $::os_service_default,
|
||||
$cinder_endpoint_template = $::os_service_default,
|
||||
$cinder_http_retries = $::os_service_default,
|
||||
$cinder_store_project_name = $::os_service_default,
|
||||
$cinder_store_user_name = $::os_service_default,
|
||||
$cinder_store_password = $::os_service_default,
|
||||
$multi_store = false,
|
||||
) {
|
||||
|
||||
|
@ -78,6 +93,9 @@ class glance::backend::cinder(
|
|||
'glance_store/cinder_http_retries': value => $cinder_http_retries;
|
||||
'glance_store/cinder_endpoint_template': value => $cinder_endpoint_template;
|
||||
'glance_store/cinder_ca_certificates_file': value => $cinder_ca_certificates_file;
|
||||
'glance_store/cinder_store_project_name': value => $cinder_store_project_name;
|
||||
'glance_store/cinder_store_user_name': value => $cinder_store_user_name;
|
||||
'glance_store/cinder_store_password': value => $cinder_store_password;
|
||||
}
|
||||
|
||||
if !$multi_store {
|
||||
|
@ -90,6 +108,9 @@ class glance::backend::cinder(
|
|||
'glance_store/cinder_http_retries': value => $cinder_http_retries;
|
||||
'glance_store/cinder_endpoint_template': value => $cinder_endpoint_template;
|
||||
'glance_store/cinder_ca_certificates_file': value => $cinder_ca_certificates_file;
|
||||
'glance_store/cinder_store_project_name': value => $cinder_store_project_name;
|
||||
'glance_store/cinder_store_user_name': value => $cinder_store_user_name;
|
||||
'glance_store/cinder_store_password': value => $cinder_store_password;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
features:
|
||||
- |
|
||||
Add new parameter 'cinder_store_project_name', for project
|
||||
name where the image volume is stored in cinder.
|
||||
|
||||
Add new parameter 'cinder_store_user_name', for user name
|
||||
to authenticate against cinder.
|
||||
|
||||
Add new parameter 'cinder_store_password', for valid password
|
||||
for the user specified by 'cinder_store_user_name'
|
|
@ -38,6 +38,9 @@ describe 'glance::backend::cinder' do
|
|||
is_expected.to contain_glance_api_config('glance_store/cinder_http_retries').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_glance_api_config('glance_store/cinder_ca_certificates_file').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_glance_api_config('glance_store/cinder_endpoint_template').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_glance_api_config('glance_store/cinder_store_project_name').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_glance_api_config('glance_store/cinder_store_user_name').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_glance_api_config('glance_store/cinder_store_password').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
it 'configures glance-cache.conf' do
|
||||
is_expected.to contain_glance_cache_config('glance_store/cinder_api_insecure').with_value('<SERVICE DEFAULT>')
|
||||
|
@ -45,6 +48,9 @@ describe 'glance::backend::cinder' do
|
|||
is_expected.to contain_glance_cache_config('glance_store/cinder_http_retries').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_glance_cache_config('glance_store/cinder_ca_certificates_file').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_glance_cache_config('glance_store/cinder_endpoint_template').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_glance_cache_config('glance_store/cinder_store_project_name').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_glance_cache_config('glance_store/cinder_store_user_name').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_glance_cache_config('glance_store/cinder_store_password').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -56,6 +62,9 @@ describe 'glance::backend::cinder' do
|
|||
:cinder_catalog_info => 'volume:cinder:internalURL',
|
||||
:cinder_endpoint_template => 'http://srv-foo:8776/v1/%(project_id)s',
|
||||
:cinder_http_retries => '10',
|
||||
:cinder_store_project_name => 'services',
|
||||
:cinder_store_user_name => 'glance',
|
||||
:cinder_store_password => 'glance',
|
||||
}
|
||||
end
|
||||
it 'configures glance-api.conf' do
|
||||
|
@ -64,6 +73,9 @@ describe 'glance::backend::cinder' do
|
|||
is_expected.to contain_glance_api_config('glance_store/cinder_catalog_info').with_value('volume:cinder:internalURL')
|
||||
is_expected.to contain_glance_api_config('glance_store/cinder_endpoint_template').with_value('http://srv-foo:8776/v1/%(project_id)s')
|
||||
is_expected.to contain_glance_api_config('glance_store/cinder_http_retries').with_value('10')
|
||||
is_expected.to contain_glance_api_config('glance_store/cinder_store_project_name').with_value('services')
|
||||
is_expected.to contain_glance_api_config('glance_store/cinder_store_user_name').with_value('glance')
|
||||
is_expected.to contain_glance_api_config('glance_store/cinder_store_password').with_value('glance')
|
||||
end
|
||||
it 'configures glance-cache.conf' do
|
||||
is_expected.to contain_glance_cache_config('glance_store/cinder_api_insecure').with_value(true)
|
||||
|
@ -71,6 +83,9 @@ describe 'glance::backend::cinder' do
|
|||
is_expected.to contain_glance_cache_config('glance_store/cinder_catalog_info').with_value('volume:cinder:internalURL')
|
||||
is_expected.to contain_glance_cache_config('glance_store/cinder_endpoint_template').with_value('http://srv-foo:8776/v1/%(project_id)s')
|
||||
is_expected.to contain_glance_cache_config('glance_store/cinder_http_retries').with_value('10')
|
||||
is_expected.to contain_glance_cache_config('glance_store/cinder_store_project_name').with_value('services')
|
||||
is_expected.to contain_glance_cache_config('glance_store/cinder_store_user_name').with_value('glance')
|
||||
is_expected.to contain_glance_cache_config('glance_store/cinder_store_password').with_value('glance')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue