From 2d240777c84c4244a5d429cc1f040a838121d26e Mon Sep 17 00:00:00 2001 From: erikzaadi Date: Mon, 10 Feb 2014 13:01:36 +0200 Subject: [PATCH] IBM XIV and DS8000 Driver reorganizing (IBM dir) * renamed: cinder/volume/drivers/xiv_ds8k.py -> cinder/volume/drivers/ibm/xiv_ds8k.py * updated all references to old xiv_ds8k paths * regenerated sample.conf Change-Id: Iab094c78a0e4eb1753fe8809089ba1337d95e2e0 Partially implements: blueprint ibm-volume-driver-reorg --- cinder/tests/conf_fixture.py | 5 ++-- cinder/tests/test_drivers_compatibility.py | 2 +- ...{test_xiv_ds8k.py => test_ibm_xiv_ds8k.py} | 7 ++--- cinder/volume/drivers/{ => ibm}/xiv_ds8k.py | 0 cinder/volume/manager.py | 6 +++-- etc/cinder/cinder.conf.sample | 26 +++++++++---------- 6 files changed, 25 insertions(+), 21 deletions(-) rename cinder/tests/{test_xiv_ds8k.py => test_ibm_xiv_ds8k.py} (97%) rename cinder/volume/drivers/{ => ibm}/xiv_ds8k.py (100%) diff --git a/cinder/tests/conf_fixture.py b/cinder/tests/conf_fixture.py index 35ea037be..ddde6b919 100644 --- a/cinder/tests/conf_fixture.py +++ b/cinder/tests/conf_fixture.py @@ -24,7 +24,8 @@ CONF = cfg.CONF CONF.import_opt('iscsi_num_targets', 'cinder.volume.drivers.lvm') CONF.import_opt('policy_file', 'cinder.policy') CONF.import_opt('volume_driver', 'cinder.volume.manager') -CONF.import_opt('xiv_ds8k_proxy', 'cinder.volume.drivers.xiv_ds8k') +CONF.import_opt('xiv_ds8k_proxy', + 'cinder.volume.drivers.ibm.xiv_ds8k') CONF.import_opt('backup_driver', 'cinder.backup.manager') CONF.import_opt('fixed_key', 'cinder.keymgr.conf_key_mgr', group='keymgr') CONF.import_opt('scheduler_driver', 'cinder.scheduler.manager') @@ -46,7 +47,7 @@ def set_defaults(conf): conf.set_default('policy_file', 'cinder/tests/policy.json') conf.set_default( 'xiv_ds8k_proxy', - 'cinder.tests.test_xiv_ds8k.XIVDS8KFakeProxyDriver') + 'cinder.tests.test_ibm_xiv_ds8k.XIVDS8KFakeProxyDriver') conf.set_default('backup_driver', 'cinder.tests.backup.fake_service') conf.set_default('fixed_key', default='0' * 64, group='keymgr') conf.set_default('scheduler_driver', diff --git a/cinder/tests/test_drivers_compatibility.py b/cinder/tests/test_drivers_compatibility.py index 63e0cdc6c..fd12168d3 100644 --- a/cinder/tests/test_drivers_compatibility.py +++ b/cinder/tests/test_drivers_compatibility.py @@ -32,7 +32,7 @@ NFS_MODULE = "cinder.volume.drivers.nfs.NfsDriver" SOLIDFIRE_MODULE = "cinder.volume.drivers.solidfire.SolidFireDriver" STORWIZE_MODULE = "cinder.volume.drivers.ibm.storwize_svc.StorwizeSVCDriver" WINDOWS_MODULE = "cinder.volume.drivers.windows.windows.WindowsDriver" -XIV_DS8K_MODULE = "cinder.volume.drivers.xiv_ds8k.XIVDS8KDriver" +XIV_DS8K_MODULE = "cinder.volume.drivers.ibm.xiv_ds8k.XIVDS8KDriver" ZADARA_MODULE = "cinder.volume.drivers.zadara.ZadaraVPSAISCSIDriver" NETAPP_MODULE = "cinder.volume.drivers.netapp.common.Deprecated" LEFTHAND_REST_MODULE = ("cinder.volume.drivers.san.hp.hp_lefthand_iscsi." diff --git a/cinder/tests/test_xiv_ds8k.py b/cinder/tests/test_ibm_xiv_ds8k.py similarity index 97% rename from cinder/tests/test_xiv_ds8k.py rename to cinder/tests/test_ibm_xiv_ds8k.py index f02509126..519bc3ac0 100644 --- a/cinder/tests/test_xiv_ds8k.py +++ b/cinder/tests/test_ibm_xiv_ds8k.py @@ -25,7 +25,7 @@ from oslo.config import cfg from cinder import exception from cinder import test from cinder.volume import configuration as conf -from cinder.volume.drivers import xiv_ds8k +from cinder.volume.drivers.ibm import xiv_ds8k FAKE = "fake" @@ -122,7 +122,7 @@ class XIVDS8KVolumeDriverTest(test.TestCase): configuration = mox.MockObject(conf.Configuration) configuration.san_is_local = False configuration.xiv_ds8k_proxy = \ - 'cinder.tests.test_xiv_ds8k.XIVDS8KFakeProxyDriver' + 'cinder.tests.test_ibm_xiv_ds8k.XIVDS8KFakeProxyDriver' configuration.xiv_ds8k_connection_type = 'iscsi' configuration.san_ip = FAKE configuration.san_login = FAKE @@ -130,7 +130,8 @@ class XIVDS8KVolumeDriverTest(test.TestCase): configuration.san_password = FAKE configuration.append_config_values(mox.IgnoreArg()) - self.driver = xiv_ds8k.XIVDS8KDriver(configuration=configuration) + self.driver = xiv_ds8k.XIVDS8KDriver( + configuration=configuration) def test_initialized_should_set_xiv_ds8k_info(self): """Test that the san flags are passed to the IBM proxy.""" diff --git a/cinder/volume/drivers/xiv_ds8k.py b/cinder/volume/drivers/ibm/xiv_ds8k.py similarity index 100% rename from cinder/volume/drivers/xiv_ds8k.py rename to cinder/volume/drivers/ibm/xiv_ds8k.py diff --git a/cinder/volume/manager.py b/cinder/volume/manager.py index d371916e3..3a96c5817 100644 --- a/cinder/volume/manager.py +++ b/cinder/volume/manager.py @@ -109,9 +109,11 @@ MAPPING = { 'cinder.volume.drivers.windows.WindowsDriver': 'cinder.volume.drivers.windows.windows.WindowsDriver', 'cinder.volume.xiv.XIVDriver': - 'cinder.volume.drivers.xiv_ds8k.XIVDS8KDriver', + 'cinder.volume.drivers.ibm.xiv_ds8k.XIVDS8KDriver', 'cinder.volume.drivers.xiv.XIVDriver': - 'cinder.volume.drivers.xiv_ds8k.XIVDS8KDriver', + 'cinder.volume.drivers.ibm.xiv_ds8k.XIVDS8KDriver', + 'cinder.volume.drivers.xiv_ds8k.XIVDS8KDriver': + 'cinder.volume.drivers.ibm.xiv_ds8k.XIVDS8KDriver', 'cinder.volume.zadara.ZadaraVPSAISCSIDriver': 'cinder.volume.drivers.zadara.ZadaraVPSAISCSIDriver', 'cinder.volume.driver.ISCSIDriver': diff --git a/etc/cinder/cinder.conf.sample b/etc/cinder/cinder.conf.sample index 9d064429f..a0890480c 100644 --- a/etc/cinder/cinder.conf.sample +++ b/etc/cinder/cinder.conf.sample @@ -1218,6 +1218,19 @@ #storwize_svc_multihostmap_enabled=true +# +# Options defined in cinder.volume.drivers.ibm.xiv_ds8k +# + +# Proxy driver that connects to the IBM Storage Array (string +# value) +#xiv_ds8k_proxy=xiv_ds8k_openstack.nova_proxy.XIVDS8KNovaProxy + +# Connection type to the IBM Storage Array +# (fibre_channel|iscsi) (string value) +#xiv_ds8k_connection_type=iscsi + + # # Options defined in cinder.volume.drivers.lvm # @@ -1686,19 +1699,6 @@ #xenapi_sr_base_path=/var/run/sr-mount -# -# Options defined in cinder.volume.drivers.xiv_ds8k -# - -# Proxy driver that connects to the IBM Storage Array (string -# value) -#xiv_ds8k_proxy=xiv_ds8k_openstack.nova_proxy.XIVDS8KNovaProxy - -# Connection type to the IBM Storage Array -# (fibre_channel|iscsi) (string value) -#xiv_ds8k_connection_type=iscsi - - # # Options defined in cinder.volume.drivers.zadara # -- 2.45.2