]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Add connector object to create_export
authorWalter A. Boring IV <walter.boring@hp.com>
Thu, 16 Jul 2015 21:48:37 +0000 (14:48 -0700)
committerWalter A. Boring IV <walter.boring@hp.com>
Thu, 6 Aug 2015 22:24:38 +0000 (15:24 -0700)
This patch adds the connector object as a parameter
to all driver create_export calls.  This will enable
drivers to actually use create_export method for doing
what they are now doing inside of initialize_connection.

Change-Id: Ia13897a3704080fc5da71e6c8445f308d474f64a
Implements: blueprint add-create-export-connector

66 files changed:
cinder/tests/unit/test_cloudbyte.py
cinder/tests/unit/test_gpfs.py
cinder/tests/unit/test_netapp.py
cinder/tests/unit/test_storpool.py
cinder/tests/unit/test_storwize_svc.py
cinder/tests/unit/test_vmware_vmdk.py
cinder/tests/unit/volume/drivers/test_datera.py
cinder/tests/unit/windows/test_windows.py
cinder/volume/driver.py
cinder/volume/drivers/block_device.py
cinder/volume/drivers/blockbridge.py
cinder/volume/drivers/cloudbyte/cloudbyte.py
cinder/volume/drivers/datera.py
cinder/volume/drivers/dell/dell_storagecenter_common.py
cinder/volume/drivers/dothill/dothill_fc.py
cinder/volume/drivers/dothill/dothill_iscsi.py
cinder/volume/drivers/drbdmanagedrv.py
cinder/volume/drivers/emc/emc_cli_fc.py
cinder/volume/drivers/emc/emc_cli_iscsi.py
cinder/volume/drivers/emc/emc_vmax_fc.py
cinder/volume/drivers/emc/emc_vmax_iscsi.py
cinder/volume/drivers/emc/scaleio.py
cinder/volume/drivers/eqlx.py
cinder/volume/drivers/glusterfs.py
cinder/volume/drivers/hgst.py
cinder/volume/drivers/hitachi/hbsd_fc.py
cinder/volume/drivers/hitachi/hbsd_iscsi.py
cinder/volume/drivers/hitachi/hnas_iscsi.py
cinder/volume/drivers/huawei/huawei_driver.py
cinder/volume/drivers/ibm/gpfs.py
cinder/volume/drivers/ibm/storwize_svc/__init__.py
cinder/volume/drivers/ibm/xiv_ds8k.py
cinder/volume/drivers/infortrend/infortrend_fc_cli.py
cinder/volume/drivers/infortrend/infortrend_iscsi_cli.py
cinder/volume/drivers/lvm.py
cinder/volume/drivers/netapp/dataontap/fc_7mode.py
cinder/volume/drivers/netapp/dataontap/fc_cmode.py
cinder/volume/drivers/netapp/dataontap/iscsi_7mode.py
cinder/volume/drivers/netapp/dataontap/iscsi_cmode.py
cinder/volume/drivers/netapp/eseries/fc_driver.py
cinder/volume/drivers/netapp/eseries/iscsi_driver.py
cinder/volume/drivers/nimble.py
cinder/volume/drivers/prophetstor/dplcommon.py
cinder/volume/drivers/pure.py
cinder/volume/drivers/rbd.py
cinder/volume/drivers/remotefs.py
cinder/volume/drivers/san/hp/hp_3par_fc.py
cinder/volume/drivers/san/hp/hp_3par_iscsi.py
cinder/volume/drivers/san/hp/hp_lefthand_cliq_proxy.py
cinder/volume/drivers/san/hp/hp_lefthand_iscsi.py
cinder/volume/drivers/san/hp/hp_lefthand_rest_proxy.py
cinder/volume/drivers/san/hp/hp_xp_fc.py
cinder/volume/drivers/san/san.py
cinder/volume/drivers/scality.py
cinder/volume/drivers/sheepdog.py
cinder/volume/drivers/solidfire.py
cinder/volume/drivers/srb.py
cinder/volume/drivers/storpool.py
cinder/volume/drivers/violin/v6000_fcp.py
cinder/volume/drivers/violin/v6000_iscsi.py
cinder/volume/drivers/violin/v7000_fcp.py
cinder/volume/drivers/vmware/vmdk.py
cinder/volume/drivers/windows/windows.py
cinder/volume/drivers/xio.py
cinder/volume/drivers/zfssa/zfssaiscsi.py
cinder/volume/manager.py

