From f2855769b3352fc5f7c9f509ea60f1b0bc379a4e Mon Sep 17 00:00:00 2001 From: Juan Antonio Osorio Robles Date: Wed, 8 Jun 2016 07:57:35 +0300 Subject: [PATCH] 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 --- manifests/keystone/auth.pp | 11 +++++------ manifests/keystone/glare_auth.pp | 9 ++++----- .../notes/keystone-auth-name-2f9bd1b22dccd5bf.yaml | 5 +++++ 3 files changed, 14 insertions(+), 11 deletions(-) create mode 100644 releasenotes/notes/keystone-auth-name-2f9bd1b22dccd5bf.yaml diff --git a/manifests/keystone/auth.pp b/manifests/keystone/auth.pp index 9c9f66d4..d699f290 100644 --- a/manifests/keystone/auth.pp +++ b/manifests/keystone/auth.pp @@ -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, diff --git a/manifests/keystone/glare_auth.pp b/manifests/keystone/glare_auth.pp index a5e2432b..f76b0d56 100644 --- a/manifests/keystone/glare_auth.pp +++ b/manifests/keystone/glare_auth.pp @@ -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, diff --git a/releasenotes/notes/keystone-auth-name-2f9bd1b22dccd5bf.yaml b/releasenotes/notes/keystone-auth-name-2f9bd1b22dccd5bf.yaml new file mode 100644 index 00000000..6e94b493 --- /dev/null +++ b/releasenotes/notes/keystone-auth-name-2f9bd1b22dccd5bf.yaml @@ -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.