[Pure Storage] Add NVMe support for FlashArray Cinder backend
Add support for NVMe to cinder::backend::pure_storage_protocol and new parameters cinder::backend::pure::pure_nvme_transport, cinder::backend::pure::pure_nvme_cidr and cinder::backend::pure::pure_nvme_cidr_list for Pure Storage FlashArray Cinder backend. Change-Id: I7e1172b3048e6bf84be7dad4d193f10e9b15138e
This commit is contained in:
parent
7a534f41e0
commit
2519bd4f81
|
@ -22,8 +22,9 @@
|
|||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*pure_storage_protocol*]
|
||||
# (optional) Must be either 'iSCSI' or 'FC'. This will determine
|
||||
# which Volume Driver will be configured; PureISCSIDriver or PureFCDriver.
|
||||
# (optional) Must be either 'iSCSI', 'FC' or 'NVMe'. This will determine
|
||||
# which Volume Driver will be configured; PureISCSIDriver, PureFCDriver
|
||||
# or PureNVMEDriver.
|
||||
# Defaults to 'iSCSI'
|
||||
#
|
||||
# [*use_chap_auth*]
|
||||
|
@ -56,6 +57,23 @@
|
|||
# in 24 hours
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*pure_nvme_transport*]
|
||||
# (Optional) Identifies which NVMe transport layer to be used with
|
||||
# the NVMe driver.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*pure_nvme_cidr*]
|
||||
# (Optional) Identifies which NVMe network CIDR should be used for
|
||||
# NVMe connections to the FlashArray if the array is configured with
|
||||
# multiple NVMe VLANs.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*pure_nvme_cidr_list*]
|
||||
# (Optional) Identifies list of CIDR of FlashArray NVMe targets hosts
|
||||
# are allowed to connect to. It supports IPv4 and IPv6 subnets. This
|
||||
# parameter supercedes pure_nvme_cidr.
|
||||
# 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
|
||||
|
@ -86,6 +104,9 @@ define cinder::backend::pure(
|
|||
$image_volume_cache_enabled = true,
|
||||
$pure_host_personality = $::os_service_default,
|
||||
$pure_eradicate_on_delete = $::os_service_default,
|
||||
$pure_nvme_transport = $::os_service_default,
|
||||
$pure_nvme_cidr = $::os_service_default,
|
||||
$pure_nvme_cidr_list = $::os_service_default,
|
||||
$pure_iscsi_cidr = $::os_service_default,
|
||||
$pure_iscsi_cidr_list = $::os_service_default,
|
||||
$extra_options = {},
|
||||
|
@ -95,7 +116,8 @@ define cinder::backend::pure(
|
|||
|
||||
$volume_driver = $pure_storage_protocol ? {
|
||||
'FC' => 'cinder.volume.drivers.pure.PureFCDriver',
|
||||
'iSCSI' => 'cinder.volume.drivers.pure.PureISCSIDriver'
|
||||
'iSCSI' => 'cinder.volume.drivers.pure.PureISCSIDriver',
|
||||
'NVMe' => 'cinder.volume.drivers.pure.PureNVMEDriver'
|
||||
}
|
||||
|
||||
cinder_config {
|
||||
|
@ -109,6 +131,9 @@ define cinder::backend::pure(
|
|||
"${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_nvme_transport": value => $pure_nvme_transport;
|
||||
"${name}/pure_nvme_cidr": value => $pure_nvme_cidr;
|
||||
"${name}/pure_nvme_cidr_list": value => join(any2array($pure_nvme_cidr_list), ',');
|
||||
"${name}/pure_iscsi_cidr": value => $pure_iscsi_cidr;
|
||||
"${name}/pure_iscsi_cidr_list": value => $pure_iscsi_cidr_list;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
features:
|
||||
- |
|
||||
Add support for NVMe to ``cinder::backend::pure_storage_protocol``.
|
||||
Add new parameter ``cinder::backend::pure::pure_nvme_transport``
|
||||
which defines the NVMe transport layer used when the NVMe
|
||||
driver is selected. This only supports ``roce`` at this time.
|
||||
Add new parameter ``cinder::backend::pure::pure_nvme_cidr``
|
||||
which allows setting of the pure_nvme_cidr option on the managed
|
||||
cinder backend for PureStorage.
|
||||
Add new parameter ``cinder::backend::pure::pure_nvme_cidr_list``
|
||||
which allows setting of the pure_nvme_cidr_list option on the managed
|
||||
cinder backend for PureStorage.
|
|
@ -65,8 +65,24 @@ 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/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_iscsi_cidr_list').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_cinder_config('pure/pure_host_personality').with_value('<SERVICE DEFAULT>')
|
||||
}
|
||||
end
|
||||
|
||||
context 'pure nvme volume driver' do
|
||||
let :params do
|
||||
req_params.merge({'pure_storage_protocol' => 'NVMe'})
|
||||
end
|
||||
|
||||
it {
|
||||
is_expected.to contain_cinder_config('pure/volume_driver').with_value('cinder.volume.drivers.pure.PureNVMEDriver')
|
||||
is_expected.to contain_cinder_config('pure/san_ip').with_value('127.0.0.2')
|
||||
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_nvme_cidr').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_cinder_config('pure/pure_nvme_transport').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_cinder_config('pure/pure_host_personality').with_value('<SERVICE DEFAULT>')
|
||||
}
|
||||
end
|
||||
|
@ -102,6 +118,16 @@ describe 'cinder::backend::pure' do
|
|||
}
|
||||
end
|
||||
|
||||
context 'pure volume driver with pure_nvme_cidr_list set to an array' do
|
||||
let :params do
|
||||
req_params.merge({'pure_nvme_cidr_list' => ['192.0.3.1/24', '192.0.3.2/24']})
|
||||
end
|
||||
|
||||
it {
|
||||
is_expected.to contain_cinder_config('pure/pure_nvme_cidr_list').with_value('192.0.3.1/24,192.0.3.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