From: Patrick East Date: Fri, 18 Dec 2015 20:35:42 +0000 (-0800) Subject: Add empty initialize_connection method to PureBaseVolumeDriver X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=662bd2adfbf155b03e83e65c5a3d9878bb67ec39;p=openstack-build%2Fcinder-build.git Add empty initialize_connection method to PureBaseVolumeDriver This will clean up a weird workaround needed for the unit tests… Change-Id: Ie3db74516c74d15237617ac741d3061bd46212d2 Closes-Bug: 1527739 --- diff --git a/cinder/tests/unit/test_pure.py b/cinder/tests/unit/test_pure.py index 83d385d62..6e2a0d81e 100644 --- a/cinder/tests/unit/test_pure.py +++ b/cinder/tests/unit/test_pure.py @@ -226,15 +226,10 @@ class PureDriverTestCase(test.TestCase): class PureBaseVolumeDriverTestCase(PureDriverTestCase): - - class fake_pure_base_volume_driver(pure.PureBaseVolumeDriver): - def initialize_connection(): - pass - def setUp(self): super(PureBaseVolumeDriverTestCase, self).setUp() - self.driver = self.fake_pure_base_volume_driver( - configuration=self.mock_config) + self.driver = pure.PureBaseVolumeDriver(configuration=self.mock_config) + self.driver._array = self.array self.array.get_rest_version.return_value = '1.4' diff --git a/cinder/volume/drivers/pure.py b/cinder/volume/drivers/pure.py index 66c6c8214..e8c930bbe 100644 --- a/cinder/volume/drivers/pure.py +++ b/cinder/volume/drivers/pure.py @@ -216,6 +216,13 @@ class PureBaseVolumeDriver(san.SanDriver): def create_export(self, context, volume, connector): pass + def initialize_connection(self, volume, connector, initiator_data=None): + """Connect the volume to the specified initiator in Purity. + + This implementation is specific to the host type (iSCSI, FC, etc). + """ + raise NotImplementedError + def _get_host(self, connector): """Get a Purity Host that corresponds to the host in the connector.