Add backup_swift_create_storage_policy to cinder::backup::swift
Adds the backup_swift_create_storage_policy config option that was introduced in [1]. [1] https://review.opendev.org/c/openstack/cinder/+/761113 Change-Id: I26398350ab24b60603563b025319165dcd02c669
This commit is contained in:
parent
d9ccac4f21
commit
5e86972b77
@ -25,6 +25,10 @@
|
||||
# (optional) The default Swift container to use.
|
||||
# Defaults to 'volumebackups'
|
||||
#
|
||||
# [*backup_swift_create_storage_policy*]
|
||||
# (optional) The storage policy to use when creating the Swift container.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*backup_swift_object_size*]
|
||||
# (optional) The size in bytes of Swift backup objects.
|
||||
# Defaults to $::os_service_default
|
||||
@ -84,6 +88,7 @@ class cinder::backup::swift (
|
||||
$backup_swift_auth_url = $::os_service_default,
|
||||
$swift_catalog_info = $::os_service_default,
|
||||
$backup_swift_container = 'volumebackups',
|
||||
$backup_swift_create_storage_policy = $::os_service_default,
|
||||
$backup_swift_object_size = $::os_service_default,
|
||||
$backup_swift_retry_attempts = $::os_service_default,
|
||||
$backup_swift_retry_backoff = $::os_service_default,
|
||||
@ -101,6 +106,7 @@ class cinder::backup::swift (
|
||||
'DEFAULT/backup_swift_auth_url': value => $backup_swift_auth_url;
|
||||
'DEFAULT/swift_catalog_info': value => $swift_catalog_info;
|
||||
'DEFAULT/backup_swift_container': value => $backup_swift_container;
|
||||
'DEFAULT/backup_swift_create_storage_policy': value => $backup_swift_create_storage_policy;
|
||||
'DEFAULT/backup_swift_object_size': value => $backup_swift_object_size;
|
||||
'DEFAULT/backup_swift_retry_attempts': value => $backup_swift_retry_attempts;
|
||||
'DEFAULT/backup_swift_retry_backoff': value => $backup_swift_retry_backoff;
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Added parameter backup_swift_create_storage_policy to cinder::backup::swift
|
||||
class.
|
@ -27,6 +27,7 @@ describe 'cinder::backup::swift' do
|
||||
:backup_swift_auth_url => '<SERVICE DEFAULT>',
|
||||
:swift_catalog_info => '<SERVICE DEFAULT>',
|
||||
:backup_swift_container => 'volumebackups',
|
||||
:backup_swift_create_storage_policy => '<SERVICE DEFAULT>',
|
||||
:backup_swift_object_size => '<SERVICE DEFAULT>',
|
||||
:backup_swift_retry_attempts => '<SERVICE DEFAULT>',
|
||||
:backup_swift_retry_backoff => '<SERVICE DEFAULT>',
|
||||
@ -52,6 +53,7 @@ describe 'cinder::backup::swift' do
|
||||
is_expected.to contain_cinder_config('DEFAULT/backup_swift_auth_url').with_value(p[:backup_swift_auth_url])
|
||||
is_expected.to contain_cinder_config('DEFAULT/swift_catalog_info').with_value(p[:swift_catalog_info])
|
||||
is_expected.to contain_cinder_config('DEFAULT/backup_swift_container').with_value(p[:backup_swift_container])
|
||||
is_expected.to contain_cinder_config('DEFAULT/backup_swift_create_storage_policy').with_value(p[:backup_swift_create_storage_policy])
|
||||
is_expected.to contain_cinder_config('DEFAULT/backup_swift_object_size').with_value(p[:backup_swift_object_size])
|
||||
is_expected.to contain_cinder_config('DEFAULT/backup_swift_retry_attempts').with_value(p[:backup_swift_retry_attempts])
|
||||
is_expected.to contain_cinder_config('DEFAULT/backup_swift_retry_backoff').with_value(p[:backup_swift_retry_backoff])
|
||||
@ -67,6 +69,7 @@ describe 'cinder::backup::swift' do
|
||||
params.merge!(:backup_swift_auth_url => 'https://controller2:5000')
|
||||
params.merge!(:swift_catalog_info => 'object-store:swift:internalURL')
|
||||
params.merge!(:backup_swift_container => 'toto')
|
||||
params.merge!(:backup_swift_create_storage_policy => 'foo')
|
||||
params.merge!(:backup_swift_object_size => '123')
|
||||
params.merge!(:backup_swift_retry_attempts => '99')
|
||||
params.merge!(:backup_swift_retry_backoff => '56')
|
||||
@ -77,6 +80,7 @@ describe 'cinder::backup::swift' do
|
||||
is_expected.to contain_cinder_config('DEFAULT/backup_swift_auth_url').with_value(p[:backup_swift_auth_url])
|
||||
is_expected.to contain_cinder_config('DEFAULT/swift_catalog_info').with_value(p[:swift_catalog_info])
|
||||
is_expected.to contain_cinder_config('DEFAULT/backup_swift_container').with_value(p[:backup_swift_container])
|
||||
is_expected.to contain_cinder_config('DEFAULT/backup_swift_create_storage_policy').with_value(p[:backup_swift_create_storage_policy])
|
||||
is_expected.to contain_cinder_config('DEFAULT/backup_swift_object_size').with_value(p[:backup_swift_object_size])
|
||||
is_expected.to contain_cinder_config('DEFAULT/backup_swift_retry_attempts').with_value(p[:backup_swift_retry_attempts])
|
||||
is_expected.to contain_cinder_config('DEFAULT/backup_swift_retry_backoff').with_value(p[:backup_swift_retry_backoff])
|
||||
|
Loading…
x
Reference in New Issue
Block a user