[Pure Storage] Add new params for FlashArray Cinder backend

Change-Id: Ia48fa3fa8ce3a3563fdab0966dc5a44f30248bc8
(cherry picked from commit 2eea9e71a1)
This commit is contained in:
Simon Dodsley 2021-11-05 09:29:24 -04:00
parent 3241ff122a
commit e8ecf15961
3 changed files with 32 additions and 0 deletions

View File

@ -50,6 +50,18 @@
# the array and the initiator.
# Defaults to $::os_service_default
#
# [*pure_eradicate_on_delete*]
# (Optional) Determines how the Purity system treates deleted volumes.
# Whether to immeadiately eradicate on delete or leave for auto-eradication
# in 24 hours
# Defaults to $::os_service_default
#
# [*pure_iscsi_cidr*]
# (Optional) Identifies which iSCSI network CIDR should be used for
# iscsi connections to the FlashArray if the array is configured with
# multiple iSCSI VLANs.
# Defaults to $::os_service_default
#
# [*extra_options*]
# (optional) Hash of extra options to pass to the backend stanza.
# Defaults to: {}
@ -67,6 +79,8 @@ define cinder::backend::pure(
$manage_volume_type = false,
$image_volume_cache_enabled = true,
$pure_host_personality = $::os_service_default,
$pure_eradicate_on_delete = $::os_service_default,
$pure_iscsi_cidr = $::os_service_default,
$extra_options = {},
) {
@ -87,6 +101,8 @@ define cinder::backend::pure(
"${name}/use_multipath_for_image_xfer": value => $use_multipath_for_image_xfer;
"${name}/image_volume_cache_enabled": value => $image_volume_cache_enabled;
"${name}/pure_host_personality": value => $pure_host_personality;
"${name}/pure_eradicate_on_delete": value => $pure_eradicate_on_delete;
"${name}/pure_iscsi_cidr": value => $pure_iscsi_cidr;
}
if $manage_volume_type {

View File

@ -0,0 +1,10 @@
---
features:
- |
Add new parameter ``cinder::backend::pure::pure_eradicate_on_delete``
which allows setting of the pure_eradicate_on_delete option on
the managed cinder backend for PureStorage.
- |
Add new parameter ``cinder::backend::pure::pure_iscsi_cidr``
which allows setting of the pure_iscsi_cidr option on the managed
cinder backend for PureStorage.

View File

@ -23,6 +23,8 @@ describe 'cinder::backend::pure' do
is_expected.to contain_cinder_config('pure/use_multipath_for_image_xfer').with_value('true')
is_expected.to contain_cinder_config('pure/use_chap_auth').with_value('false')
is_expected.to contain_cinder_config('pure/image_volume_cache_enabled').with_value('true')
is_expected.to contain_cinder_config('pure/pure_eradicate_on_delete').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('pure/pure_iscsi_cidr').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('pure/pure_host_personality').with_value('<SERVICE DEFAULT>')
}
end
@ -43,6 +45,8 @@ describe 'cinder::backend::pure' do
is_expected.to contain_cinder_config('pure/pure_api_token').with_value('abc123def456ghi789')
is_expected.to contain_cinder_config('pure/use_multipath_for_image_xfer').with_value('true')
is_expected.to contain_cinder_config('pure/use_chap_auth').with_value('true')
is_expected.to contain_cinder_config('pure/pure_eradicate_on_delete').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('pure/pure_iscsi_cidr').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('pure/pure_host_personality').with_value('<SERVICE DEFAULT>')
}
end
@ -58,6 +62,8 @@ describe 'cinder::backend::pure' do
is_expected.to contain_cinder_config('pure/pure_api_token').with_value('abc123def456ghi789')
is_expected.to contain_cinder_config('pure/use_multipath_for_image_xfer').with_value('true')
is_expected.to contain_cinder_config('pure/use_chap_auth').with_value('false')
is_expected.to contain_cinder_config('pure/pure_eradicate_on_delete').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('pure/pure_iscsi_cidr').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('pure/pure_host_personality').with_value('<SERVICE DEFAULT>')
}
end