From 3c0fd00fe9d08bfb758aaa14c8982997aec626f5 Mon Sep 17 00:00:00 2001 From: Dan Bode Date: Tue, 25 Jun 2013 17:49:43 -0700 Subject: [PATCH] Add swift_public_address Previously, there was no way to specify a separate public address for swift's endpoint in keystone's service catalog. This means that there was no way to support installing swift proxy on a node besides the controller. This commit adds a config param swift_public_address that can be used to configure swift on a separate node. Change-Id: Iafc415f69b85a97c45f6410be1d4888c61c39bba --- manifests/controller.pp | 6 ++++++ spec/classes/openstack_controller_spec.rb | 16 +++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/manifests/controller.pp b/manifests/controller.pp index 24efe9e..c2b8b6e 100644 --- a/manifests/controller.pp +++ b/manifests/controller.pp @@ -71,6 +71,10 @@ # Auth password for swift. # (Optional) Defaults to false. Required if swift is set to true. # +# [swift_public_address] +# The swift address used to populate the keystone service catalog. +# (optional). Defaults to false. +# # === Examples # # class { 'openstack::controller': @@ -188,6 +192,7 @@ class openstack::controller ( $ovs_local_ip = false, # swift $swift = false, + $swift_public_address = false, $enabled = true ) { @@ -276,6 +281,7 @@ class openstack::controller ( quantum_user_password => $quantum_user_password, swift => $swift, swift_user_password => $swift_user_password, + swift_public_address => $swift_public_address, enabled => $enabled, bind_host => $keystone_bind_address, } diff --git a/spec/classes/openstack_controller_spec.rb b/spec/classes/openstack_controller_spec.rb index 1961c81..3c1e707 100644 --- a/spec/classes/openstack_controller_spec.rb +++ b/spec/classes/openstack_controller_spec.rb @@ -178,8 +178,9 @@ describe 'openstack::controller' do it 'should configure default keystone configuration' do should contain_class('openstack::keystone').with( - :swift => false, - :swift_user_password => false + :swift => false, + :swift_user_password => false, + :swift_public_address => false ) should contain_class('keystone').with( @@ -219,12 +220,17 @@ describe 'openstack::controller' do end context 'when configuring swift' do before :each do - params.merge!(:swift => true, :swift_user_password => 'foo') + params.merge!( + :swift => true, + :swift_user_password => 'foo', + :swift_public_address => '10.0.0.2' + ) end it 'should configure swift auth in keystone' do should contain_class('openstack::keystone').with( - :swift => true, - :swift_user_password => 'foo' + :swift => true, + :swift_user_password => 'foo', + :swift_public_address => '10.0.0.2' ) end end