From cc803f5b9cdb4c989d6159769be984c270eea822 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sat, 20 Apr 2024 23:39:40 +0900 Subject: [PATCH] magnum: Use service default if possible ... instead of hard-coding the same default value. Change-Id: I6c17070d9a82170a2caaaf6acf7a8bbb383b238a --- manifests/magnum.pp | 16 ++++++++-------- spec/classes/tempest_magnum_spec.rb | 5 +++-- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/manifests/magnum.pp b/manifests/magnum.pp index 04ea57e9..34693f73 100644 --- a/manifests/magnum.pp +++ b/manifests/magnum.pp @@ -47,19 +47,19 @@ # # [*nic_id*] # (Optional) The nic_id parameter used in Magnum tempest configuration -# Defaults to 'public' +# Defaults to $facts['os_service_default'] # # [*magnum_url*] # (Optional) Bypass URL for Magnum to skip service catalog lookup -# Defaults to undef +# Defaults to $facts['os_service_default'] # # [*copy_logs*] # (Optional) Whether to copy nova server logs on failure -# Defaults to true +# Defaults to $facts['os_service_default'] # # [*dns_nameserver*] # (Optional) DNS nameserver to use for ClusterTemplate -# Defaults to '8.8.8.8' +# Defaults to $facts['os_service_default'] # # [*manage_tests_packages*] # (Optional) Manage the plugin package @@ -82,10 +82,10 @@ class tempest::magnum ( String[1] $master_flavor_id = 'm1.magnum', Boolean $provision_keypair = false, $keypair_name = $facts['os_service_default'], - $nic_id = 'public', - $magnum_url = undef, - $copy_logs = true, - $dns_nameserver = '8.8.8.8', + $nic_id = $facts['os_service_default'], + $magnum_url = $facts['os_service_default'], + $copy_logs = $facts['os_service_default'], + $dns_nameserver = $facts['os_service_default'], Boolean $manage_tests_packages = true, # DEPRECATED PARAMETERS $keypair_id = undef, diff --git a/spec/classes/tempest_magnum_spec.rb b/spec/classes/tempest_magnum_spec.rb index 76b866cb..49a98e5b 100644 --- a/spec/classes/tempest_magnum_spec.rb +++ b/spec/classes/tempest_magnum_spec.rb @@ -21,8 +21,9 @@ describe 'tempest::magnum' do is_expected.to contain_tempest_config('magnum/keypair_name').with_value('') is_expected.to contain_tempest_config('magnum/flavor_id').with_value('s1.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/dns_nameserver').with_value('8.8.8.8') + is_expected.to contain_tempest_config('magnum/magnum_url').with_value('') + is_expected.to contain_tempest_config('magnum/copy_logs').with_value('') + is_expected.to contain_tempest_config('magnum/dns_nameserver').with_value('') end end