diff --git a/manifests/proxy/keystone.pp b/manifests/proxy/keystone.pp index 7ea33cdc..f27f5ea1 100644 --- a/manifests/proxy/keystone.pp +++ b/manifests/proxy/keystone.pp @@ -10,9 +10,15 @@ # Swift operator roles must be defined in swift::keystone::auth because # keystone API access is usually not available on Swift proxy nodes. # -# [*reseller_prefix*] -# (Optional) The prefix used for reseller URL. -# Defaults to 'AUTH_' +# [*reseller_prefix*] +# (Optional) The prefix used for reseller URL. +# Defaults to 'AUTH_' +# +# [*reseller_admin_role*] +# The reseller admin role has the ability to create and delete accounts. +# This role defines who has the ability to manage other swift accounts. +# (Optional) +# Defaults to Undef. # # DEPRECATED PARAMETERS # [*is_admin*] @@ -26,6 +32,7 @@ class swift::proxy::keystone( $operator_roles = ['admin', 'SwiftOperator'], $reseller_prefix = 'AUTH_', + $reseller_admin_role = undef, # DEPRECATED PARAMETERS $is_admin = undef ) { @@ -37,8 +44,9 @@ class swift::proxy::keystone( } swift_proxy_config { - 'filter:keystone/use': value => 'egg:swift#keystoneauth'; - 'filter:keystone/operator_roles': value => join(any2array($operator_roles), ', '); - 'filter:keystone/reseller_prefix': value => $reseller_prefix; + 'filter:keystone/use': value => 'egg:swift#keystoneauth'; + 'filter:keystone/operator_roles': value => join(any2array($operator_roles), ', '); + 'filter:keystone/reseller_prefix': value => $reseller_prefix; + 'filter:keystone/reseller_admin_role': value => $reseller_admin_role; } } diff --git a/spec/classes/swift_proxy_authtoken_spec.rb b/spec/classes/swift_proxy_authtoken_spec.rb index 64dcbe81..7edf584b 100644 --- a/spec/classes/swift_proxy_authtoken_spec.rb +++ b/spec/classes/swift_proxy_authtoken_spec.rb @@ -6,10 +6,6 @@ describe 'swift::proxy::authtoken' do {} end - let :pre_condition do - 'concat { "/etc/swift/proxy-server.conf": }' - end - describe 'when using the default signing directory' do let :file_defaults do { diff --git a/spec/classes/swift_proxy_catch_errors_spec.rb b/spec/classes/swift_proxy_catch_errors_spec.rb index faf4d967..3fa70e49 100644 --- a/spec/classes/swift_proxy_catch_errors_spec.rb +++ b/spec/classes/swift_proxy_catch_errors_spec.rb @@ -6,10 +6,6 @@ describe 'swift::proxy::catch_errors' do {} end - let :pre_condition do - 'concat { "/etc/swift/proxy-server.conf": }' - end - it { is_expected.to contain_swift_proxy_config('filter:catch_errors/use').with_value('egg:swift#catch_errors') } end diff --git a/spec/classes/swift_proxy_ceilometer_spec.rb b/spec/classes/swift_proxy_ceilometer_spec.rb index 76c182ab..d3fbebe1 100644 --- a/spec/classes/swift_proxy_ceilometer_spec.rb +++ b/spec/classes/swift_proxy_ceilometer_spec.rb @@ -7,8 +7,7 @@ describe 'swift::proxy::ceilometer' do end let :pre_condition do - 'concat { "/etc/swift/proxy-server.conf": } - class { "swift": + 'class { "swift": swift_hash_path_suffix => "dummy" }' end diff --git a/spec/classes/swift_proxy_keystone_spec.rb b/spec/classes/swift_proxy_keystone_spec.rb index cc596133..30b1ab38 100644 --- a/spec/classes/swift_proxy_keystone_spec.rb +++ b/spec/classes/swift_proxy_keystone_spec.rb @@ -6,10 +6,6 @@ describe 'swift::proxy::keystone' do {} end - let :pre_condition do - 'concat { "/etc/swift/proxy-server.conf": }' - end - it { is_expected.to contain_swift_proxy_config('filter:keystone/use').with_value('egg:swift#keystoneauth') } describe 'with defaults' do @@ -23,12 +19,14 @@ describe 'swift::proxy::keystone' do let :params do { - :operator_roles => 'foo', - :reseller_prefix => 'SWIFT_' + :operator_roles => 'foo', + :reseller_prefix => 'SWIFT_', + :reseller_admin_role => 'ResellerAdmin' } it { is_expected.to contain_swift_proxy_config('filter:keystone/operator_roles').with_value('foo') } it { is_expected.to contain_swift_proxy_config('filter:keystone/reseller_prefix').with_value('SWIFT_') } + it { is_expected.to contain_swift_proxy_config('filter:keystone/reseller_admin_role').with_value('ResellerAdmin') } end diff --git a/spec/classes/swift_proxy_spec.rb b/spec/classes/swift_proxy_spec.rb index 96c84c3b..603b89b0 100644 --- a/spec/classes/swift_proxy_spec.rb +++ b/spec/classes/swift_proxy_spec.rb @@ -284,7 +284,6 @@ describe 'swift::proxy' do OSDefaults.get_facts({ :operatingsystem => 'Ubuntu', :osfamily => 'Debian', - :concat_basedir => '/var/lib/puppet/concat', }) end @@ -314,7 +313,6 @@ describe 'swift::proxy' do OSDefaults.get_facts({ :osfamily => 'RedHat', :operatingsystem => 'RedHat', - :concat_basedir => '/var/lib/puppet/concat', }) end diff --git a/spec/classes/swift_proxy_swift3_spec.rb b/spec/classes/swift_proxy_swift3_spec.rb index 7cae9e11..2ea5cede 100644 --- a/spec/classes/swift_proxy_swift3_spec.rb +++ b/spec/classes/swift_proxy_swift3_spec.rb @@ -9,14 +9,6 @@ describe 'swift::proxy::swift3' do }) end - let :pre_condition do - 'concat { "/etc/swift/proxy-server.conf": }' - end - - let :fragment_file do - "/var/lib/puppet/concat/_etc_swift_proxy-server.conf/fragments/27_swift_swift3" - end - it { is_expected.to contain_swift_proxy_config('filter:swift3/use').with_value('egg:swift3#swift3') } end diff --git a/spec/classes/swift_proxy_tempauth_spec.rb b/spec/classes/swift_proxy_tempauth_spec.rb index c206dd63..c383fbe1 100644 --- a/spec/classes/swift_proxy_tempauth_spec.rb +++ b/spec/classes/swift_proxy_tempauth_spec.rb @@ -15,10 +15,6 @@ describe 'swift::proxy::tempauth' do let :params do default_params end - let :pre_condition do - 'concat { "/etc/swift/proxy-server.conf": }' - end - it { is_expected.to contain_swift_proxy_config('filter:tempauth/use').with_value('egg:swift#tempauth') } it { is_expected.to contain_swift_proxy_config('filter:tempauth/user_admin_admin').with_value('admin .admin .reseller_admin') } diff --git a/spec/classes/swift_proxy_tempurl_spec.rb b/spec/classes/swift_proxy_tempurl_spec.rb index 3b7ece5e..19d85734 100644 --- a/spec/classes/swift_proxy_tempurl_spec.rb +++ b/spec/classes/swift_proxy_tempurl_spec.rb @@ -6,10 +6,6 @@ describe 'swift::proxy::tempurl' do {} end - let :pre_condition do - 'concat { "/etc/swift/proxy-server.conf": }' - end - it { is_expected.to contain_swift_proxy_config('filter:tempurl/use').with_value('egg:swift#tempurl') } ['methods',