Support customizing catalog_type options

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

Conflicts:
	manifests/init.pp
	manifests/magnum.pp
	spec/classes/tempest_magnum_spec.rb

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

View File

@ -226,6 +226,34 @@
# Defaults to $facts['os_service_default'] # Defaults to $facts['os_service_default']
# [*share_max_microversion*] # [*share_max_microversion*]
# Defaults to $facts['os_service_default'] # 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']
# [*keystone_v3*] # [*keystone_v3*]
# Defaults to $facts['os_service_default'] # Defaults to $facts['os_service_default']
# [*auth_version*] # [*auth_version*]
@ -490,6 +518,21 @@ class tempest(
$baremetal_max_microversion = $facts['os_service_default'], $baremetal_max_microversion = $facts['os_service_default'],
$share_min_microversion = $facts['os_service_default'], $share_min_microversion = $facts['os_service_default'],
$share_max_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'],
$keystone_v3 = $facts['os_service_default'], $keystone_v3 = $facts['os_service_default'],
$auth_version = $facts['os_service_default'], $auth_version = $facts['os_service_default'],
$run_service_broker_tests = $facts['os_service_default'], $run_service_broker_tests = $facts['os_service_default'],
@ -765,6 +808,20 @@ class tempest(
'baremetal/max_microversion': value => $baremetal_max_microversion; 'baremetal/max_microversion': value => $baremetal_max_microversion;
'share/min_api_microversion': value => $share_min_microversion; 'share/min_api_microversion': value => $share_min_microversion;
'share/max_api_microversion': value => $share_max_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;
'cli/cli_dir': value => pick($cli_dir, $facts['os_service_default']); 'cli/cli_dir': value => pick($cli_dir, $facts['os_service_default']);
'scenario/img_file': value => $img_file; 'scenario/img_file': value => $img_file;
'scenario/img_disk_format': value => $img_disk_format; 'scenario/img_disk_format': value => $img_disk_format;

View File

@ -61,6 +61,10 @@
# (Optional) DNS nameserver to use for ClusterTemplate # (Optional) DNS nameserver to use for ClusterTemplate
# Defaults to '8.8.8.8' # Defaults to '8.8.8.8'
# #
# [*catalog_type*]
# (Optional) Catalog type of the coe service
# Defaults to $facts['os_service_default']
#
# [*manage_tests_packages*] # [*manage_tests_packages*]
# (Optional) Manage the plugin package # (Optional) Manage the plugin package
# Defaults to true # Defaults to true
@ -80,6 +84,7 @@ class tempest::magnum (
$magnum_url = undef, $magnum_url = undef,
$copy_logs = true, $copy_logs = true,
$dns_nameserver = '8.8.8.8', $dns_nameserver = '8.8.8.8',
$catalog_type = $facts['os_service_default'],
Boolean $manage_tests_packages = true, Boolean $manage_tests_packages = true,
) { ) {
include tempest::params include tempest::params
@ -137,5 +142,6 @@ class tempest::magnum (
'magnum/magnum_url': value => $magnum_url; 'magnum/magnum_url': value => $magnum_url;
'magnum/copy_logs': value => $copy_logs; 'magnum/copy_logs': value => $copy_logs;
'magnum/dns_nameserver': value => $dns_nameserver; 'magnum/dns_nameserver': value => $dns_nameserver;
'magnum/catalog_type': value => $catalog_type;
} }
} }

View File

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

View File

@ -308,6 +308,20 @@ describe 'tempest' do
is_expected.to contain_tempest_config('baremetal/max_microversion').with(:value => '<SERVICE DEFAULT>') 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/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('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('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_url').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_tempest_config('heat_plugin/auth_version').with(:value => '<SERVICE DEFAULT>') is_expected.to contain_tempest_config('heat_plugin/auth_version').with(:value => '<SERVICE DEFAULT>')

View File

@ -23,6 +23,7 @@ describe 'tempest::magnum' do
is_expected.to contain_tempest_config('magnum/master_flavor_id').with_value('m1.magnum') is_expected.to contain_tempest_config('magnum/master_flavor_id').with_value('m1.magnum')
is_expected.to contain_tempest_config('magnum/copy_logs').with_value('true') is_expected.to contain_tempest_config('magnum/copy_logs').with_value('true')
is_expected.to contain_tempest_config('magnum/dns_nameserver').with_value('8.8.8.8') is_expected.to contain_tempest_config('magnum/dns_nameserver').with_value('8.8.8.8')
is_expected.to contain_tempest_config('magnum/catalog_type').with_value('<SERVICE DEFAULT>')
end end
end end
@ -38,7 +39,8 @@ describe 'tempest::magnum' do
:provision_keypair => false, :provision_keypair => false,
:magnum_url => 'http://magnum/', :magnum_url => 'http://magnum/',
:copy_logs => false, :copy_logs => false,
:dns_nameserver => '7.7.7.7' :dns_nameserver => '7.7.7.7',
:catalog_type => 'container-infra'
}) })
end end
@ -51,6 +53,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/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/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/dns_nameserver').with_value('7.7.7.7')
is_expected.to contain_tempest_config('magnum/catalog_type').with_value('container-infra')
end end
end end
end end