Revert "rename ScaleIO connector to VxFlex OS"
This reverts commit a7f7abc5b8d0e230bb9b586422df0438358b42d1. 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: Ia1e119c16091bbf6ff79e0acea8c1a7c656d6dd1
This commit is contained in:
parent
ba2168d8fe
commit
3cfdf89837
os_brick
initiator
tests/initiator
releasenotes/notes
@ -64,4 +64,3 @@ VERITAS_HYPERSCALE = "VERITAS_HYPERSCALE"
|
||||
STORPOOL = "STORPOOL"
|
||||
NVME = "NVME"
|
||||
NVMEOF = "NVMEOF"
|
||||
VXFLEXOS = "VXFLEXOS"
|
||||
|
@ -55,6 +55,7 @@ connector_list = [
|
||||
'os_brick.initiator.connectors.drbd.DRBDConnector',
|
||||
'os_brick.initiator.connectors.huawei.HuaweiStorHyperConnector',
|
||||
'os_brick.initiator.connectors.hgst.HGSTConnector',
|
||||
'os_brick.initiator.connectors.scaleio.ScaleIOConnector',
|
||||
'os_brick.initiator.connectors.disco.DISCOConnector',
|
||||
'os_brick.initiator.connectors.vmware.VmdkConnector',
|
||||
'os_brick.initiator.windows.base.BaseWindowsConnector',
|
||||
@ -64,16 +65,8 @@ connector_list = [
|
||||
'os_brick.initiator.connectors.vrtshyperscale.HyperScaleConnector',
|
||||
'os_brick.initiator.connectors.storpool.StorPoolConnector',
|
||||
'os_brick.initiator.connectors.nvme.NVMeConnector',
|
||||
'os_brick.initiator.connectors.vxflexos.VxFlexOsConnector'
|
||||
]
|
||||
|
||||
|
||||
# protocol_mapping is used for protocol renames
|
||||
# place old protocol name in dict key and new protocol name in value
|
||||
protocol_mapping = {
|
||||
initiator.SCALEIO: initiator.VXFLEXOS
|
||||
}
|
||||
|
||||
# Mappings used to determine who to construct in the factory
|
||||
_connector_mapping_linux = {
|
||||
initiator.AOE:
|
||||
@ -107,6 +100,8 @@ _connector_mapping_linux = {
|
||||
'os_brick.initiator.connectors.hgst.HGSTConnector',
|
||||
initiator.RBD:
|
||||
'os_brick.initiator.connectors.rbd.RBDConnector',
|
||||
initiator.SCALEIO:
|
||||
'os_brick.initiator.connectors.scaleio.ScaleIOConnector',
|
||||
initiator.DISCO:
|
||||
'os_brick.initiator.connectors.disco.DISCOConnector',
|
||||
initiator.SHEEPDOG:
|
||||
@ -123,8 +118,6 @@ _connector_mapping_linux = {
|
||||
'os_brick.initiator.connectors.nvme.NVMeConnector',
|
||||
initiator.NVMEOF:
|
||||
'os_brick.initiator.connectors.nvme.NVMeConnector',
|
||||
initiator.VXFLEXOS:
|
||||
'os_brick.initiator.connectors.vxflexos.VxFlexOsConnector',
|
||||
}
|
||||
|
||||
# Mapping for the S390X platform
|
||||
@ -284,15 +277,6 @@ class InitiatorConnector(object):
|
||||
{'protocol': protocol, 'arch': arch})
|
||||
protocol = protocol.upper()
|
||||
|
||||
if protocol in protocol_mapping:
|
||||
_protocol = protocol
|
||||
protocol = protocol_mapping[_protocol]
|
||||
LOG.warning("Protocol %(old_name)s is deprecated and "
|
||||
"will be removed in future release, "
|
||||
"use %(new_name)s protocol instead",
|
||||
{'old_name': _protocol,
|
||||
'new_name': protocol})
|
||||
|
||||
# set any special kwargs needed by connectors
|
||||
if protocol in (initiator.NFS, initiator.GLUSTERFS,
|
||||
initiator.SCALITY, initiator.QUOBYTE,
|
||||
|
@ -33,8 +33,8 @@ DEVICE_SCAN_ATTEMPTS_DEFAULT = 3
|
||||
synchronized = lockutils.synchronized_with_prefix('os-brick-')
|
||||
|
||||
|
||||
class VxFlexOsConnector(base.BaseLinuxConnector):
|
||||
"""Class implements the connector driver for VxFlex OS."""
|
||||
class ScaleIOConnector(base.BaseLinuxConnector):
|
||||
"""Class implements the connector driver for ScaleIO."""
|
||||
|
||||
OK_STATUS_CODE = 200
|
||||
VOLUME_NOT_MAPPED_ERROR = 84
|
||||
@ -45,7 +45,7 @@ class VxFlexOsConnector(base.BaseLinuxConnector):
|
||||
def __init__(self, root_helper, driver=None,
|
||||
device_scan_attempts=initiator.DEVICE_SCAN_ATTEMPTS_DEFAULT,
|
||||
*args, **kwargs):
|
||||
super(VxFlexOsConnector, self).__init__(
|
||||
super(ScaleIOConnector, self).__init__(
|
||||
root_helper,
|
||||
driver=driver,
|
||||
device_scan_attempts=device_scan_attempts,
|
||||
@ -66,7 +66,7 @@ class VxFlexOsConnector(base.BaseLinuxConnector):
|
||||
|
||||
@staticmethod
|
||||
def get_connector_properties(root_helper, *args, **kwargs):
|
||||
"""The VxFlex OS connector properties."""
|
||||
"""The ScaleIO connector properties."""
|
||||
return {}
|
||||
|
||||
def get_search_path(self):
|
||||
@ -106,7 +106,7 @@ class VxFlexOsConnector(base.BaseLinuxConnector):
|
||||
def _wait_for_volume_path(self, path):
|
||||
if not os.path.isdir(path):
|
||||
msg = (
|
||||
_("VxFlex OS volume %(volume_id)s not found at "
|
||||
_("ScaleIO volume %(volume_id)s not found at "
|
||||
"expected path.") % {'volume_id': self.volume_id}
|
||||
)
|
||||
|
||||
@ -127,7 +127,7 @@ class VxFlexOsConnector(base.BaseLinuxConnector):
|
||||
break
|
||||
|
||||
if not disk_filename:
|
||||
msg = (_("VxFlex OS volume %(volume_id)s not found.") %
|
||||
msg = (_("ScaleIO volume %(volume_id)s not found.") %
|
||||
{'volume_id': self.volume_id})
|
||||
LOG.debug(msg)
|
||||
raise exception.BrickException(message=msg)
|
||||
@ -145,7 +145,7 @@ class VxFlexOsConnector(base.BaseLinuxConnector):
|
||||
}
|
||||
)
|
||||
|
||||
LOG.info("VxFlex OS get client id by ip request: %(request)s",
|
||||
LOG.info("ScaleIO get client id by ip request: %(request)s",
|
||||
{'request': request})
|
||||
|
||||
r = requests.get(
|
||||
@ -168,7 +168,7 @@ class VxFlexOsConnector(base.BaseLinuxConnector):
|
||||
LOG.error(msg)
|
||||
raise exception.BrickException(message=msg)
|
||||
|
||||
LOG.info("VxFlex os sdc id is %(sdc_id)s.",
|
||||
LOG.info("ScaleIO sdc id is %(sdc_id)s.",
|
||||
{'sdc_id': sdc_id})
|
||||
return sdc_id
|
||||
|
||||
@ -191,7 +191,7 @@ class VxFlexOsConnector(base.BaseLinuxConnector):
|
||||
)
|
||||
|
||||
LOG.info(
|
||||
"VxFlex OS get volume id by name request: %(request)s",
|
||||
"ScaleIO get volume id by name request: %(request)s",
|
||||
{'request': request}
|
||||
)
|
||||
|
||||
@ -219,7 +219,7 @@ class VxFlexOsConnector(base.BaseLinuxConnector):
|
||||
LOG.error(msg)
|
||||
raise exception.BrickException(message=msg)
|
||||
|
||||
LOG.info("VxFlex OS volume id is %(volume_id)s.",
|
||||
LOG.info("ScaleIO volume id is %(volume_id)s.",
|
||||
{'volume_id': volume_id})
|
||||
return volume_id
|
||||
|
||||
@ -266,24 +266,8 @@ class VxFlexOsConnector(base.BaseLinuxConnector):
|
||||
|
||||
def get_config(self, connection_properties):
|
||||
self.local_sdc_ip = connection_properties['hostIP']
|
||||
# handle deprecated parameters for backward compatibility
|
||||
d_option_used = False
|
||||
try:
|
||||
self.volume_name = connection_properties['vxflexos_volname']
|
||||
except KeyError:
|
||||
self.volume_name = connection_properties['scaleIO_volname']
|
||||
d_option_used = True
|
||||
try:
|
||||
self.volume_id = connection_properties['vxflexos_volume_id']
|
||||
except KeyError:
|
||||
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 "
|
||||
"connector parameters are deprecated and will be "
|
||||
"removed in future release, use "
|
||||
"vxflexos_volname and vxflexos_volume_id parameters "
|
||||
"instead.")
|
||||
self.volume_name = connection_properties['scaleIO_volname']
|
||||
self.volume_id = connection_properties['scaleIO_volume_id']
|
||||
self.server_ip = connection_properties['serverIP']
|
||||
self.server_port = connection_properties['serverPort']
|
||||
self.server_username = connection_properties['serverUsername']
|
||||
@ -296,7 +280,7 @@ class VxFlexOsConnector(base.BaseLinuxConnector):
|
||||
return device_info
|
||||
|
||||
@utils.trace
|
||||
@lockutils.synchronized('vxflexos', 'vxflexos-')
|
||||
@lockutils.synchronized('scaleio', 'scaleio-')
|
||||
def connect_volume(self, connection_properties):
|
||||
"""Connect the volume.
|
||||
|
||||
@ -308,7 +292,7 @@ class VxFlexOsConnector(base.BaseLinuxConnector):
|
||||
device_info = self.get_config(connection_properties)
|
||||
LOG.debug(
|
||||
_(
|
||||
"VxFlex OS Volume name: %(volume_name)s, SDC IP: %(sdc_ip)s, "
|
||||
"scaleIO Volume name: %(volume_name)s, SDC IP: %(sdc_ip)s, "
|
||||
"REST Server IP: %(server_ip)s, "
|
||||
"REST Server username: %(username)s, "
|
||||
"iops limit:%(iops_limit)s, "
|
||||
@ -324,7 +308,7 @@ class VxFlexOsConnector(base.BaseLinuxConnector):
|
||||
}
|
||||
)
|
||||
|
||||
LOG.info("VxFlex OS sdc query guid command: %(cmd)s",
|
||||
LOG.info("ScaleIO sdc query guid command: %(cmd)s",
|
||||
{'cmd': self.GET_GUID_CMD})
|
||||
|
||||
try:
|
||||
@ -427,10 +411,10 @@ class VxFlexOsConnector(base.BaseLinuxConnector):
|
||||
return device_info
|
||||
|
||||
@utils.trace
|
||||
@lockutils.synchronized('vxflexos', 'vxflexos-')
|
||||
@lockutils.synchronized('scaleio', 'scaleio-')
|
||||
def disconnect_volume(self, connection_properties, device_info,
|
||||
force=False, ignore_errors=False):
|
||||
"""Disconnect the VxFlex OS volume.
|
||||
"""Disconnect the ScaleIO volume.
|
||||
|
||||
:param connection_properties: The dictionary that describes all
|
||||
of the target volume attributes.
|
||||
@ -441,17 +425,17 @@ class VxFlexOsConnector(base.BaseLinuxConnector):
|
||||
self.get_config(connection_properties)
|
||||
self.volume_id = self.volume_id or self._get_volume_id()
|
||||
LOG.info(
|
||||
"VxFlex OS disconnect volume in VxFlex OS brick volume driver."
|
||||
"ScaleIO disconnect volume in ScaleIO brick volume driver."
|
||||
)
|
||||
|
||||
LOG.debug(
|
||||
_("VxFlex OS Volume name: %(volume_name)s, SDC IP: %(sdc_ip)s, "
|
||||
_("ScaleIO Volume name: %(volume_name)s, SDC IP: %(sdc_ip)s, "
|
||||
"REST Server IP: %(server_ip)s"),
|
||||
{'volume_name': self.volume_name, 'sdc_ip': self.local_sdc_ip,
|
||||
'server_ip': self.server_ip}
|
||||
)
|
||||
|
||||
LOG.info("VxFlex OS sdc query guid command: %(cmd)s",
|
||||
LOG.info("ScaleIO sdc query guid command: %(cmd)s",
|
||||
{'cmd': self.GET_GUID_CMD})
|
||||
|
||||
try:
|
||||
@ -509,10 +493,10 @@ class VxFlexOsConnector(base.BaseLinuxConnector):
|
||||
"""Update the local kernel's size information.
|
||||
|
||||
Try and update the local kernel's size information
|
||||
for a VxFlex OS volume.
|
||||
for a ScaleIO volume.
|
||||
"""
|
||||
|
||||
LOG.info("VxFlex OS rescan volumes: %(cmd)s",
|
||||
LOG.info("ScaleIO rescan volumes: %(cmd)s",
|
||||
{'cmd': self.RESCAN_VOLS_CMD})
|
||||
|
||||
try:
|
||||
@ -532,7 +516,7 @@ class VxFlexOsConnector(base.BaseLinuxConnector):
|
||||
return self.get_device_size(volume_paths[0])
|
||||
|
||||
# if we got here, the volume is not mapped
|
||||
msg = (_("Error extending VxFlex OS volume"))
|
||||
msg = (_("Error extending ScaleIO volume"))
|
||||
LOG.error(msg)
|
||||
raise exception.BrickException(message=msg)
|
||||
|
@ -20,12 +20,12 @@ import six
|
||||
from oslo_concurrency import processutils as putils
|
||||
|
||||
from os_brick import exception
|
||||
from os_brick.initiator.connectors import vxflexos
|
||||
from os_brick.initiator.connectors import scaleio
|
||||
from os_brick.tests.initiator import test_connector
|
||||
|
||||
|
||||
class VxFlexOsConnectorTestCase(test_connector.ConnectorTestCase):
|
||||
"""Test cases for VxFlex OS connector."""
|
||||
class ScaleIOConnectorTestCase(test_connector.ConnectorTestCase):
|
||||
"""Test cases for ScaleIO connector."""
|
||||
|
||||
# Fake volume information
|
||||
vol = {
|
||||
@ -38,13 +38,13 @@ class VxFlexOsConnectorTestCase(test_connector.ConnectorTestCase):
|
||||
fake_guid = 'FAKE_GUID'
|
||||
|
||||
def setUp(self):
|
||||
super(VxFlexOsConnectorTestCase, self).setUp()
|
||||
super(ScaleIOConnectorTestCase, self).setUp()
|
||||
|
||||
self.fake_connection_properties = {
|
||||
'hostIP': test_connector.MY_IP,
|
||||
'serverIP': test_connector.MY_IP,
|
||||
'vxflexos_volname': self.vol['name'],
|
||||
'vxflexos_volume_id': self.vol['provider_id'],
|
||||
'scaleIO_volname': self.vol['name'],
|
||||
'scaleIO_volume_id': self.vol['provider_id'],
|
||||
'serverPort': 443,
|
||||
'serverUsername': 'test',
|
||||
'serverPassword': 'fake',
|
||||
@ -78,14 +78,14 @@ class VxFlexOsConnectorTestCase(test_connector.ConnectorTestCase):
|
||||
), status_code=404)
|
||||
|
||||
# Patch the request and os calls to fake versions
|
||||
self.mock_object(requests, 'get', self.handle_vxflexos_request)
|
||||
self.mock_object(requests, 'post', self.handle_vxflexos_request)
|
||||
self.mock_object(requests, 'get', self.handle_scaleio_request)
|
||||
self.mock_object(requests, 'post', self.handle_scaleio_request)
|
||||
self.mock_object(os.path, 'isdir', return_value=True)
|
||||
self.mock_object(os, 'listdir',
|
||||
return_value=["emc-vol-{}".format(self.vol['id'])])
|
||||
|
||||
# The actual VxFlex OS connector
|
||||
self.connector = vxflexos.VxFlexOsConnector(
|
||||
# The actual ScaleIO connector
|
||||
self.connector = scaleio.ScaleIOConnector(
|
||||
'sudo', execute=self.fake_execute)
|
||||
|
||||
class MockHTTPSResponse(requests.Response):
|
||||
@ -94,7 +94,7 @@ class VxFlexOsConnectorTestCase(test_connector.ConnectorTestCase):
|
||||
Defines the https replies from the mocked calls to do_request()
|
||||
"""
|
||||
def __init__(self, content, status_code=200):
|
||||
super(VxFlexOsConnectorTestCase.MockHTTPSResponse,
|
||||
super(ScaleIOConnectorTestCase.MockHTTPSResponse,
|
||||
self).__init__()
|
||||
|
||||
self._content = content
|
||||
@ -103,7 +103,7 @@ class VxFlexOsConnectorTestCase(test_connector.ConnectorTestCase):
|
||||
|
||||
def json(self, **kwargs):
|
||||
if isinstance(self._content, six.string_types):
|
||||
return super(VxFlexOsConnectorTestCase.MockHTTPSResponse,
|
||||
return super(ScaleIOConnectorTestCase.MockHTTPSResponse,
|
||||
self).json(**kwargs)
|
||||
|
||||
return self._content
|
||||
@ -114,7 +114,7 @@ class VxFlexOsConnectorTestCase(test_connector.ConnectorTestCase):
|
||||
return json.dumps(self._content)
|
||||
|
||||
self._content = self._content.encode('utf-8')
|
||||
return super(VxFlexOsConnectorTestCase.MockHTTPSResponse,
|
||||
return super(ScaleIOConnectorTestCase.MockHTTPSResponse,
|
||||
self).text
|
||||
|
||||
def fake_execute(self, *cmd, **kwargs):
|
||||
@ -125,7 +125,7 @@ class VxFlexOsConnectorTestCase(test_connector.ConnectorTestCase):
|
||||
"""Error when trying to call rootwrap drv_cfg"""
|
||||
raise putils.ProcessExecutionError("Test missing drv_cfg.")
|
||||
|
||||
def handle_vxflexos_request(self, url, *args, **kwargs):
|
||||
def handle_scaleio_request(self, url, *args, **kwargs):
|
||||
"""Fake REST server"""
|
||||
api_call = url.split(':', 2)[2].split('/', 1)[1].replace('api/', '')
|
||||
|
||||
@ -152,7 +152,7 @@ class VxFlexOsConnectorTestCase(test_connector.ConnectorTestCase):
|
||||
self.assertEqual(expected, actual)
|
||||
|
||||
@mock.patch.object(os.path, 'exists', return_value=True)
|
||||
@mock.patch.object(vxflexos.VxFlexOsConnector, '_wait_for_volume_path')
|
||||
@mock.patch.object(scaleio.ScaleIOConnector, '_wait_for_volume_path')
|
||||
def test_get_volume_paths(self, mock_wait_for_path, mock_exists):
|
||||
mock_wait_for_path.return_value = "emc-vol-vol1"
|
||||
expected = ['/dev/disk/by-id/emc-vol-vol1']
|
||||
@ -161,7 +161,7 @@ class VxFlexOsConnectorTestCase(test_connector.ConnectorTestCase):
|
||||
self.assertEqual(expected, actual)
|
||||
|
||||
def test_get_connector_properties(self):
|
||||
props = vxflexos.VxFlexOsConnector.get_connector_properties(
|
||||
props = scaleio.ScaleIOConnector.get_connector_properties(
|
||||
'sudo', multipath=True, enforce_multipath=True)
|
||||
|
||||
expected_props = {}
|
||||
@ -193,7 +193,7 @@ class VxFlexOsConnectorTestCase(test_connector.ConnectorTestCase):
|
||||
|
||||
def test_error_id(self):
|
||||
"""Fail to connect with bad volume name"""
|
||||
self.fake_connection_properties['vxflexos_volume_id'] = 'bad_id'
|
||||
self.fake_connection_properties['scaleIO_volume_id'] = 'bad_id'
|
||||
self.mock_calls[self.get_volume_api] = self.MockHTTPSResponse(
|
||||
dict(errorCode='404', message='Test volume not found'), 404)
|
||||
|
||||
@ -201,7 +201,7 @@ class VxFlexOsConnectorTestCase(test_connector.ConnectorTestCase):
|
||||
|
||||
def test_error_no_volume_id(self):
|
||||
"""Faile to connect with no volume id"""
|
||||
self.fake_connection_properties['vxflexos_volume_id'] = None
|
||||
self.fake_connection_properties['scaleIO_volume_id'] = None
|
||||
self.mock_calls[self.get_volume_api] = self.MockHTTPSResponse(
|
||||
'null', 200)
|
||||
|
||||
@ -268,8 +268,8 @@ class VxFlexOsConnectorTestCase(test_connector.ConnectorTestCase):
|
||||
self.test_disconnect_volume()
|
||||
|
||||
@mock.patch.object(os.path, 'exists', return_value=True)
|
||||
@mock.patch.object(vxflexos.VxFlexOsConnector, '_find_volume_path')
|
||||
@mock.patch.object(vxflexos.VxFlexOsConnector, 'get_device_size')
|
||||
@mock.patch.object(scaleio.ScaleIOConnector, '_find_volume_path')
|
||||
@mock.patch.object(scaleio.ScaleIOConnector, 'get_device_size')
|
||||
def test_extend_volume(self,
|
||||
mock_device_size,
|
||||
mock_find_volume_path,
|
@ -253,6 +253,10 @@ class ConnectorTestCase(test_base.TestCase):
|
||||
'huaweisdshypervisor', None, arch='x86_64')
|
||||
self.assertEqual("HuaweiStorHyperConnector", obj.__class__.__name__)
|
||||
|
||||
obj = connector.InitiatorConnector.factory(
|
||||
"scaleio", None, arch='x86_64')
|
||||
self.assertEqual("ScaleIOConnector", obj.__class__.__name__)
|
||||
|
||||
obj = connector.InitiatorConnector.factory(
|
||||
'quobyte', None, quobyte_mount_point_base='/mnt/test',
|
||||
arch='x86_64')
|
||||
@ -262,15 +266,6 @@ class ConnectorTestCase(test_base.TestCase):
|
||||
"disco", None, arch='x86_64')
|
||||
self.assertEqual("DISCOConnector", obj.__class__.__name__)
|
||||
|
||||
obj = connector.InitiatorConnector.factory(
|
||||
"vxflexos", None, arch='x86_64')
|
||||
self.assertEqual("VxFlexOsConnector", obj.__class__.__name__)
|
||||
|
||||
# check deprecated protocol mapping
|
||||
obj = connector.InitiatorConnector.factory(
|
||||
"scaleio", None, arch='x86_64')
|
||||
self.assertEqual("VxFlexOsConnector", obj.__class__.__name__)
|
||||
|
||||
self.assertRaises(exception.InvalidConnectorProtocol,
|
||||
connector.InitiatorConnector.factory,
|
||||
"bogus", None)
|
||||
|
@ -1,14 +0,0 @@
|
||||
---
|
||||
|
||||
upgrade:
|
||||
- |
|
||||
Dell EMC ScaleIO has been rebranded to VxFlex OS.
|
||||
To follow this changes "scaleio" protocol renamed to "vxflexos",
|
||||
"ScaleIOConnector" class renamed to "VxFlexOsConnector".
|
||||
Old names will continue to work but will be removed in the Train
|
||||
release.
|
||||
|
||||
deprecations:
|
||||
- |
|
||||
The "scaleio" protocol was renamed and is deprecated now, it will
|
||||
be removed in the Train release. New protocol name is "vxflexos".
|
Loading…
x
Reference in New Issue
Block a user