diff --git a/.zuul.yaml b/.zuul.yaml index 19b17b089..12ed2044f 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -2,5 +2,4 @@ templates: - puppet-openstack-check-jobs - puppet-openstack-module-unit-jobs - - puppet-openstack-integration-jobs-all - puppet-openstack-beaker-jobs diff --git a/manifests/resource/authtoken.pp b/manifests/resource/authtoken.pp index 41bc8adb7..33f465aed 100644 --- a/manifests/resource/authtoken.pp +++ b/manifests/resource/authtoken.pp @@ -75,7 +75,7 @@ # (Optional) Authentication type to load # Defaults to $::os_service_default # -# [*auth_uri*] +# [*www_authenticate_uri*] # (Optional) Complete public Identity API endpoint. # Defaults to $::os_service_default. # @@ -209,6 +209,12 @@ # (Optional) Whether to install the python-memcache package. # Defaults to false. # +# DEPRECATED PARAMETERS +# +# [*auth_uri*] +# (Optional) Complete public Identity API endpoint. +# Defaults to undef +# define keystone::resource::authtoken( $username, $password, @@ -219,7 +225,7 @@ define keystone::resource::authtoken( $insecure = $::os_service_default, $auth_section = $::os_service_default, $auth_type = $::os_service_default, - $auth_uri = $::os_service_default, + $www_authenticate_uri = $::os_service_default, $auth_version = $::os_service_default, $cache = $::os_service_default, $cafile = $::os_service_default, @@ -244,10 +250,17 @@ define keystone::resource::authtoken( $region_name = $::os_service_default, $token_cache_time = $::os_service_default, $manage_memcache_package = false, + # DEPRECATED PARAMETERS + $auth_uri = undef, ) { include ::keystone::deps + if $auth_uri { + warning('The auth_uri parameter is deprecated. Please use www_authenticate_uri instead.') + } + $www_authenticate_uri_real = pick($auth_uri, $www_authenticate_uri) + if !is_service_default($check_revocations_for_cached) { validate_bool($check_revocations_for_cached) } @@ -287,7 +300,7 @@ define keystone::resource::authtoken( $keystonemiddleware_options = { 'keystone_authtoken/auth_section' => {'value' => $auth_section}, - 'keystone_authtoken/auth_uri' => {'value' => $auth_uri}, + 'keystone_authtoken/www_authenticate_uri' => {'value' => $www_authenticate_uri_real}, 'keystone_authtoken/auth_type' => {'value' => $auth_type}, 'keystone_authtoken/auth_version' => {'value' => $auth_version}, 'keystone_authtoken/cache' => {'value' => $cache}, diff --git a/releasenotes/notes/deprecate_auth_uri_parameter-943eeba4dc64dddc.yaml b/releasenotes/notes/deprecate_auth_uri_parameter-943eeba4dc64dddc.yaml new file mode 100644 index 000000000..86d56c01d --- /dev/null +++ b/releasenotes/notes/deprecate_auth_uri_parameter-943eeba4dc64dddc.yaml @@ -0,0 +1,4 @@ +--- +deprecations: + - auth_uri is deprecated and will be removed in a future release. + Please use www_authenticate_uri instead. diff --git a/spec/defines/keystone_resource_authtoken_spec.rb b/spec/defines/keystone_resource_authtoken_spec.rb index 24ccb6d91..3b00c22f7 100644 --- a/spec/defines/keystone_resource_authtoken_spec.rb +++ b/spec/defines/keystone_resource_authtoken_spec.rb @@ -23,7 +23,7 @@ describe 'keystone::resource::authtoken' do is_expected.to contain_keystone_config('keystone_authtoken/insecure').with_value('') is_expected.to contain_keystone_config('keystone_authtoken/auth_section').with_value('') is_expected.to contain_keystone_config('keystone_authtoken/auth_type').with_value('') - is_expected.to contain_keystone_config('keystone_authtoken/auth_uri').with_value('') + is_expected.to contain_keystone_config('keystone_authtoken/www_authenticate_uri').with_value('') is_expected.to contain_keystone_config('keystone_authtoken/auth_version').with_value('') is_expected.to contain_keystone_config('keystone_authtoken/cache').with_value('') is_expected.to contain_keystone_config('keystone_authtoken/cafile').with_value('') @@ -62,7 +62,7 @@ describe 'keystone::resource::authtoken' do :insecure => true, :auth_section => 'some_section', :auth_type => 'password', - :auth_uri => 'http://127.1.1.127:5000/', + :www_authenticate_uri => 'http://127.1.1.127:5000/', :auth_version => '3', :cache => 'somevalue', :cafile => 'cafile.pem', @@ -88,7 +88,7 @@ describe 'keystone::resource::authtoken' do is_expected.to contain_keystone_config('keystone_authtoken/project_domain_name').with_value(params[:project_domain_name]) is_expected.to contain_keystone_config('keystone_authtoken/insecure').with_value(params[:insecure]) is_expected.to contain_keystone_config('keystone_authtoken/auth_section').with_value(params[:auth_section]) - is_expected.to contain_keystone_config('keystone_authtoken/auth_uri').with_value(params[:auth_uri]) + is_expected.to contain_keystone_config('keystone_authtoken/www_authenticate_uri').with_value(params[:www_authenticate_uri]) is_expected.to contain_keystone_config('keystone_authtoken/auth_version').with_value(params[:auth_version]) is_expected.to contain_keystone_config('keystone_authtoken/cache').with_value(params[:cache]) is_expected.to contain_keystone_config('keystone_authtoken/check_revocations_for_cached').with_value(params[:check_revocations_for_cached])