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
This commit is contained in:
Tobias Urdin 2020-03-25 18:45:20 +01:00
parent 5a6838f7cd
commit 093b663165
3 changed files with 16 additions and 2 deletions

View File

@ -78,7 +78,7 @@
# associated SoftwareDeployment resources. # associated SoftwareDeployment resources.
# Allowed values: HEAT_CFNTOOLS, RAW, SOFTWARE_CONFIG # Allowed values: HEAT_CFNTOOLS, RAW, SOFTWARE_CONFIG
# Defaults to $::os_service_default. # Defaults to $::os_service_default.
#
# [*trusts_delegated_roles*] # [*trusts_delegated_roles*]
# (optional) Array of trustor roles to be delegated to heat. # (optional) Array of trustor roles to be delegated to heat.
# This value is also used by heat::keystone::auth if it is set to # 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. # (Optional) Number of times to retry when client encounters a transient error.
# Defaults to $::os_service_default # 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 # DEPRECATED PARAMETERS
# #
# [*heat_watch_server_url*] # [*heat_watch_server_url*]
# (optional) URL of the Heat cloudwatch server # (optional) URL of the Heat cloudwatch server
# Defaults to undef. # Defaults to undef.
#
class heat::engine ( class heat::engine (
$auth_encryption_key, $auth_encryption_key,
$package_ensure = 'present', $package_ensure = 'present',
@ -160,6 +165,7 @@ class heat::engine (
$max_nested_stack_depth = $::os_service_default, $max_nested_stack_depth = $::os_service_default,
$plugin_dirs = $::os_service_default, $plugin_dirs = $::os_service_default,
$client_retry_limit = $::os_service_default, $client_retry_limit = $::os_service_default,
$server_keystone_endpoint_type = $::os_service_default,
# DEPRECATED PARAMETERS # DEPRECATED PARAMETERS
$heat_watch_server_url = undef, $heat_watch_server_url = undef,
) { ) {
@ -239,5 +245,6 @@ class heat::engine (
'DEFAULT/max_nested_stack_depth': value => $max_nested_stack_depth; 'DEFAULT/max_nested_stack_depth': value => $max_nested_stack_depth;
'DEFAULT/plugin_dirs': value => $plugin_dirs_real; 'DEFAULT/plugin_dirs': value => $plugin_dirs_real;
'DEFAULT/client_retry_limit': value => $client_retry_limit; 'DEFAULT/client_retry_limit': value => $client_retry_limit;
'DEFAULT/server_keystone_endpoint_type': value => $server_keystone_endpoint_type;
} }
} }

View File

@ -0,0 +1,4 @@
---
features:
- |
Added server_keystone_endpoint_type parameter to heat::engine.

View File

@ -21,6 +21,7 @@ describe 'heat::engine' do
:max_nested_stack_depth => '<SERVICE DEFAULT>', :max_nested_stack_depth => '<SERVICE DEFAULT>',
:plugin_dirs => '<SERVICE DEFAULT>', :plugin_dirs => '<SERVICE DEFAULT>',
:client_retry_limit => '<SERVICE DEFAULT>', :client_retry_limit => '<SERVICE DEFAULT>',
:server_keystone_endpoint_type => '<SERVICE DEFAULT>',
} }
end end
@ -51,6 +52,7 @@ describe 'heat::engine' do
:environment_dir => '/etc/heat/environment.d', :environment_dir => '/etc/heat/environment.d',
:template_dir => '/etc/heat/templates', :template_dir => '/etc/heat/templates',
:client_retry_limit => 2, :client_retry_limit => 2,
:server_keystone_endpoint_type => 'public',
} }
].each do |new_params| ].each do |new_params|
describe 'when #{param_set == {} ? "using default" : "specifying"} parameters' 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/template_dir').with_value( expected_params[:template_dir] ) }
it { is_expected.to contain_heat_config('DEFAULT/plugin_dirs').with_value('<SERVICE DEFAULT>') } it { is_expected.to contain_heat_config('DEFAULT/plugin_dirs').with_value('<SERVICE DEFAULT>') }
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/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 end
context 'with disabled service managing' do context 'with disabled service managing' do