From 5119d323650f97f12e12fdb6a2a80e46739629fc Mon Sep 17 00:00:00 2001 From: alonma Date: Thu, 20 Mar 2014 19:41:56 +0200 Subject: [PATCH] Adds xiv_chap to xiv/ds8k driver configuration In order to support CHAP, xiv_chap was added to the driver configuration. Valid values are disabled and enabled (default: disabled) Change-Id: I0c68f581ad78a87a506b00ab308806f4a8fa78a8 DocImpact Closes-Bug: #1288816 --- cinder/tests/test_ibm_xiv_ds8k.py | 1 + cinder/volume/drivers/ibm/xiv_ds8k.py | 8 +++++++- etc/cinder/cinder.conf.sample | 4 ++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cinder/tests/test_ibm_xiv_ds8k.py b/cinder/tests/test_ibm_xiv_ds8k.py index 519bc3ac0..1ce1d7eae 100644 --- a/cinder/tests/test_ibm_xiv_ds8k.py +++ b/cinder/tests/test_ibm_xiv_ds8k.py @@ -124,6 +124,7 @@ class XIVDS8KVolumeDriverTest(test.TestCase): configuration.xiv_ds8k_proxy = \ 'cinder.tests.test_ibm_xiv_ds8k.XIVDS8KFakeProxyDriver' configuration.xiv_ds8k_connection_type = 'iscsi' + configuration.xiv_chap = 'disabled' configuration.san_ip = FAKE configuration.san_login = FAKE configuration.san_clustername = FAKE diff --git a/cinder/volume/drivers/ibm/xiv_ds8k.py b/cinder/volume/drivers/ibm/xiv_ds8k.py index af50e22ac..179c5d603 100644 --- a/cinder/volume/drivers/ibm/xiv_ds8k.py +++ b/cinder/volume/drivers/ibm/xiv_ds8k.py @@ -39,6 +39,11 @@ xiv_ds8k_opts = [ default='iscsi', help='Connection type to the IBM Storage Array' ' (fibre_channel|iscsi)'), + cfg.StrOpt( + 'xiv_chap', + default='disabled', + help='CHAP authentication mode, effective only for iscsi' + ' (disabled|enabled)'), ] CONF = cfg.CONF @@ -71,7 +76,8 @@ class XIVDS8KDriver(san.SanDriver): "xiv_ds8k_address": self.configuration.san_ip, "xiv_ds8k_vol_pool": self.configuration.san_clustername, "xiv_ds8k_connection_type": - self.configuration.xiv_ds8k_connection_type + self.configuration.xiv_ds8k_connection_type, + "xiv_chap": self.configuration.xiv_chap }, LOG, exception, diff --git a/etc/cinder/cinder.conf.sample b/etc/cinder/cinder.conf.sample index 88b802822..cfb4465b2 100644 --- a/etc/cinder/cinder.conf.sample +++ b/etc/cinder/cinder.conf.sample @@ -1244,6 +1244,10 @@ # (fibre_channel|iscsi) (string value) #xiv_ds8k_connection_type=iscsi +# CHAP authentication mode, effective only for iscsi +# (disabled|enabled) (string value) +#xiv_chap=disabled + # # Options defined in cinder.volume.drivers.lvm -- 2.45.2