hpe3par: Replace redundant hard-coded default values

These values exactly match the default values in cinder.

Change-Id: I38acbdc8eea0d71540ce8c620d839971f047d5f9
This commit is contained in:
Takashi Kajinami 2025-02-26 14:22:55 +09:00
parent 918d9c562a
commit 6e182455e7
2 changed files with 6 additions and 6 deletions

@ -64,11 +64,11 @@
#
# [*hpe3par_iscsi_chap_enabled*]
# (optional) setting to false by default
# Defaults to false.
# Defaults to $facts['os_service_default'].
#
# [*hpe3par_cpg_snap*]
# (optional) set to hpe3par_cfg by default in the cinder driver
# Defaults to 'userCPG'.
# Defaults to $facts['os_service_default'].
#
# [*hpe3par_snapshot_retention*]
# (required) Time in hours for snapshot retention. Must be less
@ -108,8 +108,8 @@ define cinder::backend::hpe3par_iscsi(
$reserved_percentage = $facts['os_service_default'],
$max_over_subscription_ratio = $facts['os_service_default'],
$volume_driver = 'cinder.volume.drivers.hpe.hpe_3par_iscsi.HPE3PARISCSIDriver',
$hpe3par_iscsi_chap_enabled = false,
$hpe3par_cpg_snap = 'userCPG',
$hpe3par_iscsi_chap_enabled = $facts['os_service_default'],
$hpe3par_cpg_snap = $facts['os_service_default'],
$hpe3par_snapshot_retention = 48,
$hpe3par_snapshot_expiration = 72,
Boolean $manage_volume_type = false,

@ -36,8 +36,8 @@ describe 'cinder::backend::hpe3par_iscsi' do
is_expected.to contain_cinder_config('hpe3par_iscsi/san_ip').with_value('172.0.0.2')
is_expected.to contain_cinder_config('hpe3par_iscsi/san_login').with_value('3paradm')
is_expected.to contain_cinder_config('hpe3par_iscsi/san_password').with_value('password').with_secret(true)
is_expected.to contain_cinder_config('hpe3par_iscsi/hpe3par_iscsi_chap_enabled').with_value(false)
is_expected.to contain_cinder_config('hpe3par_iscsi/hpe3par_cpg_snap').with_value('userCPG')
is_expected.to contain_cinder_config('hpe3par_iscsi/hpe3par_iscsi_chap_enabled').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('hpe3par_iscsi/hpe3par_cpg_snap').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('hpe3par_iscsi/hpe3par_snapshot_retention').with_value(48)
is_expected.to contain_cinder_config('hpe3par_iscsi/hpe3par_snapshot_expiration').with_value(72)
}