From 35f3fe083a8e769b47ef112d4edb553a80d8c12c Mon Sep 17 00:00:00 2001 From: Juan Antonio Osorio Robles Date: Tue, 13 Sep 2016 13:55:27 +0300 Subject: [PATCH] Add os_actions_endpoint_type parameter This is used by mistral to determine the endpoint that it'll use to perform actions for services. It is useful if you want to use something other than the public endpoints to perform action, for instance, using the internal endpoints instead. Depends-On: I5a27488c83c998ffb604a673fc1024bcbaed52d2 Change-Id: I809c88d92e24231c2b5e23230e1b006b538382ac --- manifests/init.pp | 7 +++++++ spec/classes/mistral_init_spec.rb | 13 +++++++++++++ 2 files changed, 20 insertions(+) diff --git a/manifests/init.pp b/manifests/init.pp index 7361035..14202be 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -19,6 +19,11 @@ # (optional) Specifies the admin Identity URI for Mistral to use. # Default 'http://localhost:35357/'. # +# [*os_actions_endpoint_type*] +# (optional) Type of endpoint in identity service catalog to use for +# communication with OpenStack services +# Defaults to $::os_service_default +# # [*keystone_user*] # (optional) The name of the auth user # Defaults to 'mistral'. @@ -203,6 +208,7 @@ class mistral( $rpc_backend = $::os_service_default, $auth_uri = 'http://localhost:5000/', $identity_uri = 'http://localhost:35357/', + $os_actions_endpoint_type = $::os_service_default, $control_exchange = $::os_service_default, $rpc_response_timeout = $::os_service_default, $rabbit_host = $::os_service_default, @@ -265,6 +271,7 @@ class mistral( 'coordination/heartbeat_interval': value => $coordination_heartbeat_interval; 'DEFAULT/report_interval': value => $report_interval; 'DEFAULT/service_down_time': value => $service_down_time; + 'DEFAULT/os_actions_endpoint_type': value => $os_actions_endpoint_type; } oslo::messaging::default {'mistral_config': diff --git a/spec/classes/mistral_init_spec.rb b/spec/classes/mistral_init_spec.rb index df6334a..0310000 100644 --- a/spec/classes/mistral_init_spec.rb +++ b/spec/classes/mistral_init_spec.rb @@ -64,6 +64,9 @@ describe 'mistral' do is_expected.to contain_mistral_config('keystone_authtoken/admin_password').with( :value => 'foo' ) + is_expected.to contain_mistral_config('DEFAULT/os_actions_endpoint_type').with( + :value => '' + ) end end @@ -211,4 +214,14 @@ describe 'mistral' do end end + describe 'with os_actions_keystone_endpoint overriden' do + let :params do + req_params.merge({ + :os_actions_endpoint_type => 'internal', + }) + end + + it { is_expected.to contain_mistral_config('DEFAULT/os_actions_endpoint_type').with_value('internal') } + end + end