From 44bf1232a50f69ff62955fc7c1c8ab48e04bc7ff Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Fri, 20 May 2016 17:33:22 -0400 Subject: [PATCH] Switch $service_name to 'glance' for keystone This patch switches the service name from 'Image Service' to just 'glance' so that it matches what we do for other services. Typically we use the project (auth) name for the service_name. Not having a consistent catalog can cause failure to find endpoints for some services. Mistral for example would fail to lookup the glance endpoint due to it being set as 'Image Service' rather than 'glance'. Change-Id: I17116c0f995ab76ed79bd8b2df57629c1ed4e4d0 Closes-bug: #1584229 --- manifests/keystone/auth.pp | 4 ++-- spec/classes/glance_keystone_auth_spec.rb | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/manifests/keystone/auth.pp b/manifests/keystone/auth.pp index 6cf971e0..5ddac567 100644 --- a/manifests/keystone/auth.pp +++ b/manifests/keystone/auth.pp @@ -25,7 +25,7 @@ # # [*service_name*] # Name of the service. Optional. -# Defaults to 'Image Service'. +# Defaults to 'glance'. # # [*service_type*] # Type of service. Optional. Defaults to 'image'. @@ -67,7 +67,7 @@ class glance::keystone::auth( $configure_endpoint = true, $configure_user = true, $configure_user_role = true, - $service_name = 'Image Service', + $service_name = 'glance', $service_type = 'image', $region = 'RegionOne', $tenant = 'services', diff --git a/spec/classes/glance_keystone_auth_spec.rb b/spec/classes/glance_keystone_auth_spec.rb index fdd3ebfd..83710227 100644 --- a/spec/classes/glance_keystone_auth_spec.rb +++ b/spec/classes/glance_keystone_auth_spec.rb @@ -19,12 +19,12 @@ describe 'glance::keystone::auth' do :roles => ['admin'] ) } - it { is_expected.to contain_keystone_service('Image Service::image').with( + it { is_expected.to contain_keystone_service('glance::image').with( :ensure => 'present', :description => 'OpenStack Image Service' ) } - it { is_expected.to contain_keystone_endpoint('RegionOne/Image Service::image').with( + it { is_expected.to contain_keystone_endpoint('RegionOne/glance::image').with( :ensure => 'present', :public_url => 'http://127.0.0.1:9292', :admin_url => 'http://127.0.0.1:9292', @@ -53,7 +53,7 @@ describe 'glance::keystone::auth' do :roles => ['admin'] ) } - it { is_expected.to contain_keystone_service('Image Service::imagey').with( + it { is_expected.to contain_keystone_service('glance::imagey').with( :ensure => 'present', :description => 'OpenStack Image Service' ) } @@ -69,7 +69,7 @@ describe 'glance::keystone::auth' do :admin_url => 'https://10.10.10.12:81/v2' } end - it { is_expected.to contain_keystone_endpoint('RegionTwo/Image Service::image').with( + it { is_expected.to contain_keystone_endpoint('RegionTwo/glance::image').with( :ensure => 'present', :public_url => 'https://10.10.10.10:81/v2', :internal_url => 'https://10.10.10.11:81/v2', @@ -86,7 +86,7 @@ describe 'glance::keystone::auth' do } end - it { is_expected.to_not contain_keystone_endpoint('RegionOne/Image Service::image') } + it { is_expected.to_not contain_keystone_endpoint('RegionOne/glance::image') } end describe 'when disabling user configuration' do @@ -101,7 +101,7 @@ describe 'glance::keystone::auth' do it { is_expected.to contain_keystone_user_role('glance@services') } - it { is_expected.to contain_keystone_service('Image Service::image').with( + it { is_expected.to contain_keystone_service('glance::image').with( :ensure => 'present', :description => 'OpenStack Image Service' ) } @@ -120,7 +120,7 @@ describe 'glance::keystone::auth' do it { is_expected.to_not contain_keystone_user_role('glance@services') } - it { is_expected.to contain_keystone_service('Image Service::image').with( + it { is_expected.to contain_keystone_service('glance::image').with( :ensure => 'present', :description => 'OpenStack Image Service' ) } @@ -138,7 +138,7 @@ describe 'glance::keystone::auth' do } end - it { is_expected.to contain_keystone_endpoint('RegionOne/Image Service::image').with_notify(["Service[glance-api]"]) } + it { is_expected.to contain_keystone_endpoint('RegionOne/glance::image').with_notify(["Service[glance-api]"]) } end describe 'when overriding service name' do