diff --git a/manifests/keystone/auth.pp b/manifests/keystone/auth.pp index f258667c..ed8845bd 100644 --- a/manifests/keystone/auth.pp +++ b/manifests/keystone/auth.pp @@ -70,41 +70,6 @@ # (optional) The endpoint's internal url. (Defaults to 'http://127.0.0.1:6385') # This url should *not* contain any trailing '/'. # -# [*port*] -# (optional) DEPRECATED: Use public_url, internal_url and admin_url instead. -# Default port for endpoints. (Defaults to 6385) -# Setting this parameter overrides public_url, internal_url and admin_url parameters. -# -# [*public_protocol*] -# (optional) DEPRECATED: Use public_url instead. -# Protocol for public endpoint. (Defaults to 'http') -# Setting this parameter overrides public_url parameter. -# -# [*public_port*] -# (optional) DEPRECATED: Use public_url instead. -# Default port for endpoints. (Defaults to $port) -# Setting this parameter overrides public_url parameter. -# -# [*public_address*] -# (optional) DEPRECATED: Use public_url instead. -# Public address for endpoint. (Defaults to '127.0.0.1') -# Setting this parameter overrides public_url parameter. -# -# [*internal_address*] -# (optional) DEPRECATED: Use internal_url instead. -# Internal address for endpoint. (Defaults to '127.0.0.1') -# Setting this parameter overrides internal_url parameter. -# -# [*admin_address*] -# (optional) DEPRECATED: Use admin_url instead. -# Admin address for endpoint. (Defaults to '127.0.0.1') -# Setting this parameter overrides admin_url parameter. -# -# === Deprecation notes -# -# If any value is provided for public_protocol, public_address or port parameters, -# public_url will be completely ignored. The same applies for internal and admin parameters. -# # === Examples # # class { 'ironic::keystone::auth': @@ -128,64 +93,8 @@ class ironic::keystone::auth ( $public_url = 'http://127.0.0.1:6385', $admin_url = 'http://127.0.0.1:6385', $internal_url = 'http://127.0.0.1:6385', - # DEPRECATED PARAMETERS - $port = undef, - $public_protocol = undef, - $public_address = undef, - $public_port = undef, - $internal_address = undef, - $admin_address = undef, ) { - if $port { - warning('The port parameter is deprecated, use public_url, internal_url and admin_url instead.') - } - - if $public_port { - warning('The public_port parameter is deprecated, use public_url instead.') - } - - if $public_protocol { - warning('The public_protocol parameter is deprecated, use public_url instead.') - } - - if $public_address { - warning('The public_address parameter is deprecated, use public_url instead.') - } - - if $internal_address { - warning('The internal_address parameter is deprecated, use internal_url instead.') - } - - if $admin_address { - warning('The admin_address parameter is deprecated, use admin_url instead.') - } - - if ($public_protocol or $public_address or $port or $public_port) { - $public_url_real = sprintf('%s://%s:%s', - pick($public_protocol, 'http'), - pick($public_address, '127.0.0.1'), - pick($public_port, $port, '6385')) - } else { - $public_url_real = $public_url - } - - if ($admin_address or $port) { - $admin_url_real = sprintf('http://%s:%s', - pick($admin_address, '127.0.0.1'), - pick($port, '6385')) - } else { - $admin_url_real = $admin_url - } - - if ($internal_address or $port) { - $internal_url_real = sprintf('http://%s:%s', - pick($internal_address, '127.0.0.1'), - pick($port, '6385')) - } else { - $internal_url_real = $internal_url - } - $real_service_name = pick($service_name, $auth_name) if $configure_user_role { @@ -205,9 +114,9 @@ class ironic::keystone::auth ( password => $password, email => $email, tenant => $tenant, - public_url => $public_url_real, - internal_url => $internal_url_real, - admin_url => $admin_url_real, + public_url => $public_url, + internal_url => $internal_url, + admin_url => $admin_url, } } diff --git a/releasenotes/notes/remove_deprecated_keystone_auth_options-af722a0d8ab900ad.yaml b/releasenotes/notes/remove_deprecated_keystone_auth_options-af722a0d8ab900ad.yaml new file mode 100644 index 00000000..63dfce94 --- /dev/null +++ b/releasenotes/notes/remove_deprecated_keystone_auth_options-af722a0d8ab900ad.yaml @@ -0,0 +1,3 @@ +--- +other: + - Removed deprecated options for ironic::keystone::auth class. diff --git a/spec/classes/ironic_keystone_auth_spec.rb b/spec/classes/ironic_keystone_auth_spec.rb index 7c86a3c8..6dbe235d 100644 --- a/spec/classes/ironic_keystone_auth_spec.rb +++ b/spec/classes/ironic_keystone_auth_spec.rb @@ -84,25 +84,6 @@ describe 'ironic::keystone::auth' do ) } end - describe 'with deprecated endpoint parameters' do - let :params do - { :password => 'ironic_password', - :public_protocol => 'https', - :public_port => '80', - :public_address => '10.10.10.10', - :port => '81', - :internal_address => '10.10.10.11', - :admin_address => '10.10.10.12' } - end - - it { is_expected.to contain_keystone_endpoint('RegionOne/ironic::baremetal').with( - :ensure => 'present', - :public_url => "https://10.10.10.10:80", - :internal_url => "http://10.10.10.11:81", - :admin_url => "http://10.10.10.12:81" - ) } - end - describe 'when overriding auth name' do let :params do { :password => 'foo',