Provide consisent default name for service_identity resource

This change updates glance::keystone::auth to include the
user-provided auth_name as a parameter for the service_identity
provider. Hardcoding the namevar of that resource as was agreed. the
service_name parameter was not undef as in other resources, so the
name was left as-is. And we no longer pick a service_name out of the
service_name and auth_name; now only the service_name is taken into
account.

Closes-Bug: #1590040
Change-Id: I757930e05b6e14cb15139840c9e4a513c9af5d17
This commit is contained in:
Juan Antonio Osorio Robles 2016-06-08 07:57:35 +03:00
parent 0600f74179
commit f2855769b3
3 changed files with 14 additions and 11 deletions

View File

@ -76,20 +76,19 @@ class glance::keystone::auth(
$internal_url = 'http://127.0.0.1:9292',
) {
$real_service_name = pick($service_name, $auth_name)
if $configure_endpoint {
Keystone_endpoint["${region}/${real_service_name}::${service_type}"] ~> Service<| title == 'glance-api' |>
Keystone_endpoint["${region}/${real_service_name}::${service_type}"] -> Glance_image<||>
Keystone_endpoint["${region}/${service_name}::${service_type}"] ~> Service<| title == 'glance-api' |>
Keystone_endpoint["${region}/${service_name}::${service_type}"] -> Glance_image<||>
}
keystone::resource::service_identity { $auth_name:
keystone::resource::service_identity { 'glance':
configure_user => $configure_user,
configure_user_role => $configure_user_role,
configure_endpoint => $configure_endpoint,
service_type => $service_type,
service_description => $service_description,
service_name => $real_service_name,
service_name => $service_name,
auth_name => $auth_name,
region => $region,
password => $password,
email => $email,

View File

@ -76,19 +76,18 @@ class glance::keystone::glare_auth(
$internal_url = 'http://127.0.0.1:9494',
) {
$real_service_name = pick($service_name, $auth_name)
if $configure_endpoint {
Keystone_endpoint["${region}/${real_service_name}::${service_type}"] ~> Service<| title == 'glance-glare' |>
Keystone_endpoint["${region}/${service_name}::${service_type}"] ~> Service<| title == 'glance-glare' |>
}
keystone::resource::service_identity { $auth_name:
keystone::resource::service_identity { 'glare':
configure_user => $configure_user,
configure_user_role => $configure_user_role,
configure_endpoint => $configure_endpoint,
service_type => $service_type,
service_description => $service_description,
service_name => $real_service_name,
service_name => $service_name,
auth_name => $auth_name,
region => $region,
password => $password,
email => $email,

View File

@ -0,0 +1,5 @@
---
fixes:
- The keystone auth classes (for glance and glare) has been updated to be
able to specify a custom auth_name that may not contain the name of the
service.