Merge "Deprecate the swift_store_config_file parameter"

This commit is contained in:
Zuul 2021-06-11 08:48:02 +00:00 committed by Gerrit Code Review
commit b2dc3fbd63
2 changed files with 12 additions and 7 deletions

View File

@ -76,10 +76,6 @@
# (Optional) Swift store region.
# Defaults to hiera('glance::backend::swift::swift_store_region', undef).
#
# [*swift_store_config_file*]
# (Optional)
# Defaults to /etc/glance/glance-swift.conf.
#
# [*default_swift_reference*]
# (Optional) The reference to the default swift
# account/backing store parameters to use for adding
@ -96,6 +92,12 @@
# for more details.
# Defaults to hiera('step')
#
# DEPRECATED PARAMETERS
#
# [*swift_store_config_file*]
# (Optional)
# Defaults to undef.
#
class tripleo::profile::base::glance::backend::swift (
$backend_names,
$multistore_config = {},
@ -111,16 +113,21 @@ class tripleo::profile::base::glance::backend::swift (
$swift_store_create_container_on_put = hiera('glance::backend::swift::swift_store_create_container_on_put', undef),
$swift_store_endpoint_type = hiera('glance::backend::swift::swift_store_endpoint_type', undef),
$swift_store_region = hiera('glance::backend::swift::swift_store_region', undef),
$swift_store_config_file = '/etc/glance/glance-swift.conf',
$default_swift_reference = 'ref1',
$store_description = hiera('tripleo::profile::base::glance::api::glance_store_description', 'Swift store'),
$step = Integer(hiera('step')),
# DEPRECATED PARAMETERS
$swift_store_config_file = undef,
) {
if $backend_names.length() > 1 {
fail('Multiple swift backends are not supported.')
}
if $swift_store_config_file != undef {
warning('The swift_store_config_file parameter has been deprecated and has no effect')
}
if $step >= 4 {
$backend_name = $backend_names[0]
@ -140,7 +147,6 @@ class tripleo::profile::base::glance::backend::swift (
swift_store_create_container_on_put => $swift_store_create_container_on_put,
swift_store_endpoint_type => $swift_store_endpoint_type,
swift_store_region => $swift_store_region,
swift_store_config_file => $swift_store_config_file,
default_swift_reference => $default_swift_reference,
store_description => $store_description_real,
}

View File

@ -53,7 +53,6 @@ describe 'tripleo::profile::base::glance::backend::swift' do
:swift_store_auth_address => '127.0.0.2:8080/v3/',
:swift_store_auth_version => 3,
:swift_store_create_container_on_put => true,
:swift_store_config_file => '/etc/glance/glance-swift.conf',
:default_swift_reference => 'ref1',
:store_description => 'Swift store',
)