Remove deprecated parameter 'address'

The address parameter has been deprecated since 2.0.0.

Change-Id: I57b8469fb816c37c9d6a285c07796f685b121a90
This commit is contained in:
David Moreau Simard 2014-01-31 15:55:36 -05:00
parent a5b5e1211f
commit f8fbd8addf
2 changed files with 5 additions and 40 deletions

View File

@ -20,14 +20,13 @@
class swift::keystone::auth(
$auth_name = 'swift',
$password = 'swift_password',
$address = '127.0.0.1',
$port = '8080',
$tenant = 'services',
$email = 'swift@localhost',
$region = 'RegionOne',
$operator_roles = ['admin', 'SwiftOperator'],
$public_protocol = 'http',
$public_address = undef,
$public_address = '127.0.0.1',
$public_port = undef,
$admin_protocol = 'http',
$admin_address = undef,
@ -35,27 +34,18 @@ class swift::keystone::auth(
$internal_address = undef
) {
if $address != '127.0.0.1' {
warning('Address parameter for swift::keystone::auth has been deprecated, use public_address instead')
}
if ! $public_port {
$real_public_port = $port
} else {
$real_public_port = $public_port
}
if ! $public_address {
$real_public_address = $address
} else {
$real_public_address = $public_address
}
if ! $admin_address {
$real_admin_address = $real_public_address
$real_admin_address = $public_address
} else {
$real_admin_address = $admin_address
}
if ! $internal_address {
$real_internal_address = $real_public_address
$real_internal_address = $public_address
} else {
$real_internal_address = $internal_address
}
@ -79,7 +69,7 @@ if $address != '127.0.0.1' {
}
keystone_endpoint { "${region}/${auth_name}":
ensure => present,
public_url => "${public_protocol}://${real_public_address}:${real_public_port}/v1/AUTH_%(tenant_id)s",
public_url => "${public_protocol}://${public_address}:${real_public_port}/v1/AUTH_%(tenant_id)s",
admin_url => "${admin_protocol}://${real_admin_address}:${port}/",
internal_url => "${internal_protocol}://${real_internal_address}:${port}/v1/AUTH_%(tenant_id)s",
}
@ -91,7 +81,7 @@ if $address != '127.0.0.1' {
}
keystone_endpoint { "${region}/${auth_name}_s3":
ensure => present,
public_url => "${public_protocol}://${real_public_address}:${real_public_port}",
public_url => "${public_protocol}://${public_address}:${real_public_port}",
admin_url => "${admin_protocol}://${real_admin_address}:${port}",
internal_url => "${internal_protocol}://${real_internal_address}:${port}",
}

View File

@ -138,31 +138,6 @@ describe 'swift::keystone::auth' do
end
describe 'when overriding address' do
let :params do
{
:address => '192.168.0.1',
:port => '8081'
}
end
it { should contain_keystone_endpoint('RegionOne/swift').with(
:ensure => 'present',
:public_url => "http://192.168.0.1:8081/v1/AUTH_%(tenant_id)s",
:admin_url => "http://192.168.0.1:8081/",
:internal_url => "http://192.168.0.1:8081/v1/AUTH_%(tenant_id)s"
) }
it { should contain_keystone_endpoint('RegionOne/swift_s3').with(
:ensure => 'present',
:public_url => 'http://192.168.0.1:8081',
:admin_url => 'http://192.168.0.1:8081',
:internal_url => 'http://192.168.0.1:8081'
) }
end
describe 'when overriding operator_roles' do
let :params do