Skip to content

Commit e4e0a73

Browse files
Parameterize the endpoint prefix
The endpoint prefix for keystone endpoints is now configurable (defaults to AUTH). This will allow for easier integration with SwiftStack which requires that the endpoint prefix not be AUTH. Change-Id: I102008aad86c0e35e3020961119a56c81da973f3
1 parent 0038383 commit e4e0a73

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

manifests/keystone/auth.pp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
$internal_protocol = 'http',
3434
$internal_address = undef,
3535
$configure_endpoint = true,
36-
$configure_s3_endpoint = true
36+
$configure_s3_endpoint = true,
37+
$endpoint_prefix = 'AUTH',
3738
) {
3839

3940
if ! $public_port {
@@ -73,9 +74,9 @@
7374
if $configure_endpoint {
7475
keystone_endpoint { "${region}/${auth_name}":
7576
ensure => present,
76-
public_url => "${public_protocol}://${public_address}:${real_public_port}/v1/AUTH_%(tenant_id)s",
77+
public_url => "${public_protocol}://${public_address}:${real_public_port}/v1/${endpoint_prefix}_%(tenant_id)s",
7778
admin_url => "${admin_protocol}://${real_admin_address}:${port}/",
78-
internal_url => "${internal_protocol}://${real_internal_address}:${port}/v1/AUTH_%(tenant_id)s",
79+
internal_url => "${internal_protocol}://${real_internal_address}:${port}/v1/${endpoint_prefix}_%(tenant_id)s",
7980
}
8081
}
8182

spec/classes/swift_keystone_auth_spec.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
:admin_address => '127.0.0.1',
2222
:internal_protocol => 'http',
2323
:internal_address => '127.0.0.1',
24+
:endpoint_prefix => 'AUTH',
2425
}
2526
end
2627

@@ -50,6 +51,7 @@
5051
:admin_address => 'admin.example.org',
5152
:internal_protocol => 'https',
5253
:internal_address => 'internal.example.org',
54+
:endpoint_prefix => 'KEY_AUTH',
5355
})
5456
end
5557

@@ -103,9 +105,9 @@
103105

104106
it { should contain_keystone_endpoint("#{p[:region]}/#{p[:auth_name]}").with(
105107
:ensure => 'present',
106-
:public_url => "#{p[:public_protocol]}://#{p[:public_address]}:#{p[:port]}/v1/AUTH_%(tenant_id)s",
108+
:public_url => "#{p[:public_protocol]}://#{p[:public_address]}:#{p[:port]}/v1/#{p[:endpoint_prefix]}_%(tenant_id)s",
107109
:admin_url => "#{p[:admin_protocol]}://#{p[:admin_address]}:#{p[:port]}/",
108-
:internal_url => "#{p[:internal_protocol]}://#{p[:internal_address]}:#{p[:port]}/v1/AUTH_%(tenant_id)s"
110+
:internal_url => "#{p[:internal_protocol]}://#{p[:internal_address]}:#{p[:port]}/v1/#{p[:endpoint_prefix]}_%(tenant_id)s"
109111
)}
110112

111113
it { should contain_keystone_service("#{p[:auth_name]}_s3").with(

0 commit comments

Comments
 (0)