index 0cbe523da38e1d567f7d297f9fbeea472eebc4b2..662908dc7a934e96295e0addedb85ce012c6b987 100644 (file)
@@ -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,
index 8e3a0edd4c59f57108fa78aab6117aad0a8ed435..480d14281d7547b98213021edc7d9550c24e40fe 100644 (file)
@@ -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('', ''))
index 32aad89b62bc7e165d0033fdbedc08ac2ef1c21b..104be3bc6966f3cfc8e247420b19c70800e4ad7a 100644 (file)
@@ -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'}
index 780e062714c143c899e7d494b4f65d88655c85b5..71f8f36fb9b1ac358485656f318491b3563ab165 100644 (file)
@@ -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):
index e063c9f4503e43efc23bc3c44112f59ef87bd3af..d8a2a4b084a4a486882eae13ee926e362e7ba67d 100644 (file)
@@ -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
index d28c5eb8bd269ccaa049a55ad2be10381d11f1b6..efda339ee920f05441bfb7c6f82cd96917979a63 100644 (file)
@@ -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."""
index 42cf9b3b655d88548fc8f2597058e870e127fdab..8c429601404e59e0e56eb82a5267beaba4a65d6d 100644 (file)
@@ -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 = {}
index e26cfcb3652010c976efad3293db3e48094bde56..8e73d16304757455e2156b2b7f6cdaf3ce3d28cd 100644 (file)
@@ -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:
index 9275d3fd063051d6ffbfdcb2fd254473bd8e2d75..66f8d6361bca660107d65e2ea0e48de15ccf1cf2 100644 (file)
@@ -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
index bed0c5867bc4433c7b9d41bf076af13d5e818aae..cfe778a2eb6783826997e46d19c0845bdc621e86 100644 (file)
@@ -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,
index 7661841d1866e8ede20035a7541d6ed83d707c77..b0530d0bc0fbd2824410cd78091a487100a079d6 100644 (file)
@@ -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
 
index e494702190c7ee4853b5b88c0d5933e3f8594a35..c6c8e6bc65564eb10fd2a698e042b6ba3f133a49 100644 (file)
@@ -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()
index 19523accaba27995d05cce866760637cb46c8253..fa6ff7ae9e0ada1685c7faf305ca412117a0f962 100644 (file)
@@ -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):
index 4de4e123e5bc0681f74b03308924640d66e568af..c8741cab53193afa7d5a70ef3833ca3caec2c633 100644 (file)
@@ -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
index 840c435424ed3ffcd6dfcc3c7e1cfa1364da85f8..0c47ded05f9ea680c61ffc921f0304fe6dc99aac 100644 (file)
@@ -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):
index ced984340d72162c1dabb640c7f91cf64616a1f2..de9357446c6effd62fc0f44a14768530222ff29c 100644 (file)
@@ -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):
index 306ce9297abc2bb5c941f7aa197fe8b62c24691d..aa994f298ba7ffc730bc244f6eef32588001ca7f 100644 (file)
@@ -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,
index 9853e6da43bf399935b34d2cc993e144b99a7fe7..cc43fd9115e426f010a20b238f0040a237bb2909 100644 (file)
@@ -109,7 +109,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
 
index 507619623714407a9e7f43494f538d7cda47fd4c..19b9ac5577cdee51c43f662a02ec0ac0089c2b18 100644 (file)
@@ -106,7 +106,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
 
index 7748abb17ceaed9cad606e3e1b051d42dc0fe1a7..08376cd3f71da366cffd70110d2fe77947fbd57e 100644 (file)
@@ -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
 
index 1477392b8881cd2ef94f267e2445c9d1043db976..cfae7121fc2ee1b8452a5fc9db9dc52c7d030890 100644 (file)
@@ -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
 
index 8da7887325ba7dcf53d4b0497eca35b48cbb3db3..d96ba836a82a7642e1081dde8714dd2e670f1700 100644 (file)
@@ -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
 
index 74adebebeb0baffc880530403767053b757319ba..51f941760c629c5e7bd3822815afe2f539532fe3 100644 (file)
@@ -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
index 078344cdc2ded0102a13cb2a97c284723ba2445f..ca63a2a52c294d9f682abb390f9553435bff8950 100644 (file)
@@ -275,7 +275,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
 
index 59b0b29f2e61cf93cce71aa87b12163801616c54..2c27037cb51b652ec48de0668816803d4bd746c0 100644 (file)
@@ -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
 
index fee7332c074275d30afc9ab85a07c04a7110d274..00d51b25e000fae3871a30bb3d6543e5100574fb 100644 (file)
@@ -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):
index d2f06385389e8a4b33c4a3c52cbdfcb21d0cf559..efb4ed0e74fbc40c236c7541b4bbd26eaca3aa88 100644 (file)
@@ -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):
index 925d72583fd2fb9347e896fe4276f5aa4cb5482e..6427ac0725f885aa6d7581e499d384a35c9b1e38 100644 (file)
@@ -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:
index 23b6bc557302d04cab110b1926d604ff2cdca974..30d2fbb9d90fdf7fd0e7908d0c16008020dea069 100644 (file)
@@ -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
 
index ae3853a39af157dda33da7cc9b841c81f576a4f5..1849c30ccb733df05e75134d7af1a29c278b6015 100644 (file)
@@ -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
 
index f78594113dcbf766ea1f3274eac2cc0c71ddae66..5ef14515f7aece8f049ac798a9b99ce65a399c12 100644 (file)
@@ -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
 
index 302955ec5b696241fb54e72241899ae184a60454..93a24e206e46aa77cce034a121174092d233ceb8 100644 (file)
@@ -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)
index 767c108c486cf08763d9cfe4b5a11ef1fc2b4a06..d4da587f3a433733634d0f89f7ff31a46bd330c4 100644 (file)
@@ -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
index 07d97c4b137e66a1785c434a2c6fcbd08acb6f21..18ba89392253157f45a5725dcb52b437453297a1 100644 (file)
@@ -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
index a814a71f88ae0b1c596cf4680d6b644cde72fc0b..ff5a68c7844c3f48045797432f30cf4bd63a8fcb 100644 (file)
@@ -651,7 +651,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
 
index 8b06e621670c09788fb4efb963e27a19e2aba8c9..3749c8607cef9014ba282f32f71839a0d09c4008 100644 (file)
@@ -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):
index 856d8b510480de9e17839753da585cc943e7d613..13d60b61492dbe4aee70778f725e6c60503d7c52 100644 (file)
@@ -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):
index 2a200f1cb3ab1a728b2dc5336f9ecc223b8360db..eebb20282ed9a3a1fcea24b0728f2b5e1d730f8f 100644 (file)
@@ -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):
index 482d0552254e99f4e93f6d9610b64006a10beaa9..f4c6da7b89cb502d86dba2b10762f7dbd934e2e0 100644 (file)
@@ -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):
index 1de849df61226bfae3cf1273c5fe9423e41f4e7d..3930afc1906309ed06f6cc250404299471382706 100644 (file)
@@ -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):
index bd1af9f77fe73e777b9d956d75228f81062d3191..df96bb1e25b9d7eb2844205aefca71ba85628020 100644 (file)
@@ -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):
index df6236e2f27a99ef1e6cba80e87e3b553c200d50..a32ccc152eab3b139ef2377b0f7abfd941bc965c 100755 (executable)
@@ -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'])
 
index cf54a827a3897d94cdc4eb2c9ea9ed141fdeaed9..a09b9a1059cf305c1eb246232f0cb42560e3069e 100644 (file)
@@ -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):
index 7fa0f386b5da1d273f1ff9155b3cfdc75445a2c4..28790703f373b8019664de501b3a044d919209f9 100644 (file)
@@ -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):
index 2ffb22e17d49f5c3da801d133de378eada87542e..c94294ea77e20fb698b34006231cce5a89a01fc0 100644 (file)
@@ -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
 
index 78e76b1781fae3699e8145c7ff92895cdb4daefe..c35e0b2f0b7548162b52c63dd3e6590e47c28931 100644 (file)
@@ -281,7 +281,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
index db6c547f0e99e8afb183cb5dc9db909e023de420..fc1e7ae355e45be65d95fb0654f015e70f79daf4 100644 (file)
@@ -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):
index a51f837c4f005131a8ef137300089556f6330808..0d7868fe21cfdc32e0cf536cb4579448564a0411 100644 (file)
@@ -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)
index 884e8d6d0db2bb15e856b1dbfda2e4a4b3a8c380..c4b635bea41ab69ca75f1060d8ef296f1190c371 100644 (file)
@@ -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):
index 1bd35797b91b803eaf409b89ff0485f1835dedf7..ed118ec5dc616b9457d33b57628dfc4b89e641cf 100644 (file)
@@ -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)
index 4c4dfef41a1b4255a75790fdfa65d4128a2de979..ff32fbe0dde01d83bfe01f3e8bc0aed303e38022 100644 (file)
@@ -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):
index b67f5d9528f341ea2ad549144c45278d1dc8d4e6..ea2f6f4782c8245a9360b6e84ed5eb027a19f002 100644 (file)
@@ -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):
index a92f81bfd1f9b662509ab7d3566ad763ab868eea..6707a0f5416e67a4850272b260842d526f312217 100644 (file)
@@ -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
 
index a03fb6509ffcb5355d1157270668120114aa3694..904f18ba1296705bfac20c9f486e54c8c8d96d5e 100644 (file)
@@ -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
index bd5dee3c29e1f026323709fb2776d34b6b915915..a20ce25c8616794951c44e2344e79b5548cd3c78 100644 (file)
@@ -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
 
index 1efb6ee9c990e02eaa35a4655a1c2ea76ed528e7..e330d9892fdd4672d7af055f4199354f6d6ef9ec 100644 (file)
@@ -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,
index 75436e022486bc19e1bd77ad4833a104f59c926e..8d163076874e551d61a7dd4284489f1d1002c606 100644 (file)
@@ -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)
index ae49beaf86c636a9dc0bebc0c19451971cf44b64..c152fa2a78f6d61e2d3cc4ef6b3f1f1c02253bf7 100644 (file)
@@ -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):
index 7e7953b8d572ad3ccc7d88f6bd1b2faf8633ef59..af19efa3b9965a07e8266ecc9a73422212bd7841 100644 (file)
@@ -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
 
index 770f39ee0d6a2333c4e66bf6412519683cd56096..aa525e9c73bc0748ebc13f3c471d1a067e5e6aa6 100644 (file)
@@ -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
 
index 30d7d2c342098aab8dd957260c36d48a56efae05..f6aef8a9c7ce171d739b0bb392d43eb9187c727d 100644 (file)
@@ -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
 
index 79edb36f011a2faca4c0e3aeea19a371968fd8bf..20cdc5933a2116663805b1bf7c1c04f787bc9618 100644 (file)
@@ -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):
index 192728fc2f3c06b9c6e8bd4154331fe271242a7c..c5d9efa2750d9394d23d007e977b37f1087b32c2 100644 (file)
@@ -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
index 6dd693d078c3591cf992a93dbb41dd78183c596a..92aad19ba999128479de28613586f8087a6d56c9 100644 (file)
@@ -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):
index 933daac9dc118bfeb98f18d4c220fa9f5c9effd1..671c3b26f1e7ab8af4b2819f2d9be33030ed1c53 100644 (file)
@@ -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):
index 3b937939f1319f7a133aa83bf8f113ececd69c2e..6c5db7ffe402996ade5385067b578a4d3964847f 100644 (file)
@@ -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)