diff --git a/manifests/keystone/auth.pp b/manifests/keystone/auth.pp index 93b56c922..7e76289d8 100644 --- a/manifests/keystone/auth.pp +++ b/manifests/keystone/auth.pp @@ -13,7 +13,7 @@ # # [*service_name*] # (optional) Name of the service. -# Defaults to the value of auth_name. +# Defaults to 'nova'. # # [*service_description*] # (optional) Description for keystone service. @@ -88,7 +88,7 @@ class nova::keystone::auth( $password, $auth_name = 'nova', - $service_name = undef, + $service_name = 'nova', $service_description = 'Openstack Compute Service', $region = 'RegionOne', $tenant = 'services', @@ -115,25 +115,17 @@ class nova::keystone::auth( warning('all parameters related to v3 API in nova::keystone::auth are deprecated, have no effect and will be removed after Newton release.') } - # TODO(mmagr): change default service names according to default_catalog in next (M) cycle - if $service_name == undef { - $real_service_name = $auth_name - warning('Note that service_name parameter default value will be changed to "Compute Service" (according to Keystone default catalog) in a future release. In case you use different value, please update your manifests accordingly.') - } else { - $real_service_name = $service_name - } - if $configure_endpoint { - Keystone_endpoint["${region}/${real_service_name}::compute"] ~> Service <| name == 'nova-api' |> + Keystone_endpoint["${region}/${service_name}::compute"] ~> Service <| name == 'nova-api' |> } - keystone::resource::service_identity { "nova service, user ${auth_name}": + keystone::resource::service_identity { 'nova': configure_user => $configure_user, configure_user_role => $configure_user_role, configure_endpoint => $configure_endpoint, service_type => 'compute', service_description => $service_description, - service_name => $real_service_name, + service_name => $service_name, region => $region, auth_name => $auth_name, password => $password, diff --git a/releasenotes/notes/keystone-auth-name-211cfa37fbe78c8c.yaml b/releasenotes/notes/keystone-auth-name-211cfa37fbe78c8c.yaml new file mode 100644 index 000000000..835c883b6 --- /dev/null +++ b/releasenotes/notes/keystone-auth-name-211cfa37fbe78c8c.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - The keystone auth class has been updated to provide a default service_name + to allow a user to specify a custom auth_name that may not contain the + name of the service. diff --git a/spec/classes/nova_keystone_auth_spec.rb b/spec/classes/nova_keystone_auth_spec.rb index 174790833..70a8df0a2 100644 --- a/spec/classes/nova_keystone_auth_spec.rb +++ b/spec/classes/nova_keystone_auth_spec.rb @@ -8,6 +8,7 @@ describe 'nova::keystone::auth' do let :default_params do { :auth_name => 'nova', + :service_name => 'nova', :region => 'RegionOne', :tenant => 'services', :email => 'nova@localhost', @@ -57,7 +58,7 @@ describe 'nova::keystone::auth' do :roles => ['admin'] )} - it { is_expected.to contain_keystone_service('foo::compute').with( + it { is_expected.to contain_keystone_service('nova::compute').with( :ensure => 'present', :description => 'Openstack Compute Service' )}