Default service_name to 'Image Service'

In Liberty, we sent a warning if service_name was not set (and auth_name
was configured as the service name), with the goal to define the correct
default value during Mitaka.

This patch set the service_name parameter to 'Image Service' by default
to match with Keystone's default catalog.

Note: if you already run OpenStack, when you'll run Puppet after this
change, the old service will still be present and you'll have to drop it
manually. Though the Glance endpoint will be updated with the new
service.

Change-Id: I740a9ad32361e6a78277ea0667fba7f631eb64af
Closes-bug: #1506061
This commit is contained in:
Emilien Macchi 2015-12-24 14:22:25 +01:00
parent 8e506f0167
commit 80faf9a017
3 changed files with 12 additions and 16 deletions

View File

@ -25,7 +25,7 @@
#
# [*service_name*]
# Name of the service. Optional.
# Defaults to value of auth_name.
# Defaults to 'Image Service'.
#
# [*service_type*]
# Type of service. Optional. Defaults to 'image'.
@ -106,7 +106,7 @@ class glance::keystone::auth(
$configure_endpoint = true,
$configure_user = true,
$configure_user_role = true,
$service_name = undef,
$service_name = 'Image Service',
$service_type = 'image',
$region = 'RegionOne',
$tenant = 'services',
@ -180,10 +180,6 @@ class glance::keystone::auth(
}
$real_service_name = pick($service_name, $auth_name)
# TODO(mmagr): change default service names according to default_catalog in next (M) cycle
if !$service_name {
warning('Note that service_name parameter default value will be changed to "Image Service" (according to Keystone default catalog) in a future release. In case you use different value, please update your manifests accordingly.')
}
if $configure_endpoint {
Keystone_endpoint["${region}/${real_service_name}::${service_type}"] ~> Service<| title == 'glance-api' |>

View File

@ -42,7 +42,7 @@ describe 'glance class' do
EOS
it 'should configure the glance endpoint before the glance-api service uses it' do
pp2 = pp + "Service['glance-api'] -> Keystone_endpoint['RegionOne/glance::image']"
pp2 = pp + "Service['glance-api'] -> Keystone_endpoint['RegionOne/Image Service::image']"
expect(apply_manifest(pp2, :expect_failures => true, :noop => true).stderr).to match(/Found 1 dependency cycle/i)
end

View File

@ -18,12 +18,12 @@ describe 'glance::keystone::auth' do
:roles => ['admin']
) }
it { is_expected.to contain_keystone_service('glance::image').with(
it { is_expected.to contain_keystone_service('Image Service::image').with(
:ensure => 'present',
:description => 'OpenStack Image Service'
) }
it { is_expected.to contain_keystone_endpoint('RegionOne/glance::image').with(
it { is_expected.to contain_keystone_endpoint('RegionOne/Image Service::image').with(
:ensure => 'present',
:public_url => 'http://127.0.0.1:9292',
:admin_url => 'http://127.0.0.1:9292',
@ -52,7 +52,7 @@ describe 'glance::keystone::auth' do
:roles => ['admin']
) }
it { is_expected.to contain_keystone_service('glancey::imagey').with(
it { is_expected.to contain_keystone_service('Image Service::imagey').with(
:ensure => 'present',
:description => 'OpenStack Image Service'
) }
@ -68,7 +68,7 @@ describe 'glance::keystone::auth' do
:admin_url => 'https://10.10.10.12:81/v2' }
end
it { is_expected.to contain_keystone_endpoint('RegionTwo/glance::image').with(
it { is_expected.to contain_keystone_endpoint('RegionTwo/Image Service::image').with(
:ensure => 'present',
:public_url => 'https://10.10.10.10:81/v2',
:internal_url => 'https://10.10.10.11:81/v2',
@ -92,7 +92,7 @@ describe 'glance::keystone::auth' do
}
end
it { is_expected.to contain_keystone_endpoint('RegionTwo/glance::image').with(
it { is_expected.to contain_keystone_endpoint('RegionTwo/Image Service::image').with(
:ensure => 'present',
:public_url => 'https://10.0.0.1:9393',
:admin_url => 'https://10.0.0.2:9393',
@ -110,7 +110,7 @@ describe 'glance::keystone::auth' do
}
end
it { is_expected.to_not contain_keystone_endpoint('RegionOne/glance::image') }
it { is_expected.to_not contain_keystone_endpoint('RegionOne/Image Service::image') }
end
describe 'when disabling user configuration' do
@ -125,7 +125,7 @@ describe 'glance::keystone::auth' do
it { is_expected.to contain_keystone_user_role('glance@services') }
it { is_expected.to contain_keystone_service('glance::image').with(
it { is_expected.to contain_keystone_service('Image Service::image').with(
:ensure => 'present',
:description => 'OpenStack Image Service'
) }
@ -144,7 +144,7 @@ describe 'glance::keystone::auth' do
it { is_expected.to_not contain_keystone_user_role('glance@services') }
it { is_expected.to contain_keystone_service('glance::image').with(
it { is_expected.to contain_keystone_service('Image Service::image').with(
:ensure => 'present',
:description => 'OpenStack Image Service'
) }
@ -168,7 +168,7 @@ describe 'glance::keystone::auth' do
}
end
it { is_expected.to contain_keystone_endpoint('RegionOne/glance::image').with_notify(["Service[glance-api]"]) }
it { is_expected.to contain_keystone_endpoint('RegionOne/Image Service::image').with_notify(["Service[glance-api]"]) }
end
describe 'when overriding service name' do