Add domain/region parameters for gnocchi::storage::swift
... so that operators can configure their keystone domain and region used for access to swift. Change-Id: Ide2bcd1326270b5ba0a8ce25f3388e8bf48a66a0
This commit is contained in:
parent
a130da928a
commit
237961239b
|
@ -38,7 +38,20 @@
|
|||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*swift_project_name*]
|
||||
# (optional) Swift tenant name, only used if swift_auth_version is '2'.
|
||||
# (optional) Swift tenant name, only used if swift_auth_version is '2' or
|
||||
# '3'.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*swift_user_domain_name*]
|
||||
# (optional) Swift user domain name.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*swift_project_domain_name*]
|
||||
# (optional) Swift project domain name.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*swift_region*]
|
||||
# (optional) Swift region.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*swift_endpoint_type*]
|
||||
|
@ -49,18 +62,22 @@
|
|||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*swift_tenant_name*]
|
||||
# (optional) Swift tenant name, only used if swift_auth_version is '2'.
|
||||
# (optional) Swift tenant name, only used if swift_auth_version is '2' or
|
||||
# '3'.
|
||||
# Defaults to undef
|
||||
#
|
||||
class gnocchi::storage::swift(
|
||||
$swift_auth_version = $::os_service_default,
|
||||
$swift_authurl = $::os_service_default,
|
||||
$swift_user = $::os_service_default,
|
||||
$swift_key = $::os_service_default,
|
||||
$swift_project_name = $::os_service_default,
|
||||
$swift_endpoint_type = $::os_service_default,
|
||||
$swift_auth_version = $::os_service_default,
|
||||
$swift_authurl = $::os_service_default,
|
||||
$swift_user = $::os_service_default,
|
||||
$swift_key = $::os_service_default,
|
||||
$swift_project_name = $::os_service_default,
|
||||
$swift_user_domain_name = $::os_service_default,
|
||||
$swift_project_domain_name = $::os_service_default,
|
||||
$swift_region = $::os_service_default,
|
||||
$swift_endpoint_type = $::os_service_default,
|
||||
# DEPRECATED PARAMETERS
|
||||
$swift_tenant_name = undef,
|
||||
$swift_tenant_name = undef,
|
||||
) {
|
||||
|
||||
include gnocchi::deps
|
||||
|
@ -74,13 +91,16 @@ will be removed in a future release. Use swift_project_name instead')
|
|||
}
|
||||
|
||||
gnocchi_config {
|
||||
'storage/driver': value => 'swift';
|
||||
'storage/swift_user': value => $swift_user;
|
||||
'storage/swift_key': value => $swift_key;
|
||||
'storage/swift_project_name': value => $swift_project_name_real;
|
||||
'storage/swift_auth_version': value => $swift_auth_version;
|
||||
'storage/swift_authurl': value => $swift_authurl;
|
||||
'storage/swift_endpoint_type': value => $swift_endpoint_type;
|
||||
'storage/driver': value => 'swift';
|
||||
'storage/swift_user': value => $swift_user;
|
||||
'storage/swift_key': value => $swift_key;
|
||||
'storage/swift_project_name': value => $swift_project_name_real;
|
||||
'storage/swift_user_domain_name': value => $swift_user_domain_name;
|
||||
'storage/swift_project_domain_name': value => $swift_project_domain_name;
|
||||
'storage/swift_region': value => $swift_region;
|
||||
'storage/swift_auth_version': value => $swift_auth_version;
|
||||
'storage/swift_authurl': value => $swift_authurl;
|
||||
'storage/swift_endpoint_type': value => $swift_endpoint_type;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
features:
|
||||
- |
|
||||
The following parameters were added to the ``gnocchi::storage::swift``
|
||||
class to configure keystone region and domain used for access to Swift.
|
||||
|
||||
- ``swift_region``
|
||||
- ``swift_user_domain_name``
|
||||
- ``swift_project_domain_name``
|
|
@ -18,6 +18,9 @@ describe 'gnocchi::storage::swift' do
|
|||
is_expected.to contain_gnocchi_config('storage/swift_key').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_gnocchi_config('storage/swift_authurl').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_gnocchi_config('storage/swift_project_name').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_gnocchi_config('storage/swift_user_domain_name').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_gnocchi_config('storage/swift_project_domain_name').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_gnocchi_config('storage/swift_region').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_gnocchi_config('storage/swift_auth_version').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_gnocchi_config('storage/swift_endpoint_type').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue