Pure Storage driver: Add support for pure_host_personality

This change introduces support for the pure_host_personality parameter
in Pure Storage volume driver.

Change-Id: I933ccfbd779719056ec05196c3d4165c6882f03b
This commit is contained in:
Takashi Kajinami 2021-06-23 22:41:09 +09:00
parent bf00282852
commit 714c56b2a0
3 changed files with 25 additions and 0 deletions

View File

@ -45,6 +45,11 @@
# backend.
# Defaults to True
#
# [*pure_host_personality*]
# (Optional) Determines how the Purity system tunes the protocol used between
# the array and the initiator.
# Defaults to $::os_service_default
#
# [*extra_options*]
# (optional) Hash of extra options to pass to the backend stanza.
# Defaults to: {}
@ -61,6 +66,7 @@ define cinder::backend::pure(
$use_multipath_for_image_xfer = true,
$manage_volume_type = false,
$image_volume_cache_enabled = true,
$pure_host_personality = $::os_service_default,
$extra_options = {},
) {
@ -80,6 +86,7 @@ define cinder::backend::pure(
"${name}/use_chap_auth": value => $use_chap_auth;
"${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;
}
if $manage_volume_type {

View File

@ -0,0 +1,5 @@
---
features:
- |
The new ``pure_host_personality`` parameter has been added to
``cinder::backend::pure``

View File

@ -23,6 +23,7 @@ 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_host_personality').with_value('<SERVICE DEFAULT>')
}
end
@ -42,6 +43,7 @@ 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_host_personality').with_value('<SERVICE DEFAULT>')
}
end
@ -56,6 +58,7 @@ 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_host_personality').with_value('<SERVICE DEFAULT>')
}
end
@ -89,6 +92,16 @@ describe 'cinder::backend::pure' do
is_expected.to contain_cinder_config('pure/image_volume_cache_enabled').with_value('false')
}
end
context 'pure volume driver with pure_host_personality set' do
let :params do
req_params.merge({'pure_host_personality' => 'oracle-vm-server'})
end
it {
is_expected.to contain_cinder_config('pure/pure_host_personality').with_value('oracle-vm-server')
}
end
end
on_supported_os({