From c3bf65152c0ad03f9d0b100f788010d3be987249 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 7 Aug 2023 16:04:25 +0900 Subject: [PATCH] Add support for [object-storage] reseller_admin_role This option is required to run some basic swift API tests against RADOS Gateway. Change-Id: I0a2f41bbaec8db43f1798d2215745615cb15140f --- manifests/init.pp | 5 ++++- .../reseller_admin_role-336162abb3b914a1.yaml | 4 ++++ spec/classes/tempest_init_spec.rb | 15 +++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/reseller_admin_role-336162abb3b914a1.yaml diff --git a/manifests/init.pp b/manifests/init.pp index 80c349b2..90300a6e 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -236,7 +236,8 @@ # [*attach_encrypted_volume*] # Defaults to false # [*tempest_roles*] -# Should be an array. +# Defaults to $facts['os_service_default'] +# [*reseller_admin_role*] # Defaults to $facts['os_service_default'] # [*db_flavor_ref*] # Valid primary flavor to use in Trove tests. @@ -362,6 +363,7 @@ class tempest( $default_credentials_domain_name = $facts['os_service_default'], # roles fo the users created by tempest $tempest_roles = $facts['os_service_default'], + $reseller_admin_role = $facts['os_service_default'], # image information $image_ref = undef, $image_ref_alt = undef, @@ -585,6 +587,7 @@ class tempest( 'auth/admin_system': value => $admin_system; 'auth/tempest_roles': value => join(any2array($tempest_roles), ','); 'auth/use_dynamic_credentials': value => $use_dynamic_credentials; + 'object-storage/reseller_admin_role': value => $reseller_admin_role; 'compute/flavor_ref': value => $flavor_ref; 'compute/flavor_ref_alt': value => $flavor_ref_alt; 'compute/image_ref': value => $image_ref; diff --git a/releasenotes/notes/reseller_admin_role-336162abb3b914a1.yaml b/releasenotes/notes/reseller_admin_role-336162abb3b914a1.yaml new file mode 100644 index 00000000..ec7c32b2 --- /dev/null +++ b/releasenotes/notes/reseller_admin_role-336162abb3b914a1.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + The new ``tempest::reseller_admin_role`` parameter has been added. diff --git a/spec/classes/tempest_init_spec.rb b/spec/classes/tempest_init_spec.rb index edae2531..00bdc6c0 100644 --- a/spec/classes/tempest_init_spec.rb +++ b/spec/classes/tempest_init_spec.rb @@ -140,6 +140,20 @@ describe 'tempest' do end end + context 'with reseller_admin_role' do + let :params do + { + :configure_images => false, + :configure_networks => false, + :reseller_admin_role => 'admin', + } + end + + it 'properly sets reseller_admin_role in tempest.conf' do + is_expected.to contain_tempest_config('object-storage/reseller_admin_role').with_value('admin') + end + end + context 'with tempest_roles' do let :params do { @@ -236,6 +250,7 @@ describe 'tempest' do is_expected.to contain_tempest_config('auth/admin_system').with(:value => '') is_expected.to contain_tempest_config('auth/tempest_roles').with(:value => '') is_expected.to contain_tempest_config('auth/use_dynamic_credentials').with(:value => nil) + is_expected.to contain_tempest_config('object-storage/reseller_admin_role').with(:value => '') is_expected.to contain_tempest_config('compute/flavor_ref').with(:value => nil) is_expected.to contain_tempest_config('compute/flavor_ref_alt').with(:value => nil) is_expected.to contain_tempest_config('compute/image_ref').with(:value => nil)