Remove deprecated keystone::auth options

Change-Id: Ic94e1688ed5fb840fba7890f36aac2a415d1c6c0
This commit is contained in:
Iury Gregory Melo Ferreira 2016-06-03 01:39:03 -03:00
parent 9ecbe38281
commit 14448a4c41
3 changed files with 6 additions and 113 deletions

View File

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

View File

@ -0,0 +1,3 @@
---
other:
- Removed deprecated options for ironic::keystone::auth class.

View File

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