Merge "Default service_name to 'Image Service'"

This commit is contained in:
Jenkins 2016-01-05 17:58:05 +00:00 committed by Gerrit Code Review
commit aa3be49105
3 changed files with 12 additions and 16 deletions
manifests/keystone
spec

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

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

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