From 093b663165e9fc698b5c773343a3110980e88fe3 Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Wed, 25 Mar 2020 18:45:20 +0100 Subject: [PATCH] Add server_keystone_endpoint_type param to heat::engine Adds the server_keystone_endpoint_type config option [1]. This is available all the way back from Stein and will therefore be backported. [1] https://github.com/openstack/heat/blob/master/heat/common/config.py#L99 Change-Id: Ia251802612e7a4cf5c6828f3b7c1a0ef63a3c069 --- manifests/engine.pp | 11 +++++++++-- ...erver_keystone_endpoint_type-82c3f461916653d8.yaml | 4 ++++ spec/classes/heat_engine_spec.rb | 3 +++ 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/server_keystone_endpoint_type-82c3f461916653d8.yaml diff --git a/manifests/engine.pp b/manifests/engine.pp index 4ccb1383..08f38c12 100644 --- a/manifests/engine.pp +++ b/manifests/engine.pp @@ -78,7 +78,7 @@ # associated SoftwareDeployment resources. # Allowed values: HEAT_CFNTOOLS, RAW, SOFTWARE_CONFIG # Defaults to $::os_service_default. - +# # [*trusts_delegated_roles*] # (optional) Array of trustor roles to be delegated to heat. # This value is also used by heat::keystone::auth if it is set to @@ -129,12 +129,17 @@ # (Optional) Number of times to retry when client encounters a transient error. # Defaults to $::os_service_default # +# [*server_keystone_endpoint_type*] +# (Optional) If set, is used to control which authentication endpoint is used +# by user-controlled servers to make calls back to Heat. +# Defaults to $::os_service_default +# # DEPRECATED PARAMETERS # # [*heat_watch_server_url*] # (optional) URL of the Heat cloudwatch server # Defaults to undef. - +# class heat::engine ( $auth_encryption_key, $package_ensure = 'present', @@ -160,6 +165,7 @@ class heat::engine ( $max_nested_stack_depth = $::os_service_default, $plugin_dirs = $::os_service_default, $client_retry_limit = $::os_service_default, + $server_keystone_endpoint_type = $::os_service_default, # DEPRECATED PARAMETERS $heat_watch_server_url = undef, ) { @@ -239,5 +245,6 @@ class heat::engine ( 'DEFAULT/max_nested_stack_depth': value => $max_nested_stack_depth; 'DEFAULT/plugin_dirs': value => $plugin_dirs_real; 'DEFAULT/client_retry_limit': value => $client_retry_limit; + 'DEFAULT/server_keystone_endpoint_type': value => $server_keystone_endpoint_type; } } diff --git a/releasenotes/notes/server_keystone_endpoint_type-82c3f461916653d8.yaml b/releasenotes/notes/server_keystone_endpoint_type-82c3f461916653d8.yaml new file mode 100644 index 00000000..d55dc921 --- /dev/null +++ b/releasenotes/notes/server_keystone_endpoint_type-82c3f461916653d8.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Added server_keystone_endpoint_type parameter to heat::engine. diff --git a/spec/classes/heat_engine_spec.rb b/spec/classes/heat_engine_spec.rb index 6fd82ee9..1b628afa 100644 --- a/spec/classes/heat_engine_spec.rb +++ b/spec/classes/heat_engine_spec.rb @@ -21,6 +21,7 @@ describe 'heat::engine' do :max_nested_stack_depth => '', :plugin_dirs => '', :client_retry_limit => '', + :server_keystone_endpoint_type => '', } end @@ -51,6 +52,7 @@ describe 'heat::engine' do :environment_dir => '/etc/heat/environment.d', :template_dir => '/etc/heat/templates', :client_retry_limit => 2, + :server_keystone_endpoint_type => 'public', } ].each do |new_params| describe 'when #{param_set == {} ? "using default" : "specifying"} parameters' @@ -98,6 +100,7 @@ describe 'heat::engine' do it { is_expected.to contain_heat_config('DEFAULT/template_dir').with_value( expected_params[:template_dir] ) } it { is_expected.to contain_heat_config('DEFAULT/plugin_dirs').with_value('') } it { is_expected.to contain_heat_config('DEFAULT/client_retry_limit').with_value( expected_params[:client_retry_limit] ) } + it { is_expected.to contain_heat_config('DEFAULT/server_keystone_endpoint_type').with_value( expected_params[:server_keystone_endpoint_type] ) } end context 'with disabled service managing' do