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
This commit is contained in:
Dan Prince 2016-05-20 17:33:22 -04:00 committed by Emilien Macchi
parent 20a186b8d9
commit 44bf1232a5
2 changed files with 10 additions and 10 deletions

View File

@ -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',

View File

@ -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