magnum: Use service default if possible

... instead of hard-coding the same default value.

Change-Id: I6c17070d9a82170a2caaaf6acf7a8bbb383b238a
This commit is contained in:
Takashi Kajinami 2024-04-20 23:39:40 +09:00
parent fbeaf416ee
commit cc803f5b9c
2 changed files with 11 additions and 10 deletions

View File

@ -47,19 +47,19 @@
# #
# [*nic_id*] # [*nic_id*]
# (Optional) The nic_id parameter used in Magnum tempest configuration # (Optional) The nic_id parameter used in Magnum tempest configuration
# Defaults to 'public' # Defaults to $facts['os_service_default']
# #
# [*magnum_url*] # [*magnum_url*]
# (Optional) Bypass URL for Magnum to skip service catalog lookup # (Optional) Bypass URL for Magnum to skip service catalog lookup
# Defaults to undef # Defaults to $facts['os_service_default']
# #
# [*copy_logs*] # [*copy_logs*]
# (Optional) Whether to copy nova server logs on failure # (Optional) Whether to copy nova server logs on failure
# Defaults to true # Defaults to $facts['os_service_default']
# #
# [*dns_nameserver*] # [*dns_nameserver*]
# (Optional) DNS nameserver to use for ClusterTemplate # (Optional) DNS nameserver to use for ClusterTemplate
# Defaults to '8.8.8.8' # Defaults to $facts['os_service_default']
# #
# [*manage_tests_packages*] # [*manage_tests_packages*]
# (Optional) Manage the plugin package # (Optional) Manage the plugin package
@ -82,10 +82,10 @@ class tempest::magnum (
String[1] $master_flavor_id = 'm1.magnum', String[1] $master_flavor_id = 'm1.magnum',
Boolean $provision_keypair = false, Boolean $provision_keypair = false,
$keypair_name = $facts['os_service_default'], $keypair_name = $facts['os_service_default'],
$nic_id = 'public', $nic_id = $facts['os_service_default'],
$magnum_url = undef, $magnum_url = $facts['os_service_default'],
$copy_logs = true, $copy_logs = $facts['os_service_default'],
$dns_nameserver = '8.8.8.8', $dns_nameserver = $facts['os_service_default'],
Boolean $manage_tests_packages = true, Boolean $manage_tests_packages = true,
# DEPRECATED PARAMETERS # DEPRECATED PARAMETERS
$keypair_id = undef, $keypair_id = undef,

View File

@ -21,8 +21,9 @@ describe 'tempest::magnum' do
is_expected.to contain_tempest_config('magnum/keypair_name').with_value('<SERVICE DEFAULT>') is_expected.to contain_tempest_config('magnum/keypair_name').with_value('<SERVICE DEFAULT>')
is_expected.to contain_tempest_config('magnum/flavor_id').with_value('s1.magnum') 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/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/magnum_url').with_value('<SERVICE DEFAULT>')
is_expected.to contain_tempest_config('magnum/dns_nameserver').with_value('8.8.8.8') 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>')
end end
end end