diff --git a/cinder/tests/unit/test_cloudbyte.py b/cinder/tests/unit/test_cloudbyte.py index 0cbe523da38..662908dc7a9 100644 --- a/cinder/tests/unit/test_cloudbyte.py +++ b/cinder/tests/unit/test_cloudbyte.py @@ -1299,7 +1299,7 @@ class CloudByteISCSIDriverTestCase(testtools.TestCase): mock_api_req.side_effect = self._side_effect_api_req # now run the test - model_update = self.driver.create_export({}, {}) + model_update = self.driver.create_export({}, {}, {}) # assert the result self.assertEqual('CHAP fakeauthgroupchapuser fakeauthgroupchapsecret', @@ -1317,7 +1317,7 @@ class CloudByteISCSIDriverTestCase(testtools.TestCase): mock_api_req.side_effect = self._side_effect_api_req # now run the test - model_update = self.driver.create_export({}, {}) + model_update = self.driver.create_export({}, {}, {}) # assert the result self.assertEqual(None, @@ -1354,7 +1354,7 @@ class CloudByteISCSIDriverTestCase(testtools.TestCase): mock_api_req.side_effect = self._side_effect_api_req # now run the test - model_update = self.driver.create_export({}, {}) + model_update = self.driver.create_export({}, {}, {}) # assert the result self.assertEqual(None, diff --git a/cinder/tests/unit/test_gpfs.py b/cinder/tests/unit/test_gpfs.py index 8e3a0edd4c5..480d14281d7 100644 --- a/cinder/tests/unit/test_gpfs.py +++ b/cinder/tests/unit/test_gpfs.py @@ -1084,7 +1084,7 @@ class GPFSDriverTestCase(test.TestCase): self.assertEqual(None, self.driver.ensure_export('', '')) def test_create_export(self): - self.assertEqual(None, self.driver.create_export('', '')) + self.assertEqual(None, self.driver.create_export('', '', {})) def test_remove_export(self): self.assertEqual(None, self.driver.remove_export('', '')) diff --git a/cinder/tests/unit/test_netapp.py b/cinder/tests/unit/test_netapp.py index 32aad89b62b..104be3bc696 100644 --- a/cinder/tests/unit/test_netapp.py +++ b/cinder/tests/unit/test_netapp.py @@ -643,7 +643,7 @@ class NetAppDirectCmodeISCSIDriverTestCase(test.TestCase): 'get_operational_network_interface_addresses', mock.Mock(return_value=[])) self.driver.create_volume(self.volume) - updates = self.driver.create_export(None, self.volume) + updates = self.driver.create_export(None, self.volume, {}) self.assertTrue(updates['provider_location']) self.volume['provider_location'] = updates['provider_location'] @@ -667,7 +667,7 @@ class NetAppDirectCmodeISCSIDriverTestCase(test.TestCase): 'get_operational_network_interface_addresses', mock.Mock(return_value=[])) self.driver.create_volume(self.volume) - updates = self.driver.create_export(None, self.volume) + updates = self.driver.create_export(None, self.volume, {}) self.assertTrue(updates['provider_location']) self.volume['provider_location'] = updates['provider_location'] connector_new = {'initiator': 'iqn.1993-08.org.debian:01:1001'} diff --git a/cinder/tests/unit/test_storpool.py b/cinder/tests/unit/test_storpool.py index 780e062714c..71f8f36fb9b 100644 --- a/cinder/tests/unit/test_storpool.py +++ b/cinder/tests/unit/test_storpool.py @@ -222,7 +222,7 @@ class StorPoolTestCase(test.TestCase): self.assertDictEqual({'client_id': 2, 'volume': '616'}, c['data']) self.driver.terminate_connection(None, None) - self.driver.create_export(None, None) + self.driver.create_export(None, None, {}) self.driver.remove_export(None, None) def test_stats(self): diff --git a/cinder/tests/unit/test_storwize_svc.py b/cinder/tests/unit/test_storwize_svc.py index e063c9f4503..d8a2a4b084a 100644 --- a/cinder/tests/unit/test_storwize_svc.py +++ b/cinder/tests/unit/test_storwize_svc.py @@ -2117,7 +2117,7 @@ class StorwizeSVCDriverTestCase(test.TestCase): self.driver.ensure_export(None, volume) # Do nothing - self.driver.create_export(None, volume) + self.driver.create_export(None, volume, {}) self.driver.remove_export(None, volume) # Make sure volume attributes are as they should be diff --git a/cinder/tests/unit/test_vmware_vmdk.py b/cinder/tests/unit/test_vmware_vmdk.py index d28c5eb8bd2..efda339ee92 100644 --- a/cinder/tests/unit/test_vmware_vmdk.py +++ b/cinder/tests/unit/test_vmware_vmdk.py @@ -267,7 +267,7 @@ class VMwareEsxVmdkDriverTestCase(test.TestCase): def test_create_export(self): """Test create_export.""" - self._driver.create_export(mox.IgnoreArg(), mox.IgnoreArg()) + self._driver.create_export(mox.IgnoreArg(), mox.IgnoreArg(), {}) def test_ensure_export(self): """Test ensure_export.""" diff --git a/cinder/tests/unit/volume/drivers/test_datera.py b/cinder/tests/unit/volume/drivers/test_datera.py index 42cf9b3b655..8c429601404 100644 --- a/cinder/tests/unit/volume/drivers/test_datera.py +++ b/cinder/tests/unit/volume/drivers/test_datera.py @@ -179,13 +179,14 @@ class DateraVolumeTestCase(test.TestCase): } self.assertEqual(expected, self.driver.create_export(ctxt, - self.volume)) + self.volume, + {})) def test_create_export_fails(self): self.mock_api.side_effect = exception.DateraAPIException ctxt = context.get_admin_context() self.assertRaises(exception.DateraAPIException, - self.driver.create_export, ctxt, self.volume) + self.driver.create_export, ctxt, self.volume, {}) def test_detach_volume_success(self): self.mock_api.return_value = {} diff --git a/cinder/tests/unit/windows/test_windows.py b/cinder/tests/unit/windows/test_windows.py index e26cfcb3652..8e73d163047 100644 --- a/cinder/tests/unit/windows/test_windows.py +++ b/cinder/tests/unit/windows/test_windows.py @@ -189,7 +189,7 @@ class TestWindowsDriver(test.TestCase): self.mox.ReplayAll() - export_info = drv.create_export(None, volume) + export_info = drv.create_export(None, volume, {}) self.assertEqual(initiator_name, export_info['provider_location']) if chap_enabled: diff --git a/cinder/volume/driver.py b/cinder/volume/driver.py index 9275d3fd063..66f8d6361bc 100644 --- a/cinder/volume/driver.py +++ b/cinder/volume/driver.py @@ -682,7 +682,7 @@ class BaseVD(object): model_update = None try: LOG.debug("Volume %s: creating export", volume['id']) - model_update = self.create_export(context, volume) + model_update = self.create_export(context, volume, properties) if model_update: volume = self.db.volume_update(context, volume['id'], model_update) @@ -929,7 +929,7 @@ class BaseVD(object): return @abc.abstractmethod - def create_export(self, context, volume): + def create_export(self, context, volume, connector): """Exports the volume. Can optionally return a Dictionary of changes @@ -1363,7 +1363,7 @@ class VolumeDriver(ConsistencyGroupVD, TransferVD, ManageableVD, ExtendVD, def ensure_export(self, context, volume): raise NotImplementedError() - def create_export(self, context, volume): + def create_export(self, context, volume, connector): raise NotImplementedError() def remove_export(self, context, volume): @@ -1811,7 +1811,7 @@ class FakeISCSIDriver(ISCSIDriver): """Synchronously recreates an export for a volume.""" pass - def create_export(self, context, volume): + def create_export(self, context, volume, connector): """Exports the volume. Can optionally return a Dictionary of changes to the volume object to diff --git a/cinder/volume/drivers/block_device.py b/cinder/volume/drivers/block_device.py index bed0c5867bc..cfe778a2eb6 100644 --- a/cinder/volume/drivers/block_device.py +++ b/cinder/volume/drivers/block_device.py @@ -199,7 +199,7 @@ class BlockDeviceDriver(driver.BaseVD, driver.LocalVD, driver.CloneableVD, volume_path) return model_update - def create_export(self, context, volume): + def create_export(self, context, volume, connector): volume_path = self.local_path(volume) export_info = self.target_driver.create_export(context, volume, diff --git a/cinder/volume/drivers/blockbridge.py b/cinder/volume/drivers/blockbridge.py index 7661841d186..b0530d0bc0f 100644 --- a/cinder/volume/drivers/blockbridge.py +++ b/cinder/volume/drivers/blockbridge.py @@ -435,7 +435,7 @@ class BlockbridgeISCSIDriver(driver.ISCSIDriver): user_id=snapshot['user_id'], project_id=snapshot['project_id']) - def create_export(self, _ctx, volume): + def create_export(self, _ctx, volume, connector): """Do nothing: target created during instance attachment.""" pass diff --git a/cinder/volume/drivers/cloudbyte/cloudbyte.py b/cinder/volume/drivers/cloudbyte/cloudbyte.py index e494702190c..c6c8e6bc655 100644 --- a/cinder/volume/drivers/cloudbyte/cloudbyte.py +++ b/cinder/volume/drivers/cloudbyte/cloudbyte.py @@ -1012,7 +1012,7 @@ class CloudByteISCSIDriver(san.SanISCSIDriver): # Request the CloudByte api to update the volume self._api_request_for_cloudbyte('updateFileSystem', params) - def create_export(self, context, volume): + def create_export(self, context, volume, connector): """Setup the iscsi export info.""" return self._export() diff --git a/cinder/volume/drivers/datera.py b/cinder/volume/drivers/datera.py index 19523accaba..fa6ff7ae9e0 100644 --- a/cinder/volume/drivers/datera.py +++ b/cinder/volume/drivers/datera.py @@ -194,7 +194,7 @@ class DateraDriver(san.SanISCSIDriver): def ensure_export(self, context, volume): return self._do_export(context, volume) - def create_export(self, context, volume): + def create_export(self, context, volume, connector): return self._do_export(context, volume) def detach_volume(self, context, volume, attachment=None): diff --git a/cinder/volume/drivers/dell/dell_storagecenter_common.py b/cinder/volume/drivers/dell/dell_storagecenter_common.py index 4de4e123e5b..c8741cab531 100644 --- a/cinder/volume/drivers/dell/dell_storagecenter_common.py +++ b/cinder/volume/drivers/dell/dell_storagecenter_common.py @@ -289,7 +289,7 @@ class DellCommonDriver(driver.ConsistencyGroupVD, driver.ManageableVD, raise exception.VolumeBackendAPIException( _('Failed to delete snapshot %s') % snapshot_id) - def create_export(self, context, volume): + def create_export(self, context, volume, connector): """Create an export of a volume. The volume exists on creation and will be visible on diff --git a/cinder/volume/drivers/dothill/dothill_fc.py b/cinder/volume/drivers/dothill/dothill_fc.py index 840c435424e..0c47ded05f9 100644 --- a/cinder/volume/drivers/dothill/dothill_fc.py +++ b/cinder/volume/drivers/dothill/dothill_fc.py @@ -141,7 +141,7 @@ class DotHillFCDriver(cinder.volume.driver.FibreChannelDriver): self.__class__.__name__) return stats - def create_export(self, context, volume): + def create_export(self, context, volume, connector): pass def ensure_export(self, context, volume): diff --git a/cinder/volume/drivers/dothill/dothill_iscsi.py b/cinder/volume/drivers/dothill/dothill_iscsi.py index ced984340d7..de9357446c6 100644 --- a/cinder/volume/drivers/dothill/dothill_iscsi.py +++ b/cinder/volume/drivers/dothill/dothill_iscsi.py @@ -153,7 +153,7 @@ class DotHillISCSIDriver(cinder.volume.driver.ISCSIDriver): self.__class__.__name__) return stats - def create_export(self, context, volume): + def create_export(self, context, volume, connector): pass def ensure_export(self, context, volume): diff --git a/cinder/volume/drivers/drbdmanagedrv.py b/cinder/volume/drivers/drbdmanagedrv.py index 306ce9297ab..aa994f298ba 100644 --- a/cinder/volume/drivers/drbdmanagedrv.py +++ b/cinder/volume/drivers/drbdmanagedrv.py @@ -507,7 +507,7 @@ class DrbdManageDriver(driver.VolumeDriver): volume, volume_path) - def create_export(self, context, volume): + def create_export(self, context, volume, connector): volume_path = self.local_path(volume) export_info = self.target_driver.create_export( context, diff --git a/cinder/volume/drivers/emc/emc_cli_fc.py b/cinder/volume/drivers/emc/emc_cli_fc.py index f468988b755..668e80535ff 100644 --- a/cinder/volume/drivers/emc/emc_cli_fc.py +++ b/cinder/volume/drivers/emc/emc_cli_fc.py @@ -110,7 +110,7 @@ class EMCCLIFCDriver(driver.FibreChannelDriver): """Driver entry point to get the export info for an existing volume.""" pass - def create_export(self, context, volume): + def create_export(self, context, volume, connector): """Driver entry point to get the export info for a new volume.""" pass diff --git a/cinder/volume/drivers/emc/emc_cli_iscsi.py b/cinder/volume/drivers/emc/emc_cli_iscsi.py index 46e5a056e6b..3cb992d1461 100644 --- a/cinder/volume/drivers/emc/emc_cli_iscsi.py +++ b/cinder/volume/drivers/emc/emc_cli_iscsi.py @@ -107,7 +107,7 @@ class EMCCLIISCSIDriver(driver.ISCSIDriver): """Driver entry point to get the export info for an existing volume.""" pass - def create_export(self, context, volume): + def create_export(self, context, volume, connector): """Driver entry point to get the export info for a new volume.""" pass diff --git a/cinder/volume/drivers/emc/emc_vmax_fc.py b/cinder/volume/drivers/emc/emc_vmax_fc.py index 7748abb17ce..08376cd3f71 100644 --- a/cinder/volume/drivers/emc/emc_vmax_fc.py +++ b/cinder/volume/drivers/emc/emc_vmax_fc.py @@ -117,7 +117,7 @@ class EMCVMAXFCDriver(driver.FibreChannelDriver): """Driver entry point to get the export info for an existing volume.""" pass - def create_export(self, context, volume): + def create_export(self, context, volume, connector): """Driver entry point to get the export info for a new volume.""" pass diff --git a/cinder/volume/drivers/emc/emc_vmax_iscsi.py b/cinder/volume/drivers/emc/emc_vmax_iscsi.py index 1477392b888..cfae7121fc2 100644 --- a/cinder/volume/drivers/emc/emc_vmax_iscsi.py +++ b/cinder/volume/drivers/emc/emc_vmax_iscsi.py @@ -124,7 +124,7 @@ class EMCVMAXISCSIDriver(driver.ISCSIDriver): """Driver entry point to get the export info for an existing volume.""" pass - def create_export(self, context, volume): + def create_export(self, context, volume, connector): """Driver entry point to get the export info for a new volume.""" pass diff --git a/cinder/volume/drivers/emc/scaleio.py b/cinder/volume/drivers/emc/scaleio.py index 8da7887325b..d96ba836a82 100644 --- a/cinder/volume/drivers/emc/scaleio.py +++ b/cinder/volume/drivers/emc/scaleio.py @@ -1141,7 +1141,7 @@ class ScaleIODriver(driver.VolumeDriver): """Driver entry point to get the export info for an existing volume.""" pass - def create_export(self, context, volume): + def create_export(self, context, volume, connector): """Driver entry point to get the export info for a new volume.""" pass diff --git a/cinder/volume/drivers/eqlx.py b/cinder/volume/drivers/eqlx.py index 74adebebeb0..51f941760c6 100644 --- a/cinder/volume/drivers/eqlx.py +++ b/cinder/volume/drivers/eqlx.py @@ -510,7 +510,7 @@ class DellEQLSanISCSIDriver(san.SanISCSIDriver): 'to volume "%s".'), volume['name']) - def create_export(self, context, volume): + def create_export(self, context, volume, connector): """Create an export of a volume. Driver has nothing to do here for the volume has been exported diff --git a/cinder/volume/drivers/glusterfs.py b/cinder/volume/drivers/glusterfs.py index e32a79bd790..d6aaeea7216 100644 --- a/cinder/volume/drivers/glusterfs.py +++ b/cinder/volume/drivers/glusterfs.py @@ -268,7 +268,7 @@ class GlusterfsDriver(remotefs_drv.RemoteFSSnapDriver, driver.CloneableVD, self._ensure_share_mounted(volume['provider_location']) - def create_export(self, ctx, volume): + def create_export(self, ctx, volume, connector): """Exports the volume.""" pass diff --git a/cinder/volume/drivers/hgst.py b/cinder/volume/drivers/hgst.py index 59b0b29f2e6..2c27037cb51 100644 --- a/cinder/volume/drivers/hgst.py +++ b/cinder/volume/drivers/hgst.py @@ -585,7 +585,7 @@ class HGSTDriver(driver.VolumeDriver): """Query the provider_id to figure out the proper devnode.""" return "/dev/" + self._get_space_name(volume) - def create_export(self, context, volume): + def create_export(self, context, volume, connector): # Not needed for spaces pass diff --git a/cinder/volume/drivers/hitachi/hbsd_fc.py b/cinder/volume/drivers/hitachi/hbsd_fc.py index fee7332c074..00d51b25e00 100644 --- a/cinder/volume/drivers/hitachi/hbsd_fc.py +++ b/cinder/volume/drivers/hitachi/hbsd_fc.py @@ -473,7 +473,7 @@ class HBSDFCDriver(cinder.volume.driver.FibreChannelDriver): def discard_zero_page(self, volume): self.common.command.discard_zero_page(self.common.get_ldev(volume)) - def create_export(self, context, volume): + def create_export(self, context, volume, connector): pass def ensure_export(self, context, volume): diff --git a/cinder/volume/drivers/hitachi/hbsd_iscsi.py b/cinder/volume/drivers/hitachi/hbsd_iscsi.py index d2f06385389..efb4ed0e74f 100644 --- a/cinder/volume/drivers/hitachi/hbsd_iscsi.py +++ b/cinder/volume/drivers/hitachi/hbsd_iscsi.py @@ -384,7 +384,7 @@ class HBSDISCSIDriver(cinder.volume.driver.ISCSIDriver): self.common.volume_info[ldev]['in_use']: self._terminate_connection(ldev, connector, hostgroups) - def create_export(self, context, volume): + def create_export(self, context, volume, connector): pass def ensure_export(self, context, volume): diff --git a/cinder/volume/drivers/hitachi/hnas_iscsi.py b/cinder/volume/drivers/hitachi/hnas_iscsi.py index 925d72583fd..6427ac0725f 100644 --- a/cinder/volume/drivers/hitachi/hnas_iscsi.py +++ b/cinder/volume/drivers/hitachi/hnas_iscsi.py @@ -424,7 +424,7 @@ class HDSISCSIDriver(driver.ISCSIDriver): def ensure_export(self, context, volume): pass - def create_export(self, context, volume): + def create_export(self, context, volume, connector): """Create an export. Moved to initialize_connection. :param context: diff --git a/cinder/volume/drivers/huawei/huawei_driver.py b/cinder/volume/drivers/huawei/huawei_driver.py index 23b6bc55730..30d2fbb9d90 100644 --- a/cinder/volume/drivers/huawei/huawei_driver.py +++ b/cinder/volume/drivers/huawei/huawei_driver.py @@ -566,7 +566,7 @@ class HuaweiBaseDriver(driver.VolumeDriver): def migrate_volume(self, context, volume, host): return (False, None) - def create_export(self, context, volume): + def create_export(self, context, volume, connector): """Export a volume.""" pass diff --git a/cinder/volume/drivers/ibm/gpfs.py b/cinder/volume/drivers/ibm/gpfs.py index ae3853a39af..1849c30ccb7 100644 --- a/cinder/volume/drivers/ibm/gpfs.py +++ b/cinder/volume/drivers/ibm/gpfs.py @@ -742,7 +742,7 @@ class GPFSDriver(driver.ConsistencyGroupVD, driver.ExtendVD, """Synchronously recreates an export for a logical volume.""" pass - def create_export(self, context, volume): + def create_export(self, context, volume, connector): """Exports the volume.""" pass diff --git a/cinder/volume/drivers/ibm/storwize_svc/__init__.py b/cinder/volume/drivers/ibm/storwize_svc/__init__.py index f78594113dc..5ef14515f7a 100644 --- a/cinder/volume/drivers/ibm/storwize_svc/__init__.py +++ b/cinder/volume/drivers/ibm/storwize_svc/__init__.py @@ -315,7 +315,7 @@ class StorwizeSVCDriver(san.SanDriver, LOG.error(_LE('ensure_export: Volume %s not found on storage.'), volume['name']) - def create_export(self, ctxt, volume): + def create_export(self, ctxt, volume, connector): model_update = None return model_update diff --git a/cinder/volume/drivers/ibm/xiv_ds8k.py b/cinder/volume/drivers/ibm/xiv_ds8k.py index 302955ec5b6..93a24e206e4 100644 --- a/cinder/volume/drivers/ibm/xiv_ds8k.py +++ b/cinder/volume/drivers/ibm/xiv_ds8k.py @@ -110,7 +110,7 @@ class XIVDS8KDriver(san.SanDriver, return self.xiv_ds8k_proxy.ensure_export(context, volume) - def create_export(self, context, volume): + def create_export(self, context, volume, connector): """Create an export.""" return self.xiv_ds8k_proxy.create_export(context, volume) diff --git a/cinder/volume/drivers/infortrend/infortrend_fc_cli.py b/cinder/volume/drivers/infortrend/infortrend_fc_cli.py index 767c108c486..d4da587f3a4 100644 --- a/cinder/volume/drivers/infortrend/infortrend_fc_cli.py +++ b/cinder/volume/drivers/infortrend/infortrend_fc_cli.py @@ -123,7 +123,7 @@ class InfortrendCLIFCDriver(driver.FibreChannelDriver): """Synchronously recreates an export for a volume.""" pass - def create_export(self, context, volume): + def create_export(self, context, volume, connector): """Exports the volume. Can optionally return a Dictionary of changes diff --git a/cinder/volume/drivers/infortrend/infortrend_iscsi_cli.py b/cinder/volume/drivers/infortrend/infortrend_iscsi_cli.py index 07d97c4b137..18ba8939225 100644 --- a/cinder/volume/drivers/infortrend/infortrend_iscsi_cli.py +++ b/cinder/volume/drivers/infortrend/infortrend_iscsi_cli.py @@ -121,7 +121,7 @@ class InfortrendCLIISCSIDriver(driver.ISCSIDriver): """Synchronously recreates an export for a volume.""" pass - def create_export(self, context, volume): + def create_export(self, context, volume, connector): """Exports the volume. Can optionally return a Dictionary of changes diff --git a/cinder/volume/drivers/lvm.py b/cinder/volume/drivers/lvm.py index 0f54ec99eaa..a78038dfbae 100644 --- a/cinder/volume/drivers/lvm.py +++ b/cinder/volume/drivers/lvm.py @@ -654,7 +654,7 @@ class LVMVolumeDriver(driver.VolumeDriver): self.target_driver.ensure_export(context, volume, volume_path) return model_update - def create_export(self, context, volume, vg=None): + def create_export(self, context, volume, connector, vg=None): if vg is None: vg = self.configuration.volume_group diff --git a/cinder/volume/drivers/netapp/dataontap/fc_7mode.py b/cinder/volume/drivers/netapp/dataontap/fc_7mode.py index 8b06e621670..3749c8607ce 100644 --- a/cinder/volume/drivers/netapp/dataontap/fc_7mode.py +++ b/cinder/volume/drivers/netapp/dataontap/fc_7mode.py @@ -68,7 +68,7 @@ class NetApp7modeFibreChannelDriver(driver.FibreChannelDriver): def ensure_export(self, context, volume): return self.library.ensure_export(context, volume) - def create_export(self, context, volume): + def create_export(self, context, volume, connector): return self.library.create_export(context, volume) def remove_export(self, context, volume): diff --git a/cinder/volume/drivers/netapp/dataontap/fc_cmode.py b/cinder/volume/drivers/netapp/dataontap/fc_cmode.py index 856d8b51048..13d60b61492 100644 --- a/cinder/volume/drivers/netapp/dataontap/fc_cmode.py +++ b/cinder/volume/drivers/netapp/dataontap/fc_cmode.py @@ -68,7 +68,7 @@ class NetAppCmodeFibreChannelDriver(driver.FibreChannelDriver): def ensure_export(self, context, volume): return self.library.ensure_export(context, volume) - def create_export(self, context, volume): + def create_export(self, context, volume, connector): return self.library.create_export(context, volume) def remove_export(self, context, volume): diff --git a/cinder/volume/drivers/netapp/dataontap/iscsi_7mode.py b/cinder/volume/drivers/netapp/dataontap/iscsi_7mode.py index 2a200f1cb3a..eebb20282ed 100644 --- a/cinder/volume/drivers/netapp/dataontap/iscsi_7mode.py +++ b/cinder/volume/drivers/netapp/dataontap/iscsi_7mode.py @@ -67,7 +67,7 @@ class NetApp7modeISCSIDriver(driver.ISCSIDriver): def ensure_export(self, context, volume): return self.library.ensure_export(context, volume) - def create_export(self, context, volume): + def create_export(self, context, volume, connector): return self.library.create_export(context, volume) def remove_export(self, context, volume): diff --git a/cinder/volume/drivers/netapp/dataontap/iscsi_cmode.py b/cinder/volume/drivers/netapp/dataontap/iscsi_cmode.py index 482d0552254..f4c6da7b89c 100644 --- a/cinder/volume/drivers/netapp/dataontap/iscsi_cmode.py +++ b/cinder/volume/drivers/netapp/dataontap/iscsi_cmode.py @@ -67,7 +67,7 @@ class NetAppCmodeISCSIDriver(driver.ISCSIDriver): def ensure_export(self, context, volume): return self.library.ensure_export(context, volume) - def create_export(self, context, volume): + def create_export(self, context, volume, connector): return self.library.create_export(context, volume) def remove_export(self, context, volume): diff --git a/cinder/volume/drivers/netapp/eseries/fc_driver.py b/cinder/volume/drivers/netapp/eseries/fc_driver.py index 1de849df612..3930afc1906 100644 --- a/cinder/volume/drivers/netapp/eseries/fc_driver.py +++ b/cinder/volume/drivers/netapp/eseries/fc_driver.py @@ -75,7 +75,7 @@ class NetAppEseriesFibreChannelDriver(driver.BaseVD, def ensure_export(self, context, volume): return self.library.ensure_export(context, volume) - def create_export(self, context, volume): + def create_export(self, context, volume, connector): return self.library.create_export(context, volume) def remove_export(self, context, volume): diff --git a/cinder/volume/drivers/netapp/eseries/iscsi_driver.py b/cinder/volume/drivers/netapp/eseries/iscsi_driver.py index bd1af9f77fe..df96bb1e25b 100644 --- a/cinder/volume/drivers/netapp/eseries/iscsi_driver.py +++ b/cinder/volume/drivers/netapp/eseries/iscsi_driver.py @@ -77,7 +77,7 @@ class NetAppEseriesISCSIDriver(driver.BaseVD, def ensure_export(self, context, volume): return self.library.ensure_export(context, volume) - def create_export(self, context, volume): + def create_export(self, context, volume, connector): return self.library.create_export(context, volume) def remove_export(self, context, volume): diff --git a/cinder/volume/drivers/nimble.py b/cinder/volume/drivers/nimble.py index df6236e2f27..a32ccc152ea 100755 --- a/cinder/volume/drivers/nimble.py +++ b/cinder/volume/drivers/nimble.py @@ -227,7 +227,7 @@ class NimbleISCSIDriver(san.SanISCSIDriver): self._clone_volume_from_snapshot(volume, snapshot) return self._get_model_info(volume['name']) - def create_export(self, context, volume): + def create_export(self, context, volume, connector): """Driver entry point to get the export info for a new volume.""" return self._get_model_info(volume['name']) diff --git a/cinder/volume/drivers/prophetstor/dplcommon.py b/cinder/volume/drivers/prophetstor/dplcommon.py index cf54a827a38..a09b9a1059c 100644 --- a/cinder/volume/drivers/prophetstor/dplcommon.py +++ b/cinder/volume/drivers/prophetstor/dplcommon.py @@ -857,7 +857,7 @@ class DPLCOMMONDriver(driver.ConsistencyGroupVD, driver.ExtendVD, raise exception.VolumeBackendAPIException(data=msg) return snapshotID - def create_export(self, context, volume): + def create_export(self, context, volume, connector): pass def ensure_export(self, context, volume): diff --git a/cinder/volume/drivers/pure.py b/cinder/volume/drivers/pure.py index 7fa0f386b5d..28790703f37 100644 --- a/cinder/volume/drivers/pure.py +++ b/cinder/volume/drivers/pure.py @@ -205,7 +205,7 @@ class PureBaseVolumeDriver(san.SanDriver): def ensure_export(self, context, volume): pass - def create_export(self, context, volume): + def create_export(self, context, volume, connector): pass def _get_host(self, connector): diff --git a/cinder/volume/drivers/rbd.py b/cinder/volume/drivers/rbd.py index 2ffb22e17d4..c94294ea77e 100644 --- a/cinder/volume/drivers/rbd.py +++ b/cinder/volume/drivers/rbd.py @@ -790,7 +790,7 @@ class RBDDriver(driver.RetypeVD, driver.TransferVD, driver.ExtendVD, """Synchronously recreates an export for a logical volume.""" pass - def create_export(self, context, volume): + def create_export(self, context, volume, connector): """Exports the volume.""" pass diff --git a/cinder/volume/drivers/remotefs.py b/cinder/volume/drivers/remotefs.py index 39d23846d13..ee3191c91fb 100644 --- a/cinder/volume/drivers/remotefs.py +++ b/cinder/volume/drivers/remotefs.py @@ -294,7 +294,7 @@ class RemoteFSDriver(driver.LocalVD, driver.TransferVD, driver.BaseVD): """Synchronously recreates an export for a logical volume.""" self._ensure_share_mounted(volume['provider_location']) - def create_export(self, ctx, volume): + def create_export(self, ctx, volume, connector): """Exports the volume. Can optionally return a dictionary of changes diff --git a/cinder/volume/drivers/san/hp/hp_3par_fc.py b/cinder/volume/drivers/san/hp/hp_3par_fc.py index db6c547f0e9..fc1e7ae355e 100644 --- a/cinder/volume/drivers/san/hp/hp_3par_fc.py +++ b/cinder/volume/drivers/san/hp/hp_3par_fc.py @@ -411,7 +411,7 @@ class HP3PARFCDriver(cinder.volume.driver.FibreChannelDriver): host = common._get_3par_host(host['name']) return host - def create_export(self, context, volume): + def create_export(self, context, volume, connector): pass def ensure_export(self, context, volume): diff --git a/cinder/volume/drivers/san/hp/hp_3par_iscsi.py b/cinder/volume/drivers/san/hp/hp_3par_iscsi.py index a51f837c4f0..0d7868fe21c 100644 --- a/cinder/volume/drivers/san/hp/hp_3par_iscsi.py +++ b/cinder/volume/drivers/san/hp/hp_3par_iscsi.py @@ -554,7 +554,7 @@ class HP3PARISCSIDriver(cinder.volume.driver.ISCSIDriver): return model_update - def create_export(self, context, volume): + def create_export(self, context, volume, connector): common = self._login() try: return self._do_export(common, volume) diff --git a/cinder/volume/drivers/san/hp/hp_lefthand_cliq_proxy.py b/cinder/volume/drivers/san/hp/hp_lefthand_cliq_proxy.py index 884e8d6d0db..c4b635bea41 100644 --- a/cinder/volume/drivers/san/hp/hp_lefthand_cliq_proxy.py +++ b/cinder/volume/drivers/san/hp/hp_lefthand_cliq_proxy.py @@ -450,7 +450,7 @@ class HPLeftHandCLIQProxy(san.SanISCSIDriver): def create_cloned_volume(self, volume, src_vref): raise NotImplementedError() - def create_export(self, context, volume): + def create_export(self, context, volume, connector): pass def ensure_export(self, context, volume): diff --git a/cinder/volume/drivers/san/hp/hp_lefthand_iscsi.py b/cinder/volume/drivers/san/hp/hp_lefthand_iscsi.py index 1bd35797b91..ed118ec5dc6 100644 --- a/cinder/volume/drivers/san/hp/hp_lefthand_iscsi.py +++ b/cinder/volume/drivers/san/hp/hp_lefthand_iscsi.py @@ -148,8 +148,8 @@ class HPLeftHandISCSIDriver(driver.TransferVD, def create_cloned_volume(self, volume, src_vref): return self.proxy.create_cloned_volume(volume, src_vref) - def create_export(self, context, volume): - return self.proxy.create_export(context, volume) + def create_export(self, context, volume, connector): + return self.proxy.create_export(context, volume, connector) def ensure_export(self, context, volume): return self.proxy.ensure_export(context, volume) diff --git a/cinder/volume/drivers/san/hp/hp_lefthand_rest_proxy.py b/cinder/volume/drivers/san/hp/hp_lefthand_rest_proxy.py index 4c4dfef41a1..ff32fbe0dde 100644 --- a/cinder/volume/drivers/san/hp/hp_lefthand_rest_proxy.py +++ b/cinder/volume/drivers/san/hp/hp_lefthand_rest_proxy.py @@ -508,7 +508,7 @@ class HPLeftHandRESTProxy(driver.ISCSIDriver): optional) return server_info - def create_export(self, context, volume): + def create_export(self, context, volume, connector): pass def ensure_export(self, context, volume): diff --git a/cinder/volume/drivers/san/hp/hp_xp_fc.py b/cinder/volume/drivers/san/hp/hp_xp_fc.py index b67f5d9528f..ea2f6f4782c 100644 --- a/cinder/volume/drivers/san/hp/hp_xp_fc.py +++ b/cinder/volume/drivers/san/hp/hp_xp_fc.py @@ -134,7 +134,7 @@ class HPXPFCDriver(driver.FibreChannelDriver): def ensure_export(self, context, volume): pass - def create_export(self, context, volume): + def create_export(self, context, volume, connector): pass def remove_export(self, context, volume): diff --git a/cinder/volume/drivers/san/san.py b/cinder/volume/drivers/san/san.py index a92f81bfd1f..6707a0f5416 100644 --- a/cinder/volume/drivers/san/san.py +++ b/cinder/volume/drivers/san/san.py @@ -153,7 +153,7 @@ class SanDriver(driver.BaseVD): """Synchronously recreates an export for a logical volume.""" pass - def create_export(self, context, volume): + def create_export(self, context, volume, connector): """Exports the volume.""" pass diff --git a/cinder/volume/drivers/scality.py b/cinder/volume/drivers/scality.py index a03fb6509ff..904f18ba129 100644 --- a/cinder/volume/drivers/scality.py +++ b/cinder/volume/drivers/scality.py @@ -194,7 +194,7 @@ class ScalityDriver(driver.VolumeDriver): """Synchronously recreates an export for a logical volume.""" pass - def create_export(self, context, volume): + def create_export(self, context, volume, connector): """Exports the volume. Can optionally return a Dictionary of changes to the volume diff --git a/cinder/volume/drivers/sheepdog.py b/cinder/volume/drivers/sheepdog.py index bd5dee3c29e..a20ce25c861 100644 --- a/cinder/volume/drivers/sheepdog.py +++ b/cinder/volume/drivers/sheepdog.py @@ -218,7 +218,7 @@ class SheepdogDriver(driver.VolumeDriver): """Safely and synchronously recreate an export for a logical volume.""" pass - def create_export(self, context, volume): + def create_export(self, context, volume, connector): """Export a volume.""" pass diff --git a/cinder/volume/drivers/solidfire.py b/cinder/volume/drivers/solidfire.py index 1efb6ee9c99..e330d9892fd 100644 --- a/cinder/volume/drivers/solidfire.py +++ b/cinder/volume/drivers/solidfire.py @@ -1229,7 +1229,7 @@ class SolidFireDriver(san.SanISCSIDriver): def ensure_export(self, context, volume): return self.target_driver.ensure_export(context, volume, None) - def create_export(self, context, volume): + def create_export(self, context, volume, connector): return self.target_driver.create_export( context, volume, diff --git a/cinder/volume/drivers/srb.py b/cinder/volume/drivers/srb.py index 75436e02248..8d163076874 100644 --- a/cinder/volume/drivers/srb.py +++ b/cinder/volume/drivers/srb.py @@ -850,7 +850,7 @@ class SRBISCSIDriver(SRBDriver, driver.ISCSIDriver): if model_update: self.db.volume_update(context, volume['id'], model_update) - def create_export(self, context, volume): + def create_export(self, context, volume, connector): """Creates an export for a logical volume.""" self._attach_file(volume) vg = self._get_lvm_vg(volume) diff --git a/cinder/volume/drivers/storpool.py b/cinder/volume/drivers/storpool.py index ae49beaf86c..c152fa2a78f 100644 --- a/cinder/volume/drivers/storpool.py +++ b/cinder/volume/drivers/storpool.py @@ -183,7 +183,7 @@ class StorPoolDriver(driver.TransferVD, driver.ExtendVD, driver.CloneableVD, "%(msg)s"), {'name': snapname, 'msg': e}) - def create_export(self, context, volume): + def create_export(self, context, volume, connector): pass def remove_export(self, context, volume): diff --git a/cinder/volume/drivers/violin/v6000_fcp.py b/cinder/volume/drivers/violin/v6000_fcp.py index 7e7953b8d57..af19efa3b99 100644 --- a/cinder/volume/drivers/violin/v6000_fcp.py +++ b/cinder/volume/drivers/violin/v6000_fcp.py @@ -125,7 +125,7 @@ class V6000FCDriver(driver.FibreChannelDriver): """Synchronously checks and re-exports volumes at cinder start time.""" pass - def create_export(self, context, volume): + def create_export(self, context, volume, connector): """Exports the volume.""" pass diff --git a/cinder/volume/drivers/violin/v6000_iscsi.py b/cinder/volume/drivers/violin/v6000_iscsi.py index 770f39ee0d6..aa525e9c73b 100644 --- a/cinder/volume/drivers/violin/v6000_iscsi.py +++ b/cinder/volume/drivers/violin/v6000_iscsi.py @@ -150,7 +150,7 @@ class V6000ISCSIDriver(driver.ISCSIDriver): """Synchronously checks and re-exports volumes at cinder start time.""" pass - def create_export(self, context, volume): + def create_export(self, context, volume, connector): """Exports the volume.""" pass diff --git a/cinder/volume/drivers/violin/v7000_fcp.py b/cinder/volume/drivers/violin/v7000_fcp.py index 30d7d2c3420..f6aef8a9c7c 100644 --- a/cinder/volume/drivers/violin/v7000_fcp.py +++ b/cinder/volume/drivers/violin/v7000_fcp.py @@ -122,7 +122,7 @@ class V7000FCPDriver(driver.FibreChannelDriver): """Synchronously checks and re-exports volumes at cinder start time.""" pass - def create_export(self, context, volume): + def create_export(self, context, volume, connector): """Exports the volume.""" pass diff --git a/cinder/volume/drivers/vmware/vmdk.py b/cinder/volume/drivers/vmware/vmdk.py index 79edb36f011..20cdc5933a2 100644 --- a/cinder/volume/drivers/vmware/vmdk.py +++ b/cinder/volume/drivers/vmware/vmdk.py @@ -587,7 +587,7 @@ class VMwareEsxVmdkDriver(driver.VolumeDriver): def terminate_connection(self, volume, connector, force=False, **kwargs): pass - def create_export(self, context, volume): + def create_export(self, context, volume, connector): pass def ensure_export(self, context, volume): diff --git a/cinder/volume/drivers/windows/windows.py b/cinder/volume/drivers/windows/windows.py index 192728fc2f3..c5d9efa2750 100644 --- a/cinder/volume/drivers/windows/windows.py +++ b/cinder/volume/drivers/windows/windows.py @@ -133,7 +133,7 @@ class WindowsDriver(driver.ISCSIDriver): # iSCSI targets exported by WinTarget persist after host reboot. pass - def create_export(self, context, volume): + def create_export(self, context, volume, connector): """Driver entry point to get the export info for a new volume.""" # Since the iSCSI targets are not reused, being deleted when the # volume is detached, we should clean up existing targets before diff --git a/cinder/volume/drivers/xio.py b/cinder/volume/drivers/xio.py index 6dd693d078c..92aad19ba99 100644 --- a/cinder/volume/drivers/xio.py +++ b/cinder/volume/drivers/xio.py @@ -1486,7 +1486,7 @@ class XIOISEISCSIDriver(driver.ISCSIDriver): def delete_snapshot(self, snapshot): return self.driver.delete_snapshot(snapshot) - def create_export(self, context, volume): + def create_export(self, context, volume, connector): return self.driver.create_export(context, volume) def ensure_export(self, context, volume): @@ -1595,7 +1595,7 @@ class XIOISEFCDriver(driver.FibreChannelDriver): def delete_snapshot(self, snapshot): return self.driver.delete_snapshot(snapshot) - def create_export(self, context, volume): + def create_export(self, context, volume, connector): return self.driver.create_export(context, volume) def ensure_export(self, context, volume): diff --git a/cinder/volume/drivers/zfssa/zfssaiscsi.py b/cinder/volume/drivers/zfssa/zfssaiscsi.py index 933daac9dc1..671c3b26f1e 100644 --- a/cinder/volume/drivers/zfssa/zfssaiscsi.py +++ b/cinder/volume/drivers/zfssa/zfssaiscsi.py @@ -366,7 +366,7 @@ class ZFSSAISCSIDriver(driver.ISCSIDriver): self._update_volume_status() return self._stats - def create_export(self, context, volume): + def create_export(self, context, volume, connector): pass def remove_export(self, context, volume): diff --git a/cinder/volume/manager.py b/cinder/volume/manager.py index 3b937939f13..6c5db7ffe40 100644 --- a/cinder/volume/manager.py +++ b/cinder/volume/manager.py @@ -1085,7 +1085,7 @@ class VolumeManager(manager.SchedulerDependentManager): try: model_update = self.driver.create_export(context.elevated(), - volume) + volume, connector) except exception.CinderException: err_msg = (_("Create export for volume failed.")) LOG.exception(err_msg, resource=volume)