Changes in EMC VNX
- added configuration for hardcoded parameters - added new parameters according to docs [0] - update tests - added release note [0] http://docs.openstack.org/mitaka/config-reference/block-storage/drivers/emc-vnx-driver.html Change-Id: Ia97ef935a71c3ccf41c54471597be89a5486fb0b
This commit is contained in:
parent
c99098602a
commit
cb8e2d576e
@ -44,32 +44,62 @@
|
||||
# Example :
|
||||
# { 'emc_vnx_backend/param1' => { 'value' => value1 } }
|
||||
#
|
||||
# [*volume_driver*]
|
||||
# (optional) The EMC VNX Driver you want to use
|
||||
# Defaults to cinder.volume.drivers.emc.emc_cli_iscsi.EMCCLIISCSIDriver
|
||||
#
|
||||
# [*initiator_auto_registration*]
|
||||
# (optinal) Automatically register initiators.
|
||||
# Boolean value.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*storage_vnx_auth_type*]
|
||||
# (optional) VNX authentication scope type.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*storage_vnx_security_file_dir*]
|
||||
# (optional) Directory path that contains the VNX security file.
|
||||
# Make sure the security file is generated first.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*naviseccli_path*]
|
||||
# (optional) Naviseccli Path.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
define cinder::backend::emc_vnx (
|
||||
$iscsi_ip_address,
|
||||
$san_ip,
|
||||
$san_password,
|
||||
$storage_vnx_pool_name,
|
||||
$default_timeout = '10',
|
||||
$max_luns_per_storage_group = '256',
|
||||
$package_ensure = 'present',
|
||||
$san_login = 'admin',
|
||||
$volume_backend_name = $name,
|
||||
$extra_options = {},
|
||||
$default_timeout = '10',
|
||||
$max_luns_per_storage_group = '256',
|
||||
$package_ensure = 'present',
|
||||
$san_login = 'admin',
|
||||
$volume_backend_name = $name,
|
||||
$extra_options = {},
|
||||
$volume_driver = 'cinder.volume.drivers.emc.emc_cli_iscsi.EMCCLIISCSIDriver',
|
||||
$initiator_auto_registration = $::os_service_default,
|
||||
$storage_vnx_auth_type = $::os_service_default,
|
||||
$storage_vnx_security_file_dir = $::os_service_default,
|
||||
$naviseccli_path = $::os_service_default,
|
||||
) {
|
||||
|
||||
include ::cinder::params
|
||||
|
||||
cinder_config {
|
||||
"${name}/default_timeout": value => $default_timeout;
|
||||
"${name}/iscsi_ip_address": value => $iscsi_ip_address;
|
||||
"${name}/max_luns_per_storage_group": value => $max_luns_per_storage_group;
|
||||
"${name}/naviseccli_path": value => '/opt/Navisphere/bin/naviseccli';
|
||||
"${name}/san_ip": value => $san_ip;
|
||||
"${name}/san_login": value => $san_login;
|
||||
"${name}/san_password": value => $san_password;
|
||||
"${name}/storage_vnx_pool_name": value => $storage_vnx_pool_name;
|
||||
"${name}/volume_backend_name": value => $volume_backend_name;
|
||||
"${name}/volume_driver": value => 'cinder.volume.drivers.emc.emc_cli_iscsi.EMCCLIISCSIDriver';
|
||||
"${name}/default_timeout": value => $default_timeout;
|
||||
"${name}/iscsi_ip_address": value => $iscsi_ip_address;
|
||||
"${name}/max_luns_per_storage_group": value => $max_luns_per_storage_group;
|
||||
"${name}/naviseccli_path": value => $naviseccli_path;
|
||||
"${name}/san_ip": value => $san_ip;
|
||||
"${name}/san_login": value => $san_login;
|
||||
"${name}/san_password": value => $san_password;
|
||||
"${name}/storage_vnx_pool_name": value => $storage_vnx_pool_name;
|
||||
"${name}/volume_backend_name": value => $volume_backend_name;
|
||||
"${name}/volume_driver": value => $volume_driver;
|
||||
"${name}/initiator_auto_registration": value => $initiator_auto_registration;
|
||||
"${name}/storage_vnx_authentication_type": value => $storage_vnx_auth_type;
|
||||
"${name}/storage_vnx_security_file_dir": value => $storage_vnx_security_file_dir;
|
||||
}
|
||||
|
||||
create_resources('cinder_config', $extra_options)
|
||||
|
@ -39,28 +39,60 @@
|
||||
# Example :
|
||||
# { 'emc_vnx_backend/param1' => { 'value' => value1 } }
|
||||
#
|
||||
# [*volume_driver*]
|
||||
# (optional) The EMC VNX Driver you want to use
|
||||
# Defaults to cinder.volume.drivers.emc.emc_cli_iscsi.EMCCLIISCSIDriver
|
||||
#
|
||||
# [*initiator_auto_registration*]
|
||||
# (optinal) Automatically register initiators.
|
||||
# Boolean value.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*storage_vnx_auth_type*]
|
||||
# (optional) VNX authentication scope type.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*storage_vnx_security_file_dir*]
|
||||
# (optional) Directory path that contains the VNX security file.
|
||||
# Make sure the security file is generated first.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*naviseccli_path*]
|
||||
# (optional) Naviseccli Path.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
class cinder::volume::emc_vnx(
|
||||
$iscsi_ip_address,
|
||||
$san_ip,
|
||||
$san_password,
|
||||
$storage_vnx_pool_name,
|
||||
$default_timeout = '10',
|
||||
$max_luns_per_storage_group = '256',
|
||||
$package_ensure = 'present',
|
||||
$san_login = 'admin',
|
||||
$extra_options = {},
|
||||
$default_timeout = '10',
|
||||
$max_luns_per_storage_group = '256',
|
||||
$package_ensure = 'present',
|
||||
$san_login = 'admin',
|
||||
$extra_options = {},
|
||||
$volume_driver = 'cinder.volume.drivers.emc.emc_cli_iscsi.EMCCLIISCSIDriver',
|
||||
$initiator_auto_registration = $::os_service_default,
|
||||
$storage_vnx_auth_type = $::os_service_default,
|
||||
$storage_vnx_security_file_dir = $::os_service_default,
|
||||
$naviseccli_path = $::os_service_default,
|
||||
) {
|
||||
|
||||
cinder::backend::emc_vnx { 'DEFAULT':
|
||||
default_timeout => $default_timeout,
|
||||
iscsi_ip_address => $iscsi_ip_address,
|
||||
max_luns_per_storage_group => $max_luns_per_storage_group,
|
||||
package_ensure => $package_ensure,
|
||||
san_ip => $san_ip,
|
||||
san_login => $san_login,
|
||||
san_password => $san_password,
|
||||
storage_vnx_pool_name => $storage_vnx_pool_name,
|
||||
extra_options => $extra_options,
|
||||
default_timeout => $default_timeout,
|
||||
iscsi_ip_address => $iscsi_ip_address,
|
||||
max_luns_per_storage_group => $max_luns_per_storage_group,
|
||||
package_ensure => $package_ensure,
|
||||
san_ip => $san_ip,
|
||||
san_login => $san_login,
|
||||
san_password => $san_password,
|
||||
storage_vnx_pool_name => $storage_vnx_pool_name,
|
||||
extra_options => $extra_options,
|
||||
volume_driver => $volume_driver,
|
||||
initiator_auto_registration => $initiator_auto_registration,
|
||||
storage_vnx_auth_type => $storage_vnx_auth_type,
|
||||
storage_vnx_security_file_dir => $storage_vnx_security_file_dir,
|
||||
naviseccli_path => $naviseccli_path,
|
||||
}
|
||||
|
||||
}
|
||||
|
4
releasenotes/notes/emc_vnx_driver-359208e3eeeaabf7.yaml
Normal file
4
releasenotes/notes/emc_vnx_driver-359208e3eeeaabf7.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
upgrade:
|
||||
- allow to configure previously hardcoded parameters
|
||||
and add more options in emc vnx.
|
@ -12,7 +12,7 @@ describe 'cinder::volume::emc_vnx' do
|
||||
end
|
||||
|
||||
let :facts do
|
||||
{:osfamily => 'Redhat' }
|
||||
OSDefaults.get_facts({:osfamily => 'Redhat' })
|
||||
end
|
||||
|
||||
let :params do
|
||||
@ -27,9 +27,32 @@ describe 'cinder::volume::emc_vnx' do
|
||||
is_expected.to contain_cinder_config('DEFAULT/san_password').with_value('password')
|
||||
is_expected.to contain_cinder_config('DEFAULT/iscsi_ip_address').with_value('127.0.0.3')
|
||||
is_expected.to contain_cinder_config('DEFAULT/storage_vnx_pool_name').with_value('emc-storage-pool')
|
||||
is_expected.to contain_cinder_config('DEFAULT/initiator_auto_registration').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_cinder_config('DEFAULT/storage_vnx_authentication_type').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_cinder_config('DEFAULT/storage_vnx_security_file_dir').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_cinder_config('DEFAULT/naviseccli_path').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
end
|
||||
|
||||
describe 'emc vnx backend overriding some parameters' do
|
||||
before :each do
|
||||
req_params.merge!({
|
||||
:initiator_auto_registration => true,
|
||||
:storage_vnx_auth_type => 'global',
|
||||
:storage_vnx_security_file_dir => '/etc/secfile/array1',
|
||||
:naviseccli_path => '/opt/Navisphere/bin/naviseccli',
|
||||
})
|
||||
end
|
||||
|
||||
it 'configure emc vnx volume driver' do
|
||||
is_expected.to contain_cinder_config('DEFAULT/initiator_auto_registration').with_value(req_params[:initiator_auto_registration])
|
||||
is_expected.to contain_cinder_config('DEFAULT/storage_vnx_authentication_type').with_value(req_params[:storage_vnx_auth_type])
|
||||
is_expected.to contain_cinder_config('DEFAULT/storage_vnx_security_file_dir').with_value(req_params[:storage_vnx_security_file_dir])
|
||||
is_expected.to contain_cinder_config('DEFAULT/naviseccli_path').with_value(req_params[:naviseccli_path])
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
describe 'emc vnx volume driver with additional configuration' do
|
||||
before :each do
|
||||
params.merge!({:extra_options => {'emc_vnx_backend/param1' => {'value' => 'value1'}}})
|
||||
|
@ -14,7 +14,7 @@ describe 'cinder::backend::emc_vnx' do
|
||||
end
|
||||
|
||||
let :facts do
|
||||
{:osfamily => 'Redhat' }
|
||||
OSDefaults.get_facts({:osfamily => 'Redhat' })
|
||||
end
|
||||
|
||||
let :params do
|
||||
@ -29,6 +29,29 @@ describe 'cinder::backend::emc_vnx' do
|
||||
is_expected.to contain_cinder_config('emc/san_password').with_value('password')
|
||||
is_expected.to contain_cinder_config('emc/iscsi_ip_address').with_value('127.0.0.3')
|
||||
is_expected.to contain_cinder_config('emc/storage_vnx_pool_name').with_value('emc-storage-pool')
|
||||
is_expected.to contain_cinder_config('emc/initiator_auto_registration').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_cinder_config('emc/storage_vnx_authentication_type').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_cinder_config('emc/storage_vnx_security_file_dir').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_cinder_config('emc/naviseccli_path').with_value('<SERVICE DEFAULT>')
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
describe 'emc vnx backend overriding some parameters' do
|
||||
before :each do
|
||||
params.merge!({
|
||||
:initiator_auto_registration => true,
|
||||
:storage_vnx_auth_type => 'global',
|
||||
:storage_vnx_security_file_dir => '/etc/secfile/array1',
|
||||
:naviseccli_path => '/opt/Navisphere/bin/naviseccli',
|
||||
})
|
||||
end
|
||||
|
||||
it 'configure emc vnx volume driver' do
|
||||
is_expected.to contain_cinder_config('emc/initiator_auto_registration').with_value(params[:initiator_auto_registration])
|
||||
is_expected.to contain_cinder_config('emc/storage_vnx_authentication_type').with_value(params[:storage_vnx_auth_type])
|
||||
is_expected.to contain_cinder_config('emc/storage_vnx_security_file_dir').with_value(params[:storage_vnx_security_file_dir])
|
||||
is_expected.to contain_cinder_config('emc/naviseccli_path').with_value(params[:naviseccli_path])
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user