diff --git a/manifests/storage/swift.pp b/manifests/storage/swift.pp index 65f2b3d8..2f844efa 100644 --- a/manifests/storage/swift.pp +++ b/manifests/storage/swift.pp @@ -67,6 +67,10 @@ # (optional) Connection timeout in seconds. # Defaults to $facts['os_service_default'] # +# [*swift_container_prefix*] +# (optional) Prefix to namespace metric containers. +# Defaults to $facts['os_service_default'] +# class gnocchi::storage::swift( $swift_auth_version = $facts['os_service_default'], $swift_authurl = $facts['os_service_default'], @@ -79,6 +83,7 @@ class gnocchi::storage::swift( $swift_endpoint_type = $facts['os_service_default'], $swift_service_type = $facts['os_service_default'], $swift_timeout = $facts['os_service_default'], + $swift_container_prefix = $facts['os_service_default'], ) { include gnocchi::deps @@ -96,6 +101,7 @@ class gnocchi::storage::swift( 'storage/swift_endpoint_type': value => $swift_endpoint_type; 'storage/swift_service_type': value => $swift_service_type; 'storage/swift_timeout': value => $swift_timeout; + 'storage/swift_container_prefix': value => $swift_container_prefix; } } diff --git a/releasenotes/notes/swift_container_prefix-ea1aaa526fbd2a54.yaml b/releasenotes/notes/swift_container_prefix-ea1aaa526fbd2a54.yaml new file mode 100644 index 00000000..fac5856c --- /dev/null +++ b/releasenotes/notes/swift_container_prefix-ea1aaa526fbd2a54.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The new ``gnocchi::storage::swift::swift_container_prefix`` prameter has + been added. diff --git a/spec/classes/gnocchi_storage_swift_spec.rb b/spec/classes/gnocchi_storage_swift_spec.rb index f700da5c..2a55ec54 100644 --- a/spec/classes/gnocchi_storage_swift_spec.rb +++ b/spec/classes/gnocchi_storage_swift_spec.rb @@ -25,6 +25,7 @@ describe 'gnocchi::storage::swift' do is_expected.to contain_gnocchi_config('storage/swift_endpoint_type').with_value('') is_expected.to contain_gnocchi_config('storage/swift_service_type').with_value('') is_expected.to contain_gnocchi_config('storage/swift_timeout').with_value('') + is_expected.to contain_gnocchi_config('storage/swift_container_prefix').with_value('') end end @@ -41,7 +42,8 @@ describe 'gnocchi::storage::swift' do :swift_auth_version => 2, :swift_endpoint_type => 'publicURL', :swift_service_type => 'object-store', - :swift_timeout => 0 + :swift_timeout => 0, + :swift_container_prefix => 'gnocchi', }) end @@ -58,6 +60,7 @@ describe 'gnocchi::storage::swift' do is_expected.to contain_gnocchi_config('storage/swift_endpoint_type').with_value('publicURL') is_expected.to contain_gnocchi_config('storage/swift_service_type').with_value('object-store') is_expected.to contain_gnocchi_config('storage/swift_timeout').with_value(0) + is_expected.to contain_gnocchi_config('storage/swift_container_prefix').with_value('gnocchi') end end end