Merge "Allow setting reseller_prefix for keystone filter"

This commit is contained in:
Jenkins 2014-12-02 16:33:56 +00:00 committed by Gerrit Code Review
commit cd3ef0bba3
3 changed files with 8 additions and 3 deletions

View File

@ -19,7 +19,8 @@
class swift::proxy::keystone(
$operator_roles = ['admin', 'SwiftOperator'],
$is_admin = true
$is_admin = true,
$reseller_prefix = 'AUTH_'
) {
concat::fragment { 'swift_keystone':

View File

@ -27,6 +27,7 @@ describe 'swift::proxy::keystone' do
it { should contain_file(fragment_file).with_content(/operator_roles = admin, SwiftOperator/) }
it { should contain_file(fragment_file).with_content(/is_admin = true/) }
it { should contain_file(fragment_file).with_content(/reseller_prefix = AUTH_/) }
end
@ -34,12 +35,14 @@ describe 'swift::proxy::keystone' do
let :params do
{
:operator_roles => 'foo',
:is_admin => 'false',
:operator_roles => 'foo',
:is_admin => 'false',
:reseller_prefix => 'SWIFT_'
}
it { should contain_file(fragment_file).with_content(/operator_roles = foo/) }
it { should contain_file(fragment_file).with_content(/is_admin = false/) }
it { should contain_file(fragment_file).with_content(/reseller_prefix = SWIFT_/) }
end

View File

@ -3,3 +3,4 @@
use = egg:swift#keystoneauth
operator_roles = <%= @operator_roles.to_a.join(', ') %>
is_admin = <%= @is_admin %>
reseller_prefix = <%= @reseller_prefix %>