Provide default service_name for keystone endpoint
This change updates the octavia::keystone::auth class to include a default service_name of 'octavia' so that if a user changes the auth_name, the service is still created as being related to 'octavia'. This improves the user experiance when they want to customize the usernames for services. Change-Id: I2241cc2ea581c4ef6726aee8be2026eba4fd02f8 Closes-Bug: #1590040
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
#
|
||||
# [*service_name*]
|
||||
# (optional) Name of the service.
|
||||
# Defaults to the value of auth_name.
|
||||
# Defaults to 'octavia'
|
||||
#
|
||||
# [*public_url*]
|
||||
# (optional) The endpoint's public url. (Defaults to 'http://127.0.0.1:9876')
|
||||
@@ -56,7 +56,7 @@ class octavia::keystone::auth (
|
||||
$configure_endpoint = true,
|
||||
$configure_user = true,
|
||||
$configure_user_role = true,
|
||||
$service_name = undef,
|
||||
$service_name = 'octavia',
|
||||
$service_type = 'octavia',
|
||||
$region = 'RegionOne',
|
||||
$public_url = 'http://127.0.0.1:9876',
|
||||
@@ -64,13 +64,11 @@ class octavia::keystone::auth (
|
||||
$internal_url = 'http://127.0.0.1:9876',
|
||||
) {
|
||||
|
||||
$real_service_name = pick($service_name, $auth_name)
|
||||
|
||||
keystone::resource::service_identity { 'octavia':
|
||||
configure_user => $configure_user,
|
||||
configure_user_role => $configure_user_role,
|
||||
configure_endpoint => $configure_endpoint,
|
||||
service_name => $real_service_name,
|
||||
service_name => $service_name,
|
||||
service_type => $service_type,
|
||||
service_description => 'Octavia Service',
|
||||
region => $region,
|
||||
|
||||
@@ -63,8 +63,8 @@ describe 'octavia::keystone::auth' do
|
||||
|
||||
it { is_expected.to contain_keystone_user('octaviay') }
|
||||
it { is_expected.to contain_keystone_user_role('octaviay@services') }
|
||||
it { is_expected.to contain_keystone_service('octaviay::octavia') }
|
||||
it { is_expected.to contain_keystone_endpoint('RegionOne/octaviay::octavia') }
|
||||
it { is_expected.to contain_keystone_service('octavia::octavia') }
|
||||
it { is_expected.to contain_keystone_endpoint('RegionOne/octavia::octavia') }
|
||||
end
|
||||
|
||||
describe 'when overriding service name' do
|
||||
|
||||
Reference in New Issue
Block a user