Allow setting reseller_prefix for keystone filter
When using keystone, it's possible to modify the behaviour to use a different prefix instead of the default AUTH_. This patch allows you to be able to set that option when declaring your class definition. Change-Id: I11ff23d118e0f3d1792b43e1dc7a2c82c6826427
This commit is contained in:
@@ -19,7 +19,8 @@
|
|||||||
|
|
||||||
class swift::proxy::keystone(
|
class swift::proxy::keystone(
|
||||||
$operator_roles = ['admin', 'SwiftOperator'],
|
$operator_roles = ['admin', 'SwiftOperator'],
|
||||||
$is_admin = true
|
$is_admin = true,
|
||||||
|
$reseller_prefix = 'AUTH_'
|
||||||
) {
|
) {
|
||||||
|
|
||||||
concat::fragment { 'swift_keystone':
|
concat::fragment { 'swift_keystone':
|
||||||
|
@@ -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(/operator_roles = admin, SwiftOperator/) }
|
||||||
it { should contain_file(fragment_file).with_content(/is_admin = true/) }
|
it { should contain_file(fragment_file).with_content(/is_admin = true/) }
|
||||||
|
it { should contain_file(fragment_file).with_content(/reseller_prefix = AUTH_/) }
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -34,12 +35,14 @@ describe 'swift::proxy::keystone' do
|
|||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
{
|
{
|
||||||
:operator_roles => 'foo',
|
:operator_roles => 'foo',
|
||||||
:is_admin => 'false',
|
: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(/operator_roles = foo/) }
|
||||||
it { should contain_file(fragment_file).with_content(/is_admin = false/) }
|
it { should contain_file(fragment_file).with_content(/is_admin = false/) }
|
||||||
|
it { should contain_file(fragment_file).with_content(/reseller_prefix = SWIFT_/) }
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@@ -3,3 +3,4 @@
|
|||||||
use = egg:swift#keystoneauth
|
use = egg:swift#keystoneauth
|
||||||
operator_roles = <%= @operator_roles.to_a.join(', ') %>
|
operator_roles = <%= @operator_roles.to_a.join(', ') %>
|
||||||
is_admin = <%= @is_admin %>
|
is_admin = <%= @is_admin %>
|
||||||
|
reseller_prefix = <%= @reseller_prefix %>
|
||||||
|
Reference in New Issue
Block a user