From 849acae47bf3ac974bdf8b171d92fd438452b7ce Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sat, 5 Oct 2024 12:50:00 +0900 Subject: [PATCH] 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 cd44577546e66ce4c1806e2e8e31e21e5a818904) (cherry picked from commit d6fa19fa2d6978d0f7ec6b22790c532fac2cabad) --- manifests/init.pp | 57 +++++++++++++++++++ manifests/magnum.pp | 6 ++ .../notes/catalog_type-0911aa0e76ec8d9c.yaml | 4 ++ spec/classes/tempest_init_spec.rb | 14 +++++ spec/classes/tempest_magnum_spec.rb | 5 +- 5 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/catalog_type-0911aa0e76ec8d9c.yaml diff --git a/manifests/init.pp b/manifests/init.pp index 5403c1d5..9b91e4da 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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'] # [*keystone_v3*] # Defaults to $facts['os_service_default'] # [*auth_version*] @@ -490,6 +518,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'], $keystone_v3 = $facts['os_service_default'], $auth_version = $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; '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; 'cli/cli_dir': value => pick($cli_dir, $facts['os_service_default']); 'scenario/img_file': value => $img_file; 'scenario/img_disk_format': value => $img_disk_format; diff --git a/manifests/magnum.pp b/manifests/magnum.pp index fd8e810d..267f2fd8 100644 --- a/manifests/magnum.pp +++ b/manifests/magnum.pp @@ -61,6 +61,10 @@ # (Optional) DNS nameserver to use for ClusterTemplate # Defaults to '8.8.8.8' # +# [*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 @@ -80,6 +84,7 @@ class tempest::magnum ( $magnum_url = undef, $copy_logs = true, $dns_nameserver = '8.8.8.8', + $catalog_type = $facts['os_service_default'], Boolean $manage_tests_packages = true, ) { include tempest::params @@ -137,5 +142,6 @@ class tempest::magnum ( 'magnum/magnum_url': value => $magnum_url; 'magnum/copy_logs': value => $copy_logs; 'magnum/dns_nameserver': value => $dns_nameserver; + 'magnum/catalog_type': value => $catalog_type; } } diff --git a/releasenotes/notes/catalog_type-0911aa0e76ec8d9c.yaml b/releasenotes/notes/catalog_type-0911aa0e76ec8d9c.yaml new file mode 100644 index 00000000..5daab28e --- /dev/null +++ b/releasenotes/notes/catalog_type-0911aa0e76ec8d9c.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + The new ``_catalog_type`` parameters have been added. diff --git a/spec/classes/tempest_init_spec.rb b/spec/classes/tempest_init_spec.rb index 2589ce6b..c2064616 100644 --- a/spec/classes/tempest_init_spec.rb +++ b/spec/classes/tempest_init_spec.rb @@ -308,6 +308,20 @@ describe 'tempest' do is_expected.to contain_tempest_config('baremetal/max_microversion').with(:value => '') is_expected.to contain_tempest_config('share/min_api_microversion').with(:value => '') is_expected.to contain_tempest_config('share/max_api_microversion').with(:value => '') + is_expected.to contain_tempest_config('compute/catalog_type').with_value('') + is_expected.to contain_tempest_config('identity/catalog_type').with_value('') + is_expected.to contain_tempest_config('image/catalog_type').with_value('') + is_expected.to contain_tempest_config('network/catalog_type').with_value('') + is_expected.to contain_tempest_config('object_store/catalog_type').with_value('') + is_expected.to contain_tempest_config('placement/catalog_type').with_value('') + is_expected.to contain_tempest_config('volume/catalog_type').with_value('') + is_expected.to contain_tempest_config('heat_plugin/catalog_type').with_value('') + is_expected.to contain_tempest_config('alarming/catalog_type').with_value('') + is_expected.to contain_tempest_config('metric/catalog_type').with_value('') + is_expected.to contain_tempest_config('baremetal/catalog_type').with_value('') + is_expected.to contain_tempest_config('dns/catalog_type').with_value('') + is_expected.to contain_tempest_config('load_balancer/catalog_type').with_value('') + is_expected.to contain_tempest_config('share/catalog_type').with_value('') is_expected.to contain_tempest_config('dns/nameservers').with(:value => '') is_expected.to contain_tempest_config('heat_plugin/auth_url').with(:value => '') is_expected.to contain_tempest_config('heat_plugin/auth_version').with(:value => '') diff --git a/spec/classes/tempest_magnum_spec.rb b/spec/classes/tempest_magnum_spec.rb index 66ffe80d..fb6b148f 100644 --- a/spec/classes/tempest_magnum_spec.rb +++ b/spec/classes/tempest_magnum_spec.rb @@ -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/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/catalog_type').with_value('') end end @@ -38,7 +39,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 @@ -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/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