[Pure Storage] Support an array value for pure_iscsi_cidr_list
The pure_iscsi_cidr_list parameter is a ListOpt and accepts a comma- separated list. This allows using a native array value for the parameter so that users can more easily compose the value in manifests. Conflicts: spec/defines/cinder_backend_pure_spec.rb Change-Id: I28dabef27ddccd0d343e4e96e16c943dfb6824ac (cherry picked from commit043edf748a
) (cherry picked from commit0cd364045f
)
This commit is contained in:
parent
2c70433738
commit
c9aa91ecd8
|
@ -63,9 +63,9 @@
|
|||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*pure_iscsi_cidr_list*]
|
||||
# (Optional) Identifies comma-separated list of CIDR of FlashArray
|
||||
# iSCSI targets hosts are allowed to connect to. It supports IPv4
|
||||
# and IPv6 subnets. This parameter supersedes pure_iscsi_cidr.
|
||||
# (Optional) Identifies list of CIDR of FlashArray iSCSI targets hosts are
|
||||
# allowed to connect to. It supports IPv4 and IPv6 subnets. This parameter
|
||||
# supersedes pure_iscsi_cidr.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*extra_options*]
|
||||
|
@ -110,7 +110,7 @@ define cinder::backend::pure(
|
|||
"${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;
|
||||
"${name}/pure_iscsi_cidr_list": value => $pure_iscsi_cidr_list;
|
||||
"${name}/pure_iscsi_cidr_list": value => join(any2array($pure_iscsi_cidr_list), ',');
|
||||
}
|
||||
|
||||
if $manage_volume_type {
|
||||
|
|
|
@ -102,6 +102,16 @@ describe 'cinder::backend::pure' do
|
|||
}
|
||||
end
|
||||
|
||||
context 'pure volume driver with pure_iscsi_cidr_list set to an array' do
|
||||
let :params do
|
||||
req_params.merge({'pure_iscsi_cidr_list' => ['192.0.2.1/24', '192.0.2.2/24']})
|
||||
end
|
||||
|
||||
it {
|
||||
is_expected.to contain_cinder_config('pure/pure_iscsi_cidr_list').with_value('192.0.2.1/24,192.0.2.2/24')
|
||||
}
|
||||
end
|
||||
|
||||
context 'pure volume driver with pure_host_personality set' do
|
||||
let :params do
|
||||
req_params.merge({'pure_host_personality' => 'oracle-vm-server'})
|
||||
|
|
Loading…
Reference in New Issue