Change default service_name to 'trove'
While we were already able to pick an independent auth_name and service_name; the service_name was defaulting to auth_name. Now it has a value of its own to be consistent with other modules. Change-Id: If3f29c1f4efe2eeb5ff9173628403dfcc7f48e57 Related-Bug: #1590040
This commit is contained in:
parent
d6bb8e7152
commit
e99cc9e7ce
@ -49,7 +49,7 @@
|
|||||||
#
|
#
|
||||||
# [*service_name*]
|
# [*service_name*]
|
||||||
# (optional) Name of the service.
|
# (optional) Name of the service.
|
||||||
# Defaults to the value of auth_name.
|
# Defaults to 'trove'.
|
||||||
#
|
#
|
||||||
# [*service_description*]
|
# [*service_description*]
|
||||||
# (optional) Description for keystone service.
|
# (optional) Description for keystone service.
|
||||||
@ -86,7 +86,7 @@ class trove::keystone::auth (
|
|||||||
$configure_user = true,
|
$configure_user = true,
|
||||||
$configure_user_role = true,
|
$configure_user_role = true,
|
||||||
$configure_endpoint = true,
|
$configure_endpoint = true,
|
||||||
$service_name = undef,
|
$service_name = 'trove',
|
||||||
$service_type = 'database',
|
$service_type = 'database',
|
||||||
$service_description = 'Trove Database Service',
|
$service_description = 'Trove Database Service',
|
||||||
$region = 'RegionOne',
|
$region = 'RegionOne',
|
||||||
@ -97,18 +97,16 @@ class trove::keystone::auth (
|
|||||||
|
|
||||||
include ::trove::deps
|
include ::trove::deps
|
||||||
|
|
||||||
$real_service_name = pick($service_name, $auth_name)
|
|
||||||
|
|
||||||
Keystone_user_role["${auth_name}@${tenant}"] ~> Service <| tag == 'trove-server' |>
|
Keystone_user_role["${auth_name}@${tenant}"] ~> Service <| tag == 'trove-server' |>
|
||||||
|
|
||||||
Keystone_endpoint<| title == "${region}/${real_service_name}::${service_type}" |>
|
Keystone_endpoint<| title == "${region}/${service_name}::${service_type}" |>
|
||||||
~> Service <| tag == 'trove-server' |>
|
~> Service <| tag == 'trove-server' |>
|
||||||
|
|
||||||
keystone::resource::service_identity { 'trove':
|
keystone::resource::service_identity { 'trove':
|
||||||
configure_user => $configure_user,
|
configure_user => $configure_user,
|
||||||
configure_user_role => $configure_user_role,
|
configure_user_role => $configure_user_role,
|
||||||
configure_endpoint => $configure_endpoint,
|
configure_endpoint => $configure_endpoint,
|
||||||
service_name => $real_service_name,
|
service_name => $service_name,
|
||||||
service_type => $service_type,
|
service_type => $service_type,
|
||||||
service_description => $service_description,
|
service_description => $service_description,
|
||||||
region => $region,
|
region => $region,
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- The keystone auth class has been updated to provide a default service_name
|
||||||
|
to allow a user to specify a custom auth_name that may not contain the
|
||||||
|
name of the service.
|
@ -90,8 +90,8 @@ describe 'trove::keystone::auth' do
|
|||||||
|
|
||||||
it { is_expected.to contain_keystone_user('trovey') }
|
it { is_expected.to contain_keystone_user('trovey') }
|
||||||
it { is_expected.to contain_keystone_user_role('trovey@services') }
|
it { is_expected.to contain_keystone_user_role('trovey@services') }
|
||||||
it { is_expected.to contain_keystone_service('trovey::database') }
|
it { is_expected.to contain_keystone_service('trove::database') }
|
||||||
it { is_expected.to contain_keystone_endpoint('RegionOne/trovey::database') }
|
it { is_expected.to contain_keystone_endpoint('RegionOne/trove::database') }
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'when overriding service name' do
|
describe 'when overriding service name' do
|
||||||
|
Loading…
Reference in New Issue
Block a user