Dell SC: Add exclude_domain_ip option

This option allows users to exclude some fault domains.
Otherwise all domains are returned.

Closes-Bug: #1681488
Change-Id: I8ac91e6720e52da9cf7480f80bcfb456bf0c2433
This commit is contained in:
rajinir 2017-04-10 10:55:04 -05:00
parent 219ea60a20
commit a57b3d7474
4 changed files with 14 additions and 0 deletions

View File

@ -43,6 +43,10 @@
# (optional) The ISCSI IP Port of the Storage Center. # (optional) The ISCSI IP Port of the Storage Center.
# Defaults to $::os_service_default # Defaults to $::os_service_default
# #
# [*excluded_domain_ip*]
# (optional) Domain IP to be excluded from iSCSI returns of Storage Center.
# Defaults to $::os_service_default
#
# [*extra_options*] # [*extra_options*]
# (optional) Hash of extra options to pass to the backend stanza. # (optional) Hash of extra options to pass to the backend stanza.
# Defaults to: {} # Defaults to: {}
@ -67,6 +71,7 @@ define cinder::backend::dellsc_iscsi (
$dell_sc_verify_cert = $::os_service_default, $dell_sc_verify_cert = $::os_service_default,
$dell_sc_volume_folder = 'vol', $dell_sc_volume_folder = 'vol',
$iscsi_port = $::os_service_default, $iscsi_port = $::os_service_default,
$excluded_domain_ip = $::os_service_default,
$manage_volume_type = false, $manage_volume_type = false,
$extra_options = {}, $extra_options = {},
) { ) {
@ -97,6 +102,7 @@ default of \"vol\" and will be changed to the upstream OpenStack default in N-re
"${name}/dell_sc_verify_cert": value => $dell_sc_verify_cert; "${name}/dell_sc_verify_cert": value => $dell_sc_verify_cert;
"${name}/dell_sc_volume_folder": value => $dell_sc_volume_folder; "${name}/dell_sc_volume_folder": value => $dell_sc_volume_folder;
"${name}/iscsi_port": value => $iscsi_port; "${name}/iscsi_port": value => $iscsi_port;
"${name}/excluded_domain_ip": value => $excluded_domain_ip;
} }
if $manage_volume_type { if $manage_volume_type {

View File

@ -39,6 +39,10 @@
# (optional) The Storage Center iSCSI IP port. # (optional) The Storage Center iSCSI IP port.
# Defaults to $::os_service_default # Defaults to $::os_service_default
# #
# [*excluded_domain_ip*]
# (optional) Domain IP to be excluded from iSCSI returns of Storage Center.
# Defaults to $::os_service_default
#
# [*extra_options*] # [*extra_options*]
# (optional) Hash of extra options to pass to the backend stanza. # (optional) Hash of extra options to pass to the backend stanza.
# Defaults to: {} # Defaults to: {}
@ -56,6 +60,7 @@ class cinder::volume::dellsc_iscsi (
$dell_sc_verify_cert = $::os_service_default, $dell_sc_verify_cert = $::os_service_default,
$dell_sc_volume_folder = 'vol', $dell_sc_volume_folder = 'vol',
$iscsi_port = $::os_service_default, $iscsi_port = $::os_service_default,
$excluded_domain_ip = $::os_service_default,
$extra_options = {}, $extra_options = {},
) { ) {
@ -75,6 +80,7 @@ cinder::backend::dellsc_iscsi instead.')
dell_sc_verify_cert => $dell_sc_verify_cert, dell_sc_verify_cert => $dell_sc_verify_cert,
dell_sc_volume_folder => $dell_sc_volume_folder, dell_sc_volume_folder => $dell_sc_volume_folder,
iscsi_port => $iscsi_port, iscsi_port => $iscsi_port,
excluded_domain_ip => $excluded_domain_ip,
extra_options => $extra_options, extra_options => $extra_options,
} }
} }

View File

@ -19,6 +19,7 @@ describe 'cinder::volume::dellsc_iscsi' do
:dell_sc_verify_cert => '<SERVICE DEFAULT>', :dell_sc_verify_cert => '<SERVICE DEFAULT>',
:dell_sc_volume_folder => 'vol', :dell_sc_volume_folder => 'vol',
:iscsi_port => '<SERVICE DEFAULT>', :iscsi_port => '<SERVICE DEFAULT>',
:excluded_domain_ip => '<SERVICE DEFAULT>',
} }
end end

View File

@ -23,6 +23,7 @@ describe 'cinder::backend::dellsc_iscsi' do
:dell_sc_verify_cert => '<SERVICE DEFAULT>', :dell_sc_verify_cert => '<SERVICE DEFAULT>',
:dell_sc_volume_folder => 'vol', :dell_sc_volume_folder => 'vol',
:iscsi_port => '<SERVICE DEFAULT>', :iscsi_port => '<SERVICE DEFAULT>',
:excluded_domain_ip => '<SERVICE DEFAULT>',
} }
end end