From f8fbd8addfe07547666666a8cb2f68f5b1d8aa81 Mon Sep 17 00:00:00 2001 From: David Moreau Simard Date: Fri, 31 Jan 2014 15:55:36 -0500 Subject: [PATCH] Remove deprecated parameter 'address' The address parameter has been deprecated since 2.0.0. Change-Id: I57b8469fb816c37c9d6a285c07796f685b121a90 --- manifests/keystone/auth.pp | 20 +++++-------------- spec/classes/swift_keystone_auth_spec.rb | 25 ------------------------ 2 files changed, 5 insertions(+), 40 deletions(-) diff --git a/manifests/keystone/auth.pp b/manifests/keystone/auth.pp index 8ee4b348..0aed3d96 100644 --- a/manifests/keystone/auth.pp +++ b/manifests/keystone/auth.pp @@ -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}", } diff --git a/spec/classes/swift_keystone_auth_spec.rb b/spec/classes/swift_keystone_auth_spec.rb index f2a38423..b24d360c 100644 --- a/spec/classes/swift_keystone_auth_spec.rb +++ b/spec/classes/swift_keystone_auth_spec.rb @@ -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