Support customizing catalog_type options

Backport note:
This backport includes 5f84cf371b19c6aeffd423aa2001be7acd5c9c96 which
fixed the parameter description order.

Change-Id: If1fddd56828c93c19499ac8dadb2337b3f2afc46
(cherry picked from commit cd44577546)
This commit is contained in:
Takashi Kajinami 2024-10-05 12:50:00 +09:00
parent a8f26e7ef5
commit d6fa19fa2d
5 changed files with 85 additions and 1 deletions

View File

@ -226,6 +226,34 @@
# Defaults to $facts['os_service_default']
# [*share_max_microversion*]
# Defaults to $facts['os_service_default']
# [*compute_catalog_type*]
# Defaults to $facts['os_service_default']
# [*identity_catalog_type*]
# Defaults to $facts['os_service_default']
# [*image_catalog_type*]
# Defaults to $facts['os_service_default']
# [*network_catalog_type*]
# Defaults to $facts['os_service_default']
# [*object_store_catalog_type*]
# Defaults to $facts['os_service_default']
# [*placement_catalog_type*]
# Defaults to $facts['os_service_default']
# [*volume_catalog_type*]
# Defaults to $facts['os_service_default']
# [*orchestration_catalog_type*]
# Defaults to $facts['os_service_default']
# [*alarming_catalog_type*]
# Defaults to $facts['os_service_default']
# [*metric_catalog_type*]
# Defaults to $facts['os_service_default']
# [*baremetal_catalog_type*]
# Defaults to $facts['os_service_default']
# [*dns_catalog_type*]
# Defaults to $facts['os_service_default']
# [*load_balancer_catalog_type*]
# Defaults to $facts['os_service_default']
# [*share_catalog_type*]
# Defaults to $facts['os_service_default']
# [*img_file*]
# Defaults to '/var/lib/tempest/cirros-0.4.0-x86_64-disk.img'
# [*img_disk_format*]
@ -468,6 +496,21 @@ class tempest(
$baremetal_max_microversion = $facts['os_service_default'],
$share_min_microversion = $facts['os_service_default'],
$share_max_microversion = $facts['os_service_default'],
# catalog type
$compute_catalog_type = $facts['os_service_default'],
$identity_catalog_type = $facts['os_service_default'],
$image_catalog_type = $facts['os_service_default'],
$network_catalog_type = $facts['os_service_default'],
$object_store_catalog_type = $facts['os_service_default'],
$placement_catalog_type = $facts['os_service_default'],
$volume_catalog_type = $facts['os_service_default'],
$orchestration_catalog_type = $facts['os_service_default'],
$alarming_catalog_type = $facts['os_service_default'],
$metric_catalog_type = $facts['os_service_default'],
$baremetal_catalog_type = $facts['os_service_default'],
$dns_catalog_type = $facts['os_service_default'],
$load_balancer_catalog_type = $facts['os_service_default'],
$share_catalog_type = $facts['os_service_default'],
$run_service_broker_tests = $facts['os_service_default'],
$ca_certificates_file = $facts['os_service_default'],
$disable_ssl_validation = $facts['os_service_default'],
@ -713,6 +756,20 @@ class tempest(
'baremetal/max_microversion': value => $baremetal_max_microversion;
'share/min_api_microversion': value => $share_min_microversion;
'share/max_api_microversion': value => $share_max_microversion;
'compute/catalog_type': value => $compute_catalog_type;
'identity/catalog_type': value => $identity_catalog_type;
'image/catalog_type': value => $image_catalog_type;
'network/catalog_type': value => $network_catalog_type;
'object_store/catalog_type': value => $object_store_catalog_type;
'placement/catalog_type': value => $placement_catalog_type;
'volume/catalog_type': value => $volume_catalog_type;
'heat_plugin/catalog_type': value => $orchestration_catalog_type;
'alarming/catalog_type': value => $alarming_catalog_type;
'metric/catalog_type': value => $metric_catalog_type;
'baremetal/catalog_type': value => $baremetal_catalog_type;
'dns/catalog_type': value => $dns_catalog_type;
'load_balancer/catalog_type': value => $load_balancer_catalog_type;
'share/catalog_type': value => $share_catalog_type;
'scenario/img_file': value => $img_file;
'scenario/img_disk_format': value => $img_disk_format;
'service_broker/run_service_broker_tests': value => $run_service_broker_tests;

View File

@ -58,6 +58,10 @@
# (Optional) DNS nameserver to use for ClusterTemplate
# Defaults to $facts['os_service_default']
#
# [*catalog_type*]
# (Optional) Catalog type of the coe service
# Defaults to $facts['os_service_default']
#
# [*manage_tests_packages*]
# (Optional) Manage the plugin package
# Defaults to true
@ -85,6 +89,7 @@ class tempest::magnum (
$magnum_url = $facts['os_service_default'],
$copy_logs = $facts['os_service_default'],
$dns_nameserver = $facts['os_service_default'],
$catalog_type = $facts['os_service_default'],
Boolean $manage_tests_packages = true,
# DEPRECATED PARAMETERS
$keypair_id = undef,
@ -155,6 +160,7 @@ Use the keypair_name parameter.")
'magnum/magnum_url': value => $magnum_url;
'magnum/copy_logs': value => $copy_logs;
'magnum/dns_nameserver': value => $dns_nameserver;
'magnum/catalog_type': value => $catalog_type;
}
# TODO(tkajinam): Remove this after 2025.1

View File

@ -0,0 +1,4 @@
---
features:
- |
The new ``<service>_catalog_type`` parameters have been added.

View File

@ -307,6 +307,20 @@ describe 'tempest' do
is_expected.to contain_tempest_config('baremetal/max_microversion').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_tempest_config('share/min_api_microversion').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_tempest_config('share/max_api_microversion').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_tempest_config('compute/catalog_type').with_value('<SERVICE DEFAULT>')
is_expected.to contain_tempest_config('identity/catalog_type').with_value('<SERVICE DEFAULT>')
is_expected.to contain_tempest_config('image/catalog_type').with_value('<SERVICE DEFAULT>')
is_expected.to contain_tempest_config('network/catalog_type').with_value('<SERVICE DEFAULT>')
is_expected.to contain_tempest_config('object_store/catalog_type').with_value('<SERVICE DEFAULT>')
is_expected.to contain_tempest_config('placement/catalog_type').with_value('<SERVICE DEFAULT>')
is_expected.to contain_tempest_config('volume/catalog_type').with_value('<SERVICE DEFAULT>')
is_expected.to contain_tempest_config('heat_plugin/catalog_type').with_value('<SERVICE DEFAULT>')
is_expected.to contain_tempest_config('alarming/catalog_type').with_value('<SERVICE DEFAULT>')
is_expected.to contain_tempest_config('metric/catalog_type').with_value('<SERVICE DEFAULT>')
is_expected.to contain_tempest_config('baremetal/catalog_type').with_value('<SERVICE DEFAULT>')
is_expected.to contain_tempest_config('dns/catalog_type').with_value('<SERVICE DEFAULT>')
is_expected.to contain_tempest_config('load_balancer/catalog_type').with_value('<SERVICE DEFAULT>')
is_expected.to contain_tempest_config('share/catalog_type').with_value('<SERVICE DEFAULT>')
is_expected.to contain_tempest_config('dns/nameservers').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_tempest_config('heat_plugin/auth_url').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_tempest_config('heat_plugin/auth_version').with(:value => '<SERVICE DEFAULT>')

View File

@ -32,6 +32,7 @@ describe 'tempest::magnum' do
is_expected.to contain_tempest_config('magnum/magnum_url').with_value('<SERVICE DEFAULT>')
is_expected.to contain_tempest_config('magnum/copy_logs').with_value('<SERVICE DEFAULT>')
is_expected.to contain_tempest_config('magnum/dns_nameserver').with_value('<SERVICE DEFAULT>')
is_expected.to contain_tempest_config('magnum/catalog_type').with_value('<SERVICE DEFAULT>')
end
end
@ -47,7 +48,8 @@ describe 'tempest::magnum' do
:provision_keypair => false,
:magnum_url => 'http://magnum/',
:copy_logs => false,
:dns_nameserver => '7.7.7.7'
:dns_nameserver => '7.7.7.7',
:catalog_type => 'container-infra'
})
end
@ -60,6 +62,7 @@ describe 'tempest::magnum' do
is_expected.to contain_tempest_config('magnum/magnum_url').with_value('http://magnum/')
is_expected.to contain_tempest_config('magnum/copy_logs').with_value('false')
is_expected.to contain_tempest_config('magnum/dns_nameserver').with_value('7.7.7.7')
is_expected.to contain_tempest_config('magnum/catalog_type').with_value('container-infra')
end
end
end