Support [DEFAULT] max_*_api_microversion options

These options can be used to override the maximum api microversion
available in the deployment.

Change-Id: I637437d729d02fdb1041d5a5a3a0cb6194b7a981
This commit is contained in:
Takashi Kajinami 2024-09-24 23:13:39 +09:00 committed by Tobias Urdin
parent e40faa4350
commit 190cc627f0
3 changed files with 25 additions and 0 deletions

View File

@ -103,6 +103,14 @@
# or detached.
# Defaults to $facts['os_service_default'].
#
# [*max_nova_api_microversion*]
# (Optional) Maximum nova API version for client plugin.
# Defaults to $facts['os_service_default'].
#
# [*max_ironic_api_microversion*]
# (Optional) Maximum ironic API version for client plugin.
# Defaults to $facts['os_service_default'].
#
# [*event_purge_batch_size*]
# (Optional) Controls how many events will be pruned whenever a stack's
# events are purged.
@ -223,6 +231,8 @@ class heat::engine (
$client_retry_limit = $facts['os_service_default'],
$max_server_name_length = $facts['os_service_default'],
$max_interface_check_attempts = $facts['os_service_default'],
$max_nova_api_microversion = $facts['os_service_default'],
$max_ironic_api_microversion = $facts['os_service_default'],
$event_purge_batch_size = $facts['os_service_default'],
$max_events_per_stack = $facts['os_service_default'],
$stack_action_timeout = $facts['os_service_default'],
@ -296,6 +306,8 @@ class heat::engine (
'DEFAULT/client_retry_limit': value => $client_retry_limit;
'DEFAULT/max_server_name_length': value => $max_server_name_length;
'DEFAULT/max_interface_check_attempts': value => $max_interface_check_attempts;
'DEFAULT/max_nova_api_microversion': value => $max_nova_api_microversion;
'DEFAULT/max_ironic_api_microversion': value => $max_ironic_api_microversion;
'DEFAULT/event_purge_batch_size': value => $event_purge_batch_size;
'DEFAULT/max_events_per_stack': value => $max_events_per_stack;
'DEFAULT/stack_action_timeout': value => $stack_action_timeout;

View File

@ -0,0 +1,7 @@
---
features:
- |
The ``heat::engine`` class now supports the following new parameters.
- ``max_nova_api_microversion``
- ``max_ironic_api_microversion``

View File

@ -18,6 +18,8 @@ describe 'heat::engine' do
:client_retry_limit => '<SERVICE DEFAULT>',
:max_server_name_length => '<SERVICE DEFAULT>',
:max_interface_check_attempts => '<SERVICE DEFAULT>',
:max_nova_api_microversion => '<SERVICE DEFAULT>',
:max_ironic_api_microversion => '<SERVICE DEFAULT>',
:event_purge_batch_size => '<SERVICE DEFAULT>',
:max_events_per_stack => '<SERVICE DEFAULT>',
:stack_action_timeout => '<SERVICE DEFAULT>',
@ -58,6 +60,8 @@ describe 'heat::engine' do
:client_retry_limit => 2,
:max_server_name_length => 53,
:max_interface_check_attempts => 10,
:max_nova_api_microversion => '2.30',
:max_ironic_api_microversion => '1.20',
:event_purge_batch_size => 200,
:max_events_per_stack => 1000,
:stack_action_timeout => 3600,
@ -119,6 +123,8 @@ describe 'heat::engine' do
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/max_server_name_length').with_value( expected_params[:max_server_name_length] ) }
it { is_expected.to contain_heat_config('DEFAULT/max_interface_check_attempts').with_value( expected_params[:max_interface_check_attempts] ) }
it { is_expected.to contain_heat_config('DEFAULT/max_nova_api_microversion').with_value( expected_params[:max_nova_api_microversion] ) }
it { is_expected.to contain_heat_config('DEFAULT/max_ironic_api_microversion').with_value( expected_params[:max_ironic_api_microversion] ) }
it { is_expected.to contain_heat_config('DEFAULT/event_purge_batch_size').with_value( expected_params[:event_purge_batch_size] ) }
it { is_expected.to contain_heat_config('DEFAULT/max_events_per_stack').with_value( expected_params[:max_events_per_stack] ) }
it { is_expected.to contain_heat_config('DEFAULT/stack_action_timeout').with_value( expected_params[:stack_action_timeout] ) }