Default service_name to 'Volume 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 'Volume 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 Cinder endpoint will be updated with the new service. Change-Id: I3bfed1b91f99f4da5ba19d2b1f847346fa19beec Closes-bug: #1506061
This commit is contained in:
parent
4d3e0665c6
commit
9125857f42
@ -45,12 +45,12 @@
|
||||
#
|
||||
# [*service_name*]
|
||||
# (optional) Name of the service.
|
||||
# Defaults to the value of auth_name, but must differ from the value
|
||||
# Defaults to 'Volume Service', but must differ from the value
|
||||
# of service_name_v2.
|
||||
#
|
||||
# [*service_name_v2*]
|
||||
# (optional) Name of the v2 service.
|
||||
# Defaults to the value of auth_name_v2, but must differ from the value
|
||||
# Defaults to ''Volume Service v2', but must differ from the value
|
||||
# of service_name.
|
||||
#
|
||||
# [*service_type*]
|
||||
@ -186,8 +186,8 @@ class cinder::keystone::auth (
|
||||
$configure_user_v2 = false,
|
||||
$configure_user_role = true,
|
||||
$configure_user_role_v2 = false,
|
||||
$service_name = undef,
|
||||
$service_name_v2 = undef,
|
||||
$service_name = 'Volume Service',
|
||||
$service_name_v2 = 'Volume Service v2',
|
||||
$service_type = 'volume',
|
||||
$service_type_v2 = 'volumev2',
|
||||
$service_description = 'Cinder Service',
|
||||
@ -239,14 +239,6 @@ class cinder::keystone::auth (
|
||||
$real_service_name = pick($service_name, $auth_name)
|
||||
$real_service_name_v2 = pick($service_name_v2, $auth_name_v2)
|
||||
|
||||
# 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 "Volume Service" (according to Keystone default catalog) in a future release. In case you use different value, please update your manifests accordingly.')
|
||||
}
|
||||
if !$service_name_v2 {
|
||||
warning('Note that service_name_v2 parameter default value will be changed to "Volume Service v2" in a future release. In case you use different value, please update your manifests accordingly.')
|
||||
}
|
||||
|
||||
if $real_service_name == $real_service_name_v2 {
|
||||
fail('cinder::keystone::auth parameters service_name and service_name_v2 must be different.')
|
||||
}
|
||||
|
@ -19,11 +19,11 @@ describe 'cinder::keystone::auth' do
|
||||
:ensure => 'present',
|
||||
:roles => ['admin']
|
||||
)
|
||||
is_expected.to contain_keystone_service('cinder::volume').with(
|
||||
is_expected.to contain_keystone_service('Volume Service::volume').with(
|
||||
:ensure => 'present',
|
||||
:description => 'Cinder Service'
|
||||
)
|
||||
is_expected.to contain_keystone_service('cinderv2::volumev2').with(
|
||||
is_expected.to contain_keystone_service('Volume Service v2::volumev2').with(
|
||||
:ensure => 'present',
|
||||
:description => 'Cinder Service v2'
|
||||
)
|
||||
@ -31,14 +31,14 @@ describe 'cinder::keystone::auth' do
|
||||
end
|
||||
|
||||
it 'configures keystone endpoints' do
|
||||
is_expected.to contain_keystone_endpoint('RegionOne/cinder::volume').with(
|
||||
is_expected.to contain_keystone_endpoint('RegionOne/Volume Service::volume').with(
|
||||
:ensure => 'present',
|
||||
:public_url => 'http://127.0.0.1:8776/v1/%(tenant_id)s',
|
||||
:admin_url => 'http://127.0.0.1:8776/v1/%(tenant_id)s',
|
||||
:internal_url => 'http://127.0.0.1:8776/v1/%(tenant_id)s'
|
||||
)
|
||||
|
||||
is_expected.to contain_keystone_endpoint('RegionOne/cinderv2::volumev2').with(
|
||||
is_expected.to contain_keystone_endpoint('RegionOne/Volume Service v2::volumev2').with(
|
||||
:ensure => 'present',
|
||||
:public_url => 'http://127.0.0.1:8776/v2/%(tenant_id)s',
|
||||
:admin_url => 'http://127.0.0.1:8776/v2/%(tenant_id)s',
|
||||
@ -61,14 +61,14 @@ describe 'cinder::keystone::auth' do
|
||||
end
|
||||
|
||||
it 'configures keystone endpoints' do
|
||||
is_expected.to contain_keystone_endpoint('RegionThree/cinder::volume').with(
|
||||
is_expected.to contain_keystone_endpoint('RegionThree/Volume Service::volume').with(
|
||||
:ensure => 'present',
|
||||
:public_url => 'https://10.0.42.1:4242/v41/%(tenant_id)s',
|
||||
:admin_url => 'https://10.0.42.2:4242/v41/%(tenant_id)s',
|
||||
:internal_url => 'https://10.0.42.3:4242/v41/%(tenant_id)s'
|
||||
)
|
||||
|
||||
is_expected.to contain_keystone_endpoint('RegionThree/cinderv2::volumev2').with(
|
||||
is_expected.to contain_keystone_endpoint('RegionThree/Volume Service v2::volumev2').with(
|
||||
:ensure => 'present',
|
||||
:public_url => 'https://10.0.42.1:4242/v42/%(tenant_id)s',
|
||||
:admin_url => 'https://10.0.42.2:4242/v42/%(tenant_id)s',
|
||||
@ -93,14 +93,14 @@ describe 'cinder::keystone::auth' do
|
||||
end
|
||||
|
||||
it 'configures keystone endpoints' do
|
||||
is_expected.to contain_keystone_endpoint('RegionThree/cinder::volume').with(
|
||||
is_expected.to contain_keystone_endpoint('RegionThree/Volume Service::volume').with(
|
||||
:ensure => 'present',
|
||||
:public_url => 'https://10.0.42.1:4242/v42/%(tenant_id)s',
|
||||
:admin_url => 'https://10.0.42.2:4242/v42/%(tenant_id)s',
|
||||
:internal_url => 'https://10.0.42.3:4242/v42/%(tenant_id)s'
|
||||
)
|
||||
|
||||
is_expected.to contain_keystone_endpoint('RegionThree/cinderv2::volumev2').with(
|
||||
is_expected.to contain_keystone_endpoint('RegionThree/Volume Service v2::volumev2').with(
|
||||
:ensure => 'present',
|
||||
:public_url => 'https://10.0.42.1:4242/v2/%(tenant_id)s',
|
||||
:admin_url => 'https://10.0.42.2:4242/v2/%(tenant_id)s',
|
||||
@ -117,8 +117,8 @@ describe 'cinder::keystone::auth' do
|
||||
:configure_endpoint_v2 => false
|
||||
)
|
||||
end
|
||||
it { is_expected.to_not contain_keystone_endpoint('RegionOne/cinder::volume') }
|
||||
it { is_expected.to_not contain_keystone_endpoint('RegionOne/cinderv2::volumev2') }
|
||||
it { is_expected.to_not contain_keystone_endpoint('RegionOne/Volume Service::volume') }
|
||||
it { is_expected.to_not contain_keystone_endpoint('RegionOne/Volume Service v2::volumev2') }
|
||||
end
|
||||
|
||||
describe 'when user is_expected.to not be configured' do
|
||||
@ -130,7 +130,7 @@ describe 'cinder::keystone::auth' do
|
||||
|
||||
it { is_expected.to_not contain_keystone_user('cinder') }
|
||||
it { is_expected.to contain_keystone_user_role('cinder@services') }
|
||||
it { is_expected.to contain_keystone_service('cinder::volume').with(
|
||||
it { is_expected.to contain_keystone_service('Volume Service::volume').with(
|
||||
:ensure => 'present',
|
||||
:description => 'Cinder Service'
|
||||
) }
|
||||
@ -147,7 +147,7 @@ describe 'cinder::keystone::auth' do
|
||||
|
||||
it { is_expected.to_not contain_keystone_user('cinder') }
|
||||
it { is_expected.to_not contain_keystone_user_role('cinder@services') }
|
||||
it { is_expected.to contain_keystone_service('cinder::volume').with(
|
||||
it { is_expected.to contain_keystone_service('Volume Service::volume').with(
|
||||
:ensure => 'present',
|
||||
:description => 'Cinder Service'
|
||||
) }
|
||||
|
Loading…
x
Reference in New Issue
Block a user