Merge "Parameterize the endpoint prefix"
This commit is contained in:
@@ -33,7 +33,8 @@ class swift::keystone::auth(
|
|||||||
$internal_protocol = 'http',
|
$internal_protocol = 'http',
|
||||||
$internal_address = undef,
|
$internal_address = undef,
|
||||||
$configure_endpoint = true,
|
$configure_endpoint = true,
|
||||||
$configure_s3_endpoint = true
|
$configure_s3_endpoint = true,
|
||||||
|
$endpoint_prefix = 'AUTH',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
if ! $public_port {
|
if ! $public_port {
|
||||||
@@ -73,9 +74,9 @@ class swift::keystone::auth(
|
|||||||
if $configure_endpoint {
|
if $configure_endpoint {
|
||||||
keystone_endpoint { "${region}/${auth_name}":
|
keystone_endpoint { "${region}/${auth_name}":
|
||||||
ensure => present,
|
ensure => present,
|
||||||
public_url => "${public_protocol}://${public_address}:${real_public_port}/v1/AUTH_%(tenant_id)s",
|
public_url => "${public_protocol}://${public_address}:${real_public_port}/v1/${endpoint_prefix}_%(tenant_id)s",
|
||||||
admin_url => "${admin_protocol}://${real_admin_address}:${port}/",
|
admin_url => "${admin_protocol}://${real_admin_address}:${port}/",
|
||||||
internal_url => "${internal_protocol}://${real_internal_address}:${port}/v1/AUTH_%(tenant_id)s",
|
internal_url => "${internal_protocol}://${real_internal_address}:${port}/v1/${endpoint_prefix}_%(tenant_id)s",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -21,6 +21,7 @@ describe 'swift::keystone::auth' do
|
|||||||
:admin_address => '127.0.0.1',
|
:admin_address => '127.0.0.1',
|
||||||
:internal_protocol => 'http',
|
:internal_protocol => 'http',
|
||||||
:internal_address => '127.0.0.1',
|
:internal_address => '127.0.0.1',
|
||||||
|
:endpoint_prefix => 'AUTH',
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -50,6 +51,7 @@ describe 'swift::keystone::auth' do
|
|||||||
:admin_address => 'admin.example.org',
|
:admin_address => 'admin.example.org',
|
||||||
:internal_protocol => 'https',
|
:internal_protocol => 'https',
|
||||||
:internal_address => 'internal.example.org',
|
:internal_address => 'internal.example.org',
|
||||||
|
:endpoint_prefix => 'KEY_AUTH',
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -103,9 +105,9 @@ describe 'swift::keystone::auth' do
|
|||||||
|
|
||||||
it { should contain_keystone_endpoint("#{p[:region]}/#{p[:auth_name]}").with(
|
it { should contain_keystone_endpoint("#{p[:region]}/#{p[:auth_name]}").with(
|
||||||
:ensure => 'present',
|
:ensure => 'present',
|
||||||
:public_url => "#{p[:public_protocol]}://#{p[:public_address]}:#{p[:port]}/v1/AUTH_%(tenant_id)s",
|
:public_url => "#{p[:public_protocol]}://#{p[:public_address]}:#{p[:port]}/v1/#{p[:endpoint_prefix]}_%(tenant_id)s",
|
||||||
:admin_url => "#{p[:admin_protocol]}://#{p[:admin_address]}:#{p[:port]}/",
|
:admin_url => "#{p[:admin_protocol]}://#{p[:admin_address]}:#{p[:port]}/",
|
||||||
:internal_url => "#{p[:internal_protocol]}://#{p[:internal_address]}:#{p[:port]}/v1/AUTH_%(tenant_id)s"
|
:internal_url => "#{p[:internal_protocol]}://#{p[:internal_address]}:#{p[:port]}/v1/#{p[:endpoint_prefix]}_%(tenant_id)s"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
it { should contain_keystone_service("#{p[:auth_name]}_s3").with(
|
it { should contain_keystone_service("#{p[:auth_name]}_s3").with(
|
||||||
|
Reference in New Issue
Block a user