From ba2168d8fe83cbaf62a53d6d91bf704bbecb9455 Mon Sep 17 00:00:00 2001 From: "Walter A. Boring IV" Date: Tue, 12 Mar 2019 18:28:43 +0000 Subject: [PATCH] Revert "Fix VxFlexOs KeyError after upgrade" This reverts commit 6b60614afaf88819ce92a2d0ed269035a3c8b261. The Cinder ScaleIO driver has been rebranded to VxFlexOS, which is fine. What shouldn't have happened is that the rebranding made it's way into os-brick, resulting in a new connector protocol and mapping. The new VxFlexOS driver in cinder should just use the existing scaleio connector protocol, as it's not customer/user facing, and ensures backwards and forwards compatibility. Change-Id: Icf7063eb47368cb7b0ffb2e3f5e30903797c7b34 --- os_brick/initiator/connectors/vxflexos.py | 2 +- .../tests/initiator/connectors/test_vxflexos.py | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/os_brick/initiator/connectors/vxflexos.py b/os_brick/initiator/connectors/vxflexos.py index 4f7c1e899..f542dc6f6 100644 --- a/os_brick/initiator/connectors/vxflexos.py +++ b/os_brick/initiator/connectors/vxflexos.py @@ -276,7 +276,7 @@ class VxFlexOsConnector(base.BaseLinuxConnector): try: self.volume_id = connection_properties['vxflexos_volume_id'] except KeyError: - self.volume_id = connection_properties.get('scaleIO_volume_id') + self.volume_id = connection_properties['scaleIO_volume_id'] d_option_used = True if d_option_used: LOG.warning("Deprecated: scaleIO_volname and scaleIO_volume_id " diff --git a/os_brick/tests/initiator/connectors/test_vxflexos.py b/os_brick/tests/initiator/connectors/test_vxflexos.py index cb7212dd3..4d0bd46df 100644 --- a/os_brick/tests/initiator/connectors/test_vxflexos.py +++ b/os_brick/tests/initiator/connectors/test_vxflexos.py @@ -171,13 +171,6 @@ class VxFlexOsConnectorTestCase(test_connector.ConnectorTestCase): """Successful connect to volume""" self.connector.connect_volume(self.fake_connection_properties) - def test_connect_volume_without_volume_id(self): - """Successful connect to volume without a Volume Id""" - connection_properties = dict(self.fake_connection_properties) - connection_properties.pop('vxflexos_volume_id') - - self.connector.connect_volume(connection_properties) - def test_connect_with_bandwidth_limit(self): """Successful connect to volume with bandwidth limit""" self.fake_connection_properties['bandwidthLimit'] = '500' @@ -198,13 +191,6 @@ class VxFlexOsConnectorTestCase(test_connector.ConnectorTestCase): """Successful disconnect from volume""" self.connector.disconnect_volume(self.fake_connection_properties, None) - def test_disconnect_volume_without_volume_id(self): - """Successful disconnect from volume without a Volume Id""" - connection_properties = dict(self.fake_connection_properties) - connection_properties.pop('vxflexos_volume_id') - - self.connector.disconnect_volume(connection_properties, None) - def test_error_id(self): """Fail to connect with bad volume name""" self.fake_connection_properties['vxflexos_volume_id'] = 'bad_id'