Browse Source

Merge "ScaleIO: More connection info backward compatibility" into stable/ussuri

changes/95/784095/1 3.0.5
Zuul 1 month ago
committed by Gerrit Code Review
parent
commit
2611c32d7a
2 changed files with 12 additions and 1 deletions
  1. +1
    -1
      os_brick/initiator/connectors/scaleio.py
  2. +11
    -0
      os_brick/tests/initiator/connectors/test_scaleio.py

+ 1
- 1
os_brick/initiator/connectors/scaleio.py View File

@ -100,7 +100,7 @@ class ScaleIOConnector(base.BaseLinuxConnector):
password = priv_scaleio.get_connector_password(
CONNECTOR_CONF_PATH,
connection_properties['config_group'],
connection_properties['failed_over'])
connection_properties.get('failed_over', False))
return password, None
except Exception as e:
msg = _("Error getting ScaleIO connector password from "


+ 11
- 0
os_brick/tests/initiator/connectors/test_scaleio.py View File

@ -319,3 +319,14 @@ class ScaleIOConnectorTestCase(test_connector.ConnectorTestCase):
mock_device_size.return_value)
self.rescan_vols_mock.assert_called_once_with(
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…
Cancel
Save