Merge "ScaleIO: More connection info backward compatibility" into stable/victoria
This commit is contained in:
commit
a280d9f771
|
@ -100,7 +100,7 @@ class ScaleIOConnector(base.BaseLinuxConnector):
|
||||||
password = priv_scaleio.get_connector_password(
|
password = priv_scaleio.get_connector_password(
|
||||||
CONNECTOR_CONF_PATH,
|
CONNECTOR_CONF_PATH,
|
||||||
connection_properties['config_group'],
|
connection_properties['config_group'],
|
||||||
connection_properties['failed_over'])
|
connection_properties.get('failed_over', False))
|
||||||
return password, None
|
return password, None
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
msg = _("Error getting ScaleIO connector password from "
|
msg = _("Error getting ScaleIO connector password from "
|
||||||
|
|
|
@ -320,3 +320,14 @@ class ScaleIOConnectorTestCase(test_connector.ConnectorTestCase):
|
||||||
mock_device_size.return_value)
|
mock_device_size.return_value)
|
||||||
self.rescan_vols_mock.assert_called_once_with(
|
self.rescan_vols_mock.assert_called_once_with(
|
||||||
self.connector.RESCAN_VOLS_OP_CODE)
|
self.connector.RESCAN_VOLS_OP_CODE)
|
||||||
|
|
||||||
|
def test_connection_properties_without_failed_over(self):
|
||||||
|
"""Handle connection properties with 'failed_over' missing"""
|
||||||
|
connection_properties = dict(self.fake_connection_properties)
|
||||||
|
connection_properties.pop('failed_over')
|
||||||
|
|
||||||
|
self.connector.connect_volume(connection_properties)
|
||||||
|
self.get_password_mock.assert_called_once_with(
|
||||||
|
scaleio.CONNECTOR_CONF_PATH,
|
||||||
|
connection_properties['config_group'],
|
||||||
|
False)
|
||||||
|
|
Loading…
Reference in New Issue