diff --git a/manifests/init.pp b/manifests/init.pp index e52ad432..47aba9a9 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -266,6 +266,15 @@ # (optional) Heat url in format like http://0.0.0.0:8004/v1/%(tenant_id)s. # Defaults to $::os_service_default. # +# [*heat_clients_endpoint_type*] +# (optional) Type of endpoint in Identity service catalog to use for +# communication with the OpenStack service. +# TODO(emilien): change the default from false to $::os_service_default +# once TripleO use it correctly from hieratata. +# The default value is set to false now to avoid duplicated resources in +# TripleO puppet catalog. +# Defaults to false. +# # [*purge_config*] # (optional) Whether to set only the specified config options # in the heat config. @@ -372,6 +381,7 @@ class heat( $notification_topics = $::os_service_default, $enable_proxy_headers_parsing = $::os_service_default, $heat_clients_url = $::os_service_default, + $heat_clients_endpoint_type = false, $purge_config = false, $auth_strategy = 'keystone', $yaql_memory_quota = $::os_service_default, @@ -479,6 +489,12 @@ deprecated. Please use heat::default_transport_url instead.") 'clients_heat/url': value => $heat_clients_url; } + if $heat_clients_endpoint_type { + heat_config { + 'clients/endpoint_type': value => $heat_clients_endpoint_type; + } + } + if (!is_service_default($enable_stack_adopt)) { validate_bool($enable_stack_adopt) } diff --git a/releasenotes/notes/heat_clients_endpoint_type-8952f02d7fb18828.yaml b/releasenotes/notes/heat_clients_endpoint_type-8952f02d7fb18828.yaml new file mode 100644 index 00000000..fb202a26 --- /dev/null +++ b/releasenotes/notes/heat_clients_endpoint_type-8952f02d7fb18828.yaml @@ -0,0 +1,3 @@ +--- +features: + - Support the clients/endpoint_type parameter in ::heat. diff --git a/spec/classes/heat_init_spec.rb b/spec/classes/heat_init_spec.rb index 55c5b758..e37b6ed2 100644 --- a/spec/classes/heat_init_spec.rb +++ b/spec/classes/heat_init_spec.rb @@ -353,6 +353,18 @@ describe 'heat' do end + shared_examples_for 'with heat_clients_endpoint_type set' do + before do + params.merge!( + :heat_clients_endpoint_type => 'internal', + ) + end + + it do + is_expected.to contain_heat_config('clients/endpoint_type').with_value('internal') + end + end + shared_examples_for 'with ec2authtoken auth uri set' do before do params.merge!(