diff --git a/manifests/config.pp b/manifests/config.pp index 089e12f8..b1384754 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -24,15 +24,22 @@ # (optional) Allow configuration for specifying the allowable # clusters and their information. # +# [*swift_proxy_config*] +# (optional) Allow configuration of arbitrary Swift Proxy configurations. +# The value is an hash of swift_proxy_config resources. +# class swift::config ( $swift_config = {}, - $swift_container_sync_realms_config = {} + $swift_container_sync_realms_config = {}, + $swift_proxy_config = {}, ) { include ::swift::deps validate_hash($swift_config) validate_hash($swift_container_sync_realms_config) + validate_hash($swift_proxy_config) create_resources('swift_config', $swift_config) create_resources('swift_container_sync_realms_config', $swift_container_sync_realms_config) + create_resources('swift_proxy_config', $swift_proxy_config) } diff --git a/spec/classes/swift_config_spec.rb b/spec/classes/swift_config_spec.rb index b266f1c0..27031249 100644 --- a/spec/classes/swift_config_spec.rb +++ b/spec/classes/swift_config_spec.rb @@ -7,6 +7,11 @@ describe 'swift::config' do 'DEFAULT/foo' => { 'value' => 'fooValue' }, 'DEFAULT/bar' => { 'value' => 'barValue' }, 'DEFAULT/baz' => { 'ensure' => 'absent' } + }, + :swift_proxy_config => { + 'DEFAULT/foo' => { 'value' => 'fooValue' }, + 'DEFAULT/bar' => { 'value' => 'barValue' }, + 'DEFAULT/baz' => { 'ensure' => 'absent' } } } end @@ -16,5 +21,10 @@ describe 'swift::config' do is_expected.to contain_swift_config('DEFAULT/bar').with_value('barValue') is_expected.to contain_swift_config('DEFAULT/baz').with_ensure('absent') end + it 'configures arbitrary swift proxy configurations' do + is_expected.to contain_swift_proxy_config('DEFAULT/foo').with_value('fooValue') + is_expected.to contain_swift_proxy_config('DEFAULT/bar').with_value('barValue') + is_expected.to contain_swift_proxy_config('DEFAULT/baz').with_ensure('absent') + end end