Browse Source

Rebranding of VxFlex OS driver to PowerFlex

Renamed VxFlex OS driver to PowerFlex and move it to
another location. Change configuration options names
and removed deprecated ScaleIO name and related sio_
configuration options.

Change-Id: Iab5d66bbaab6533a4c1f8911e35fcd3a2cf09762
Implements: blueprint vxflexos-rebranding-driver
changes/22/740522/10
rajinir 1 year ago
parent
commit
6c4e223705
  1. 7
      cinder/opts.py
  2. 29
      cinder/tests/unit/volume/drivers/dell_emc/powerflex/__init__.py
  3. 14
      cinder/tests/unit/volume/drivers/dell_emc/powerflex/mocks.py
  4. 4
      cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_attach_detach_volume.py
  5. 10
      cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_create_cloned_volume.py
  6. 10
      cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_create_snapshot.py
  7. 6
      cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_create_volume.py
  8. 10
      cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_create_volume_from_snapshot.py
  9. 12
      cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_delete_snapshot.py
  10. 12
      cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_delete_volume.py
  11. 16
      cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_extend_volume.py
  12. 40
      cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_get_manageable.py
  13. 8
      cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_groups.py
  14. 4
      cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_initialize_connection.py
  15. 6
      cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_initialize_connection_snapshot.py
  16. 10
      cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_manage_existing.py
  17. 8
      cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_manage_existing_snapshot.py
  18. 13
      cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_migrate_volume.py
  19. 20
      cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_misc.py
  20. 22
      cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_replication.py
  21. 6
      cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_revert_volume_to_snapshot.py
  22. 6
      cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_versions.py
  23. 0
      cinder/volume/drivers/dell_emc/powerflex/__init__.py
  24. 217
      cinder/volume/drivers/dell_emc/powerflex/driver.py
  25. 131
      cinder/volume/drivers/dell_emc/powerflex/options.py
  26. 87
      cinder/volume/drivers/dell_emc/powerflex/rest_client.py
  27. 6
      cinder/volume/drivers/dell_emc/powerflex/simplecache.py
  28. 4
      cinder/volume/drivers/dell_emc/powerflex/utils.py
  29. 4
      cinder/volume/manager.py
  30. 275
      doc/source/configuration/block-storage/drivers/dell-emc-powerflex-driver.rst
  31. 26
      doc/source/reference/support-matrix.ini
  32. 14
      releasenotes/notes/vxflexos-powerflex-rebrand-37dfe2b82d35b6a2.yaml

7
cinder/opts.py

@ -72,6 +72,8 @@ from cinder.volume import api as cinder_volume_api
from cinder.volume import driver as cinder_volume_driver
from cinder.volume.drivers.datera import datera_iscsi as \
cinder_volume_drivers_datera_dateraiscsi
from cinder.volume.drivers.dell_emc.powerflex import driver as \
cinder_volume_drivers_dell_emc_powerflex_driver
from cinder.volume.drivers.dell_emc.powermax import common as \
cinder_volume_drivers_dell_emc_powermax_common
from cinder.volume.drivers.dell_emc.sc import storagecenter_common as \
@ -80,8 +82,6 @@ from cinder.volume.drivers.dell_emc.unity import driver as \
cinder_volume_drivers_dell_emc_unity_driver
from cinder.volume.drivers.dell_emc.vnx import common as \
cinder_volume_drivers_dell_emc_vnx_common
from cinder.volume.drivers.dell_emc.vxflexos import driver as \
cinder_volume_drivers_dell_emc_vxflexos_driver
from cinder.volume.drivers.dell_emc import xtremio as \
cinder_volume_drivers_dell_emc_xtremio
from cinder.volume.drivers.fujitsu.eternus_dx import eternus_dx_common as \
@ -289,12 +289,13 @@ def list_opts():
cinder_volume_driver.scst_opts,
cinder_volume_driver.image_opts,
cinder_volume_driver.fqdn_opts,
cinder_volume_drivers_dell_emc_powerflex_driver.
powerflex_opts,
cinder_volume_drivers_dell_emc_powermax_common.powermax_opts,
cinder_volume_drivers_dell_emc_sc_storagecentercommon.
common_opts,
cinder_volume_drivers_dell_emc_unity_driver.UNITY_OPTS,
cinder_volume_drivers_dell_emc_vnx_common.VNX_OPTS,
cinder_volume_drivers_dell_emc_vxflexos_driver.vxflexos_opts,
cinder_volume_drivers_dell_emc_xtremio.XTREMIO_OPTS,
cinder_volume_drivers_fujitsu_eternus_dx_eternusdxcommon.
FJ_ETERNUS_DX_OPT_opts,

29
cinder/tests/unit/volume/drivers/dell_emc/vxflexos/__init__.py → cinder/tests/unit/volume/drivers/dell_emc/powerflex/__init__.py

@ -18,9 +18,9 @@ import requests
import six
from cinder.tests.unit import test
from cinder.tests.unit.volume.drivers.dell_emc.vxflexos import mocks
from cinder.tests.unit.volume.drivers.dell_emc.powerflex import mocks
from cinder.volume import configuration as conf
from cinder.volume.drivers.dell_emc.vxflexos import driver
from cinder.volume.drivers.dell_emc.powerflex import driver
class CustomResponseMode(object):
@ -62,8 +62,8 @@ class CustomResponseMode(object):
self.test_instance.HTTPS_MOCK_RESPONSES = self.current_responses
class TestVxFlexOSDriver(test.TestCase):
"""Base ``TestCase`` subclass for the ``VxFlexOSDriver``"""
class TestPowerFlexDriver(test.TestCase):
"""Base ``TestCase`` subclass for the ``PowerFlexDriver``"""
RESPONSE_MODE = type(str('ResponseMode'), (object, ), dict(
Valid='0',
Invalid='1',
@ -117,18 +117,19 @@ class TestVxFlexOSDriver(test.TestCase):
def setUp(self):
"""Setup a test case environment.
Creates a ``VxFlexOSDriver`` instance
Creates a ``PowerFlexDriver`` instance
Mocks the ``requests.get/post`` methods to return
``MockHTTPSResponse``'s instead.
"""
super(TestVxFlexOSDriver, self).setUp()
self.configuration = conf.Configuration(driver.vxflexos_opts,
super(TestPowerFlexDriver, self).setUp()
self.configuration = conf.Configuration(driver.powerflex_opts,
conf.SHARED_CONF_GROUP)
self._set_overrides()
self.driver = mocks.VxFlexOSDriver(configuration=self.configuration)
self.driver.primary_client = mocks.VxFlexOSClient(self.configuration)
self.driver.secondary_client = mocks.VxFlexOSClient(self.configuration,
is_primary=False)
self.driver = mocks.PowerFlexDriver(configuration=self.configuration)
self.driver.primary_client = mocks.PowerFlexClient(self.configuration)
self.driver.secondary_client = mocks.PowerFlexClient(
self.configuration,
is_primary=False)
self.driver.do_setup({})
self.mock_object(requests, 'get', self.do_request)
@ -141,18 +142,18 @@ class TestVxFlexOSDriver(test.TestCase):
# Override the defaults to fake values
self.override_config('san_ip', override='127.0.0.1',
group=conf.SHARED_CONF_GROUP)
self.override_config('vxflexos_rest_server_port', override='8888',
self.override_config('powerflex_rest_server_port', override='8888',
group=conf.SHARED_CONF_GROUP)
self.override_config('san_login', override='test',
group=conf.SHARED_CONF_GROUP)
self.override_config('san_password', override='pass',
group=conf.SHARED_CONF_GROUP)
self.override_config('vxflexos_storage_pools',
self.override_config('powerflex_storage_pools',
override='PD1:SP1',
group=conf.SHARED_CONF_GROUP)
self.override_config('max_over_subscription_ratio',
override=5.0, group=conf.SHARED_CONF_GROUP)
self.override_config('vxflexos_server_api_version',
self.override_config('powerflex_server_api_version',
override='2.0.0', group=conf.SHARED_CONF_GROUP)
def do_request(self, url, *args, **kwargs):

14
cinder/tests/unit/volume/drivers/dell_emc/vxflexos/mocks.py → cinder/tests/unit/volume/drivers/dell_emc/powerflex/mocks.py

@ -18,14 +18,14 @@ from oslo_config import cfg
import requests
import six
from cinder.volume.drivers.dell_emc.vxflexos import driver
from cinder.volume.drivers.dell_emc.vxflexos import rest_client
from cinder.volume.drivers.dell_emc.powerflex import driver
from cinder.volume.drivers.dell_emc.powerflex import rest_client
CONF = cfg.CONF
class VxFlexOSDriver(driver.VxFlexOSDriver):
"""Mock VxFlex OS Driver class.
class PowerFlexDriver(driver.PowerFlexDriver):
"""Mock PowerFlex Driver class.
Provides some fake configuration options
"""
@ -34,7 +34,7 @@ class VxFlexOSDriver(driver.VxFlexOSDriver):
"thin" if self.configuration.san_thin_provision else "thick"
)
self.configuration.max_over_subscription_ratio = (
self.configuration.vxflexos_max_over_subscription_ratio
self.configuration.powerflex_max_over_subscription_ratio
)
def local_path(self, volume):
@ -50,8 +50,8 @@ class VxFlexOSDriver(driver.VxFlexOSDriver):
pass
class VxFlexOSClient(rest_client.RestClient):
"""Mock VxFlex OS Rest Client class.
class PowerFlexClient(rest_client.RestClient):
"""Mock PowerFlex Rest Client class.
Provides some fake configuration options
"""

4
cinder/tests/unit/volume/drivers/dell_emc/vxflexos/test_attach_detach_volume.py → cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_attach_detach_volume.py

@ -16,10 +16,10 @@
from cinder import context
from cinder.tests.unit import fake_constants as fake
from cinder.tests.unit import fake_volume
from cinder.tests.unit.volume.drivers.dell_emc import vxflexos
from cinder.tests.unit.volume.drivers.dell_emc import powerflex
class TestAttachDetachVolume(vxflexos.TestVxFlexOSDriver):
class TestAttachDetachVolume(powerflex.TestPowerFlexDriver):
def setUp(self):
super(TestAttachDetachVolume, self).setUp()

10
cinder/tests/unit/volume/drivers/dell_emc/vxflexos/test_create_cloned_volume.py → cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_create_cloned_volume.py

@ -21,13 +21,13 @@ from cinder import context
from cinder import exception
from cinder.tests.unit import fake_constants as fake
from cinder.tests.unit import fake_volume
from cinder.tests.unit.volume.drivers.dell_emc import vxflexos
from cinder.tests.unit.volume.drivers.dell_emc.vxflexos import mocks
from cinder.volume.drivers.dell_emc.vxflexos import utils as flex_utils
from cinder.tests.unit.volume.drivers.dell_emc import powerflex
from cinder.tests.unit.volume.drivers.dell_emc.powerflex import mocks
from cinder.volume.drivers.dell_emc.powerflex import utils as flex_utils
class TestCreateClonedVolume(vxflexos.TestVxFlexOSDriver):
"""Test cases for ``VxFlexOSDriver.create_cloned_volume()``"""
class TestCreateClonedVolume(powerflex.TestPowerFlexDriver):
"""Test cases for ``PowerFlexDriver.create_cloned_volume()``"""
def setUp(self):
"""Setup a test case environment.

10
cinder/tests/unit/volume/drivers/dell_emc/vxflexos/test_create_snapshot.py → cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_create_snapshot.py

@ -22,13 +22,13 @@ from cinder import exception
from cinder.tests.unit import fake_constants as fake
from cinder.tests.unit import fake_snapshot
from cinder.tests.unit import fake_volume
from cinder.tests.unit.volume.drivers.dell_emc import vxflexos
from cinder.tests.unit.volume.drivers.dell_emc.vxflexos import mocks
from cinder.volume.drivers.dell_emc.vxflexos import utils as flex_utils
from cinder.tests.unit.volume.drivers.dell_emc import powerflex
from cinder.tests.unit.volume.drivers.dell_emc.powerflex import mocks
from cinder.volume.drivers.dell_emc.powerflex import utils as flex_utils
class TestCreateSnapShot(vxflexos.TestVxFlexOSDriver):
"""Test cases for ``VxFlexOSDriver.create_snapshot()``"""
class TestCreateSnapShot(powerflex.TestPowerFlexDriver):
"""Test cases for ``PowerFlexDriver.create_snapshot()``"""
def return_fake_volume(self, ctx, id):
return self.fake_volume

6
cinder/tests/unit/volume/drivers/dell_emc/vxflexos/test_create_volume.py → cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_create_volume.py

@ -20,12 +20,12 @@ import ddt
from cinder import context
from cinder import exception
from cinder.tests.unit import fake_volume
from cinder.tests.unit.volume.drivers.dell_emc import vxflexos
from cinder.tests.unit.volume.drivers.dell_emc import powerflex
@ddt.ddt
class TestCreateVolume(vxflexos.TestVxFlexOSDriver):
"""Test cases for ``VxFlexOSDriver.create_volume()``"""
class TestCreateVolume(powerflex.TestPowerFlexDriver):
"""Test cases for ``PowerFlexDriver.create_volume()``"""
def setUp(self):
"""Setup a test case environment.

10
cinder/tests/unit/volume/drivers/dell_emc/vxflexos/test_create_volume_from_snapshot.py → cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_create_volume_from_snapshot.py

@ -20,13 +20,13 @@ from cinder import context
from cinder import exception
from cinder.tests.unit import fake_snapshot
from cinder.tests.unit import fake_volume
from cinder.tests.unit.volume.drivers.dell_emc import vxflexos
from cinder.tests.unit.volume.drivers.dell_emc.vxflexos import mocks
from cinder.volume.drivers.dell_emc.vxflexos import utils as flex_utils
from cinder.tests.unit.volume.drivers.dell_emc import powerflex
from cinder.tests.unit.volume.drivers.dell_emc.powerflex import mocks
from cinder.volume.drivers.dell_emc.powerflex import utils as flex_utils
class TestCreateVolumeFromSnapShot(vxflexos.TestVxFlexOSDriver):
"""Test cases for ``VxFlexOSDriver.create_volume_from_snapshot()``"""
class TestCreateVolumeFromSnapShot(powerflex.TestPowerFlexDriver):
"""Test cases for ``PowerFlexDriver.create_volume_from_snapshot()``"""
def setUp(self):
"""Setup a test case environment.

12
cinder/tests/unit/volume/drivers/dell_emc/vxflexos/test_delete_snapshot.py → cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_delete_snapshot.py

@ -19,14 +19,14 @@ from cinder import exception
from cinder.tests.unit import fake_constants as fake
from cinder.tests.unit.fake_snapshot import fake_snapshot_obj
from cinder.tests.unit.fake_volume import fake_volume_obj
from cinder.tests.unit.volume.drivers.dell_emc import vxflexos
from cinder.tests.unit.volume.drivers.dell_emc.vxflexos import mocks
from cinder.tests.unit.volume.drivers.dell_emc import powerflex
from cinder.tests.unit.volume.drivers.dell_emc.powerflex import mocks
from cinder.volume import configuration
from cinder.volume.drivers.dell_emc.vxflexos import utils as flex_utils
from cinder.volume.drivers.dell_emc.powerflex import utils as flex_utils
class TestDeleteSnapShot(vxflexos.TestVxFlexOSDriver):
"""Test cases for ``VxFlexOSDriver.delete_snapshot()``"""
class TestDeleteSnapShot(powerflex.TestPowerFlexDriver):
"""Test cases for ``PowerFlexDriver.delete_snapshot()``"""
def setUp(self):
"""Setup a test case environment.
@ -99,7 +99,7 @@ class TestDeleteSnapShot(vxflexos.TestVxFlexOSDriver):
def test_delete_snapshot(self):
"""Setting the unmap volume before delete flag for tests """
self.override_config('vxflexos_unmap_volume_before_deletion', True,
self.override_config('powerflex_unmap_volume_before_deletion', True,
configuration.SHARED_CONF_GROUP)
self.set_https_response_mode(self.RESPONSE_MODE.Valid)
self.driver.delete_snapshot(self.snapshot)

12
cinder/tests/unit/volume/drivers/dell_emc/vxflexos/test_delete_volume.py → cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_delete_volume.py

@ -18,14 +18,14 @@ from cinder import context
from cinder import exception
from cinder.tests.unit import fake_constants as fake
from cinder.tests.unit import fake_volume
from cinder.tests.unit.volume.drivers.dell_emc import vxflexos
from cinder.tests.unit.volume.drivers.dell_emc.vxflexos import mocks
from cinder.tests.unit.volume.drivers.dell_emc import powerflex
from cinder.tests.unit.volume.drivers.dell_emc.powerflex import mocks
from cinder.volume import configuration
from cinder.volume.drivers.dell_emc.vxflexos import utils as flex_utils
from cinder.volume.drivers.dell_emc.powerflex import utils as flex_utils
class TestDeleteVolume(vxflexos.TestVxFlexOSDriver):
"""Test cases for ``VxFlexOSDriver.delete_volume()``"""
class TestDeleteVolume(powerflex.TestPowerFlexDriver):
"""Test cases for ``PowerFlexDriver.delete_volume()``"""
def setUp(self):
"""Setup a test case environment.
@ -81,6 +81,6 @@ class TestDeleteVolume(vxflexos.TestVxFlexOSDriver):
def test_delete_volume(self):
"""Setting the unmap volume before delete flag for tests """
self.override_config('vxflexos_unmap_volume_before_deletion', True,
self.override_config('powerflex_unmap_volume_before_deletion', True,
configuration.SHARED_CONF_GROUP)
self.driver.delete_volume(self.volume)

16
cinder/tests/unit/volume/drivers/dell_emc/vxflexos/test_extend_volume.py → cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_extend_volume.py

@ -18,17 +18,17 @@ from cinder import context
from cinder import exception
from cinder.tests.unit import fake_constants as fake
from cinder.tests.unit.fake_volume import fake_volume_obj
from cinder.tests.unit.volume.drivers.dell_emc import vxflexos
from cinder.tests.unit.volume.drivers.dell_emc.vxflexos import mocks
from cinder.tests.unit.volume.drivers.dell_emc import powerflex
from cinder.tests.unit.volume.drivers.dell_emc.powerflex import mocks
from cinder.volume import configuration
from cinder.volume.drivers.dell_emc.vxflexos import utils as flex_utils
from cinder.volume.drivers.dell_emc.powerflex import utils as flex_utils
class TestExtendVolume(vxflexos.TestVxFlexOSDriver):
"""Test cases for ``VxFlexOSDriver.extend_volume()``"""
class TestExtendVolume(powerflex.TestPowerFlexDriver):
"""Test cases for ``PowerFlexDriver.extend_volume()``"""
""" New sizes for the volume.
Since VxFlex OS has a granularity of 8 GB, multiples of 8 always work.
Since PowerFlex has a granularity of 8 GB, multiples of 8 always work.
The 7 size should be either rounded up to 8 or raise an exception
based on the round_volume_capacity config setting.
"""
@ -93,13 +93,13 @@ class TestExtendVolume(vxflexos.TestVxFlexOSDriver):
self.NEW_SIZE)
def test_extend_volume_bad_size_no_round(self):
self.override_config('vxflexos_round_volume_capacity', False,
self.override_config('powerflex_round_volume_capacity', False,
configuration.SHARED_CONF_GROUP)
self.set_https_response_mode(self.RESPONSE_MODE.Valid)
self.driver.extend_volume(self.volume, self.BAD_SIZE)
def test_extend_volume_bad_size_round(self):
self.override_config('vxflexos_round_volume_capacity', True,
self.override_config('powerflex_round_volume_capacity', True,
configuration.SHARED_CONF_GROUP)
self.driver.extend_volume(self.volume, self.BAD_SIZE)

40
cinder/tests/unit/volume/drivers/dell_emc/vxflexos/test_get_manageable.py → cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_get_manageable.py

@ -19,13 +19,13 @@ from unittest import mock
import ddt
from cinder.tests.unit import fake_volume
from cinder.tests.unit.volume.drivers.dell_emc import vxflexos
from cinder.tests.unit.volume.drivers.dell_emc import powerflex
VOLUME_ID = "abcdabcd-1234-abcd-1234-abcdabcdabcd"
PROVIDER_ID = "0000000000000001"
MANAGEABLE_VXFLEXOS_VOLS = [
MANAGEABLE_FLEX_VOLS = [
{
"volumeType": "ThinProvisioned",
"storagePoolId": "6c6dc54500000000",
@ -52,7 +52,7 @@ MANAGEABLE_VXFLEXOS_VOLS = [
}
]
VXFLEXOS_SNAPSHOT = {
POWERFLEX_SNAPSHOT = {
"volumeType": "Snapshot",
"storagePoolId": "6c6dc54500000000",
"sizeInKb": 8388608,
@ -61,7 +61,7 @@ VXFLEXOS_SNAPSHOT = {
"mappedSdcInfo": [],
}
MANAGEABLE_VXFLEXOS_VOL_REFS = [
MANAGEABLE_FLEX_VOL_REFS = [
{
'reference': {'source-id': PROVIDER_ID},
'size': 8,
@ -99,16 +99,16 @@ MANAGEABLE_VXFLEXOS_VOL_REFS = [
@ddt.ddt
class VxFlexOSManageableCase(vxflexos.TestVxFlexOSDriver):
class PowerFlexManageableCase(powerflex.TestPowerFlexDriver):
def setUp(self):
"""Setup a test case environment."""
super(VxFlexOSManageableCase, self).setUp()
super(PowerFlexManageableCase, self).setUp()
self.driver.storage_pools = super().STORAGE_POOLS
def _test_get_manageable_things(self,
vxflexos_objects=MANAGEABLE_VXFLEXOS_VOLS,
expected_refs=MANAGEABLE_VXFLEXOS_VOL_REFS,
powerflex_objects=MANAGEABLE_FLEX_VOLS,
expected_refs=MANAGEABLE_FLEX_VOL_REFS,
cinder_objs=list()):
marker = mock.Mock()
limit = mock.Mock()
@ -120,7 +120,7 @@ class VxFlexOSManageableCase(vxflexos.TestVxFlexOSDriver):
self.RESPONSE_MODE.Valid: {
'instances/StoragePool::{}/relationships/Volume'.format(
self.STORAGE_POOL_ID
): vxflexos_objects,
): powerflex_objects,
'types/Pool/instances/getByName::{},{}'.format(
self.PROT_DOMAIN_ID,
self.STORAGE_POOL_NAME
@ -153,7 +153,7 @@ class VxFlexOSManageableCase(vxflexos.TestVxFlexOSDriver):
def test_get_manageable_volumes(self):
"""Default success case.
Given a list of VxFlex OS volumes from the REST API, give back a list
Given a list of PowerFlex volumes from the REST API, give back a list
of volume references.
"""
@ -161,12 +161,12 @@ class VxFlexOSManageableCase(vxflexos.TestVxFlexOSDriver):
def test_get_manageable_volumes_connected_vol(self):
"""Make sure volumes connected to hosts are flagged as unsafe."""
mapped_sdc = deepcopy(MANAGEABLE_VXFLEXOS_VOLS)
mapped_sdc = deepcopy(MANAGEABLE_FLEX_VOLS)
mapped_sdc[0]['mappedSdcInfo'] = ["host1"]
mapped_sdc[1]['mappedSdcInfo'] = ["host1", "host2"]
# change up the expected results
expected_refs = deepcopy(MANAGEABLE_VXFLEXOS_VOL_REFS)
expected_refs = deepcopy(MANAGEABLE_FLEX_VOL_REFS)
for x in range(len(mapped_sdc)):
sdc = mapped_sdc[x]['mappedSdcInfo']
if sdc and len(sdc) > 0:
@ -175,7 +175,7 @@ class VxFlexOSManageableCase(vxflexos.TestVxFlexOSDriver):
= 'Volume mapped to %d host(s).' % len(sdc)
self._test_get_manageable_things(expected_refs=expected_refs,
vxflexos_objects=mapped_sdc)
powerflex_objects=mapped_sdc)
def test_get_manageable_volumes_already_managed(self):
"""Make sure volumes already owned by cinder are flagged as unsafe."""
@ -185,7 +185,7 @@ class VxFlexOSManageableCase(vxflexos.TestVxFlexOSDriver):
cinders_vols = [cinder_vol]
# change up the expected results
expected_refs = deepcopy(MANAGEABLE_VXFLEXOS_VOL_REFS)
expected_refs = deepcopy(MANAGEABLE_FLEX_VOL_REFS)
expected_refs[0]['reference'] = {'source-id': PROVIDER_ID}
expected_refs[0]['safe_to_manage'] = False
expected_refs[0]['reason_not_safe'] = 'Volume already managed.'
@ -196,12 +196,12 @@ class VxFlexOSManageableCase(vxflexos.TestVxFlexOSDriver):
def test_get_manageable_volumes_no_snapshots(self):
"""Make sure refs returned do not include snapshots."""
volumes = deepcopy(MANAGEABLE_VXFLEXOS_VOLS)
volumes.append(VXFLEXOS_SNAPSHOT)
volumes = deepcopy(MANAGEABLE_FLEX_VOLS)
volumes.append(POWERFLEX_SNAPSHOT)
self._test_get_manageable_things(vxflexos_objects=volumes)
self._test_get_manageable_things(powerflex_objects=volumes)
def test_get_manageable_volumes_no_vxflexos_volumes(self):
"""Expect no refs to be found if no volumes are on VxFlex OS."""
self._test_get_manageable_things(vxflexos_objects=[],
def test_get_manageable_volumes_no_powerflex_volumes(self):
"""Expect no refs to be found if no volumes are on PowerFlex."""
self._test_get_manageable_things(powerflex_objects=[],
expected_refs=[])

8
cinder/tests/unit/volume/drivers/dell_emc/vxflexos/test_groups.py → cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_groups.py

@ -22,12 +22,12 @@ from cinder.tests.unit import fake_constants as fake
from cinder.tests.unit import fake_group
from cinder.tests.unit import fake_snapshot
from cinder.tests.unit import fake_volume
from cinder.tests.unit.volume.drivers.dell_emc import vxflexos
from cinder.tests.unit.volume.drivers.dell_emc.vxflexos import mocks
from cinder.tests.unit.volume.drivers.dell_emc import powerflex
from cinder.tests.unit.volume.drivers.dell_emc.powerflex import mocks
class TestGroups(vxflexos.TestVxFlexOSDriver):
"""Test cases for ``VxFlexOSDriver groups support``"""
class TestGroups(powerflex.TestPowerFlexDriver):
"""Test cases for ``PowerFlexDriver groups support``"""
def setUp(self):
"""Setup a test case environment.

4
cinder/tests/unit/volume/drivers/dell_emc/vxflexos/test_initialize_connection.py → cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_initialize_connection.py

@ -17,10 +17,10 @@ from unittest import mock
from cinder import context
from cinder.tests.unit import fake_constants as fake
from cinder.tests.unit import fake_volume
from cinder.tests.unit.volume.drivers.dell_emc import vxflexos
from cinder.tests.unit.volume.drivers.dell_emc import powerflex
class TestInitializeConnection(vxflexos.TestVxFlexOSDriver):
class TestInitializeConnection(powerflex.TestPowerFlexDriver):
def setUp(self):
"""Setup a test case environment."""

6
cinder/tests/unit/volume/drivers/dell_emc/vxflexos/test_initialize_connection_snapshot.py → cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_initialize_connection_snapshot.py

@ -19,10 +19,10 @@ from cinder import context
from cinder.tests.unit import fake_constants as fake
from cinder.tests.unit import fake_snapshot
from cinder.tests.unit import fake_volume
from cinder.tests.unit.volume.drivers.dell_emc import vxflexos
from cinder.tests.unit.volume.drivers.dell_emc import powerflex
class TestInitializeConnectionSnapshot(vxflexos.TestVxFlexOSDriver):
class TestInitializeConnectionSnapshot(powerflex.TestPowerFlexDriver):
def setUp(self):
super(TestInitializeConnectionSnapshot, self).setUp()
@ -62,7 +62,7 @@ class TestInitializeConnectionSnapshot(vxflexos.TestVxFlexOSDriver):
def test_initialize_connection_with_size(self):
"""Test initializing when we know the snapshot size.
VxFlex OS can determine QOS specs based upon volume/snapshot size
PowerFlex can determine QOS specs based upon volume/snapshot size
The QOS keys should always be returned
"""
snapshot = fake_snapshot.fake_snapshot_obj(

10
cinder/tests/unit/volume/drivers/dell_emc/vxflexos/test_manage_existing.py → cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_manage_existing.py

@ -21,14 +21,14 @@ from cinder import context
from cinder import exception
from cinder.tests.unit import fake_constants as fake
from cinder.tests.unit import fake_volume
from cinder.tests.unit.volume.drivers.dell_emc import vxflexos
from cinder.tests.unit.volume.drivers.dell_emc.vxflexos import mocks
from cinder.volume.drivers.dell_emc.vxflexos import utils as flex_utils
from cinder.tests.unit.volume.drivers.dell_emc import powerflex
from cinder.tests.unit.volume.drivers.dell_emc.powerflex import mocks
from cinder.volume.drivers.dell_emc.powerflex import utils as flex_utils
from cinder.volume import volume_types
class TestManageExisting(vxflexos.TestVxFlexOSDriver):
"""Test cases for ``VxFlexOSDriver.manage_existing()``"""
class TestManageExisting(powerflex.TestPowerFlexDriver):
"""Test cases for ``PowerFlexDriver.manage_existing()``"""
def setUp(self):
"""Setup a test case environment.

8
cinder/tests/unit/volume/drivers/dell_emc/vxflexos/test_manage_existing_snapshot.py → cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_manage_existing_snapshot.py

@ -19,13 +19,13 @@ from cinder import exception
from cinder.tests.unit import fake_constants as fake
from cinder.tests.unit import fake_snapshot
from cinder.tests.unit import fake_volume
from cinder.tests.unit.volume.drivers.dell_emc import vxflexos
from cinder.tests.unit.volume.drivers.dell_emc.vxflexos import mocks
from cinder.tests.unit.volume.drivers.dell_emc import powerflex
from cinder.tests.unit.volume.drivers.dell_emc.powerflex import mocks
from cinder.volume import volume_types
class TestManageExistingSnapshot(vxflexos.TestVxFlexOSDriver):
"""Test cases for ``VxFlexOSDriver.manage_existing_snapshot()``"""
class TestManageExistingSnapshot(powerflex.TestPowerFlexDriver):
"""Test cases for ``PowerFlexDriver.manage_existing_snapshot()``"""
def setUp(self):
"""Setup a test case environment.

13
cinder/tests/unit/volume/drivers/dell_emc/vxflexos/test_migrate_volume.py → cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_migrate_volume.py

@ -23,7 +23,7 @@ from cinder import context
from cinder import exception
from cinder.tests.unit import fake_constants as fake
from cinder.tests.unit import fake_volume
from cinder.tests.unit.volume.drivers.dell_emc import vxflexos
from cinder.tests.unit.volume.drivers.dell_emc import powerflex
MIGRATE_VOLUME_PARAMS_CASES = (
@ -42,8 +42,8 @@ MIGRATE_VOLUME_PARAMS_CASES = (
@ddt.ddt
class TestMigrateVolume(vxflexos.TestVxFlexOSDriver):
"""Test cases for ``VxFlexOSDriver.migrate_volume()``"""
class TestMigrateVolume(powerflex.TestPowerFlexDriver):
"""Test cases for ``PowerFlexDriver.migrate_volume()``"""
def setUp(self):
"""Setup a test case environment.
@ -155,7 +155,8 @@ class TestMigrateVolume(vxflexos.TestVxFlexOSDriver):
def test_migrate_volume_migration_in_progress(self):
with self.custom_response_mode(
**{'instances/Volume::{}/action/migrateVTree'.format(
self.volume.provider_id): vxflexos.mocks.MockHTTPSResponse(
self.volume.provider_id):
powerflex.mocks.MockHTTPSResponse(
{
'errorCode': 717,
'message': 'Migration in progress',
@ -165,7 +166,7 @@ class TestMigrateVolume(vxflexos.TestVxFlexOSDriver):
self.assertEqual(self.migration_success, ret)
@mock.patch(
'cinder.volume.drivers.dell_emc.vxflexos.driver.VxFlexOSDriver.'
'cinder.volume.drivers.dell_emc.powerflex.driver.PowerFlexDriver.'
'_wait_for_volume_migration_to_complete',
side_effect=loopingcall.LoopingCallTimeOut()
)
@ -176,7 +177,7 @@ class TestMigrateVolume(vxflexos.TestVxFlexOSDriver):
def test_migrate_volume_migration_failed(self):
with self.custom_response_mode(
**{'instances/VTree::{}'.format(self.fake_vtree_id):
vxflexos.mocks.MockHTTPSResponse(
powerflex.mocks.MockHTTPSResponse(
{'vtreeMigrationInfo':
{'migrationStatus': 'NotInMigration',
'migrationPauseReason': 'MigrationError'}}, 200)}

20
cinder/tests/unit/volume/drivers/dell_emc/vxflexos/test_misc.py → cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_misc.py

@ -22,13 +22,13 @@ from cinder import context
from cinder import exception
from cinder.tests.unit import fake_constants as fake
from cinder.tests.unit import fake_volume
from cinder.tests.unit.volume.drivers.dell_emc import vxflexos
from cinder.tests.unit.volume.drivers.dell_emc.vxflexos import mocks
from cinder.tests.unit.volume.drivers.dell_emc import powerflex
from cinder.tests.unit.volume.drivers.dell_emc.powerflex import mocks
from cinder.volume import configuration
@ddt.ddt
class TestMisc(vxflexos.TestVxFlexOSDriver):
class TestMisc(powerflex.TestPowerFlexDriver):
DOMAIN_ID = '1'
POOL_ID = '1'
@ -136,7 +136,7 @@ class TestMisc(vxflexos.TestVxFlexOSDriver):
self.driver._check_volume_size(1)
def test_volume_size_round_false(self):
self.override_config('vxflexos_round_volume_capacity', False,
self.override_config('powerflex_round_volume_capacity', False,
configuration.SHARED_CONF_GROUP)
self.assertRaises(exception.VolumeBackendAPIException,
self.driver._check_volume_size, 1)
@ -220,7 +220,7 @@ class TestMisc(vxflexos.TestVxFlexOSDriver):
self.driver.get_volume_stats(True)
@mock.patch(
'cinder.volume.drivers.dell_emc.vxflexos.rest_client.RestClient.'
'cinder.volume.drivers.dell_emc.powerflex.rest_client.RestClient.'
'rename_volume',
return_value=None)
def test_update_migrated_volume(self, mock_rename):
@ -231,7 +231,7 @@ class TestMisc(vxflexos.TestVxFlexOSDriver):
test_vol)
@mock.patch(
'cinder.volume.drivers.dell_emc.vxflexos.rest_client.RestClient.'
'cinder.volume.drivers.dell_emc.powerflex.rest_client.RestClient.'
'rename_volume',
return_value=None)
def test_update_unavailable_migrated_volume(self, mock_rename):
@ -243,7 +243,7 @@ class TestMisc(vxflexos.TestVxFlexOSDriver):
test_vol)
@mock.patch(
'cinder.volume.drivers.dell_emc.vxflexos.rest_client.RestClient.'
'cinder.volume.drivers.dell_emc.powerflex.rest_client.RestClient.'
'rename_volume',
side_effect=exception.VolumeBackendAPIException(data='Error!'))
def test_fail_update_migrated_volume(self, mock_rename):
@ -290,9 +290,9 @@ class TestMisc(vxflexos.TestVxFlexOSDriver):
expected_provisioning_type):
self.override_config('san_thin_provision', config_provisioning_type,
configuration.SHARED_CONF_GROUP)
self.driver = mocks.VxFlexOSDriver(configuration=self.configuration)
self.driver = mocks.PowerFlexDriver(configuration=self.configuration)
self.driver.do_setup({})
self.driver.primary_client = mocks.VxFlexOSClient(self.configuration)
self.driver.primary_client = mocks.PowerFlexClient(self.configuration)
self.driver.primary_client.do_setup()
empty_storage_type = {}
provisioning, compression = (
@ -303,7 +303,7 @@ class TestMisc(vxflexos.TestVxFlexOSDriver):
)
self.assertEqual(expected_provisioning_type, provisioning)
@mock.patch('cinder.volume.drivers.dell_emc.vxflexos.rest_client.'
@mock.patch('cinder.volume.drivers.dell_emc.powerflex.rest_client.'
'RestClient.query_rest_api_version',
return_value="3.0")
def test_get_volume_stats_v3(self, mock_version):

22
cinder/tests/unit/volume/drivers/dell_emc/vxflexos/test_replication.py → cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_replication.py

@ -16,18 +16,18 @@
import ddt
from cinder import exception
from cinder.tests.unit.volume.drivers.dell_emc import vxflexos
from cinder.tests.unit.volume.drivers.dell_emc import powerflex
from cinder.volume import configuration
@ddt.ddt
class TestReplication(vxflexos.TestVxFlexOSDriver):
"""Test cases for VxFlex OS replication support."""
class TestReplication(powerflex.TestPowerFlexDriver):
"""Test cases for PowerFlex replication support."""
def setUp(self):
super(TestReplication, self).setUp()
self.replication_backend_id = 'vxflex_repl'
self.replication_backend_id = 'powerflex_repl'
replication_device = [
{
'backend_id': self.replication_backend_id,
@ -55,7 +55,7 @@ class TestReplication(vxflexos.TestVxFlexOSDriver):
}
def test_do_setup_replication_configured(self):
super(vxflexos.mocks.VxFlexOSDriver, self.driver).do_setup({})
super(powerflex.mocks.PowerFlexDriver, self.driver).do_setup({})
self.driver.check_for_setup_error()
self.assertTrue(self.driver.secondary_client.is_configured)
self.assertTrue(self.driver.replication_enabled)
@ -63,15 +63,15 @@ class TestReplication(vxflexos.TestVxFlexOSDriver):
@ddt.data(
[
{
'backend_id': 'vxflex_repl1'
'backend_id': 'powerflex_repl1'
},
{
'backend_id': 'vxflex_repl2'
'backend_id': 'powerflex_repl2'
}
],
[
{
'backend_id': 'vxflex_repl1',
'backend_id': 'powerflex_repl1',
'san_ip': '127.0.0.2'
},
]
@ -81,13 +81,13 @@ class TestReplication(vxflexos.TestVxFlexOSDriver):
override=replication_device,
group=configuration.SHARED_CONF_GROUP)
self.assertRaises(exception.InvalidInput,
super(vxflexos.mocks.VxFlexOSDriver,
super(powerflex.mocks.PowerFlexDriver,
self.driver).do_setup,
{})
def test_do_setup_already_failed_over(self):
self.driver.active_backend_id = 'vxflex_repl'
super(vxflexos.mocks.VxFlexOSDriver, self.driver).do_setup({})
self.driver.active_backend_id = 'powerflex_repl'
super(powerflex.mocks.PowerFlexDriver, self.driver).do_setup({})
self.driver.check_for_setup_error()
self.assertFalse(self.driver.replication_enabled)

6
cinder/tests/unit/volume/drivers/dell_emc/vxflexos/test_revert_volume_to_snapshot.py → cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_revert_volume_to_snapshot.py

@ -20,11 +20,11 @@ from cinder import exception
from cinder.tests.unit import fake_constants as fake
from cinder.tests.unit import fake_snapshot
from cinder.tests.unit import fake_volume
from cinder.tests.unit.volume.drivers.dell_emc import vxflexos
from cinder.tests.unit.volume.drivers.dell_emc import powerflex
class TestRevertVolume(vxflexos.TestVxFlexOSDriver):
"""Test cases for ``VxFlexOSDriver.revert_to_snapshot()``"""
class TestRevertVolume(powerflex.TestPowerFlexDriver):
"""Test cases for ``PowerFlexDriver.revert_to_snapshot()``"""
def setUp(self):
"""Setup a test case environment.

6
cinder/tests/unit/volume/drivers/dell_emc/vxflexos/test_versions.py → cinder/tests/unit/volume/drivers/dell_emc/powerflex/test_versions.py

@ -16,11 +16,11 @@
import ddt
from cinder import exception
from cinder.tests.unit.volume.drivers.dell_emc import vxflexos
from cinder.tests.unit.volume.drivers.dell_emc import powerflex
@ddt.ddt
class TestMultipleVersions(vxflexos.TestVxFlexOSDriver):
class TestMultipleVersions(powerflex.TestPowerFlexDriver):
version = '1.2.3.4'
good_versions = ['1.2.3.4',
@ -33,7 +33,7 @@ class TestMultipleVersions(vxflexos.TestVxFlexOSDriver):
'.6'
]
# Test cases for ``VxFlexOSDriver._get_server_api_version()``
# Test cases for ``PowerFlexDriver._get_server_api_version()``
def setUp(self):
"""Setup a test case environment."""
super(TestMultipleVersions, self).setUp()

0
cinder/volume/drivers/dell_emc/vxflexos/__init__.py → cinder/volume/drivers/dell_emc/powerflex/__init__.py

217
cinder/volume/drivers/dell_emc/vxflexos/driver.py → cinder/volume/drivers/dell_emc/powerflex/driver.py

@ -1,4 +1,4 @@
# Copyright (c) 2017-2019 Dell Inc. or its subsidiaries.
# Copyright (c) 2017-2020 Dell Inc. or its subsidiaries.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
"""
Driver for Dell EMC VxFlex OS (formerly named Dell EMC ScaleIO).
Driver for Dell EMC PowerFlex (formerly named Dell EMC VxFlex OS).
"""
import math
@ -39,9 +39,9 @@ from cinder.objects import fields
from cinder import utils
from cinder.volume import configuration
from cinder.volume import driver
from cinder.volume.drivers.dell_emc.vxflexos import options
from cinder.volume.drivers.dell_emc.vxflexos import rest_client
from cinder.volume.drivers.dell_emc.vxflexos import utils as flex_utils
from cinder.volume.drivers.dell_emc.powerflex import options
from cinder.volume.drivers.dell_emc.powerflex import rest_client
from cinder.volume.drivers.dell_emc.powerflex import utils as flex_utils
from cinder.volume.drivers.san import san
from cinder.volume import manager
from cinder.volume import qos_specs
@ -50,15 +50,15 @@ from cinder.volume import volume_utils
CONF = cfg.CONF
vxflexos_opts = options.deprecated_opts + options.actual_opts
powerflex_opts = options.deprecated_opts + options.actual_opts
CONF.register_opts(vxflexos_opts, group=configuration.SHARED_CONF_GROUP)
CONF.register_opts(powerflex_opts, group=configuration.SHARED_CONF_GROUP)
LOG = logging.getLogger(__name__)
PROVISIONING_KEY = "provisioning:type"
REPLICATION_CG_KEY = "vxflexos:replication_cg"
REPLICATION_CG_KEY = "powerflex:replication_cg"
QOS_IOPS_LIMIT_KEY = "maxIOPS"
QOS_BANDWIDTH_LIMIT = "maxBWS"
QOS_IOPS_PER_GB = "maxIOPSperGB"
@ -66,16 +66,16 @@ QOS_BANDWIDTH_PER_GB = "maxBWSperGB"
BLOCK_SIZE = 8
VOLUME_NOT_FOUND_ERROR = 79
# This code belongs to older versions of VxFlex OS
# This code belongs to older versions of PowerFlex
VOLUME_NOT_MAPPED_ERROR = 84
VOLUME_ALREADY_MAPPED_ERROR = 81
MIN_BWS_SCALING_SIZE = 128
VXFLEXOS_MAX_OVERSUBSCRIPTION_RATIO = 10.0
POWERFLEX_MAX_OVERSUBSCRIPTION_RATIO = 10.0
@interface.volumedriver
class VxFlexOSDriver(driver.VolumeDriver):
"""Cinder VxFlex OS(formerly named Dell EMC ScaleIO) Driver
class PowerFlexDriver(driver.VolumeDriver):
"""Cinder PowerFlex(formerly named Dell EMC VxFlex OS) Driver
.. code-block:: none
@ -86,28 +86,29 @@ class VxFlexOSDriver(driver.VolumeDriver):
2.0.4 - Added compatibility with os_brick>1.15.3
2.0.5 - Change driver name, rename config file options
3.0.0 - Add support for VxFlex OS 3.0.x and for volumes compression
3.5.0 - Add support for VxFlex OS 3.5.x
3.5.1 - Add volume replication v2.1 support for VxFlex OS 3.5.x
3.5.0 - Add support for PowerFlex 3.5.x
3.5.1 - Add volume replication v2.1 support for PowerFlex 3.5.x
3.5.2 - Add volume migration support
3.5.3 - Add revert volume to snapshot support
3.5.4 - Fix for Bug #1823200. See OSSN-0086 for details.
3.5.5 - Rebrand VxFlex OS to PowerFlex.
"""
VERSION = "3.5.4"
VERSION = "3.5.5"
# ThirdPartySystems wiki
CI_WIKI_NAME = "DellEMC_VxFlexOS_CI"
CI_WIKI_NAME = "DellEMC_PowerFlex_CI"
vxflexos_qos_keys = (QOS_IOPS_LIMIT_KEY,
QOS_BANDWIDTH_LIMIT,
QOS_IOPS_PER_GB,
QOS_BANDWIDTH_PER_GB)
powerflex_qos_keys = (QOS_IOPS_LIMIT_KEY,
QOS_BANDWIDTH_LIMIT,
QOS_IOPS_PER_GB,
QOS_BANDWIDTH_PER_GB)
def __init__(self, *args, **kwargs):
super(VxFlexOSDriver, self).__init__(*args, **kwargs)
super(PowerFlexDriver, self).__init__(*args, **kwargs)
self.active_backend_id = kwargs.get("active_backend_id")
self.configuration.append_config_values(san.san_opts)
self.configuration.append_config_values(vxflexos_opts)
self.configuration.append_config_values(powerflex_opts)
self.statisticProperties = None
self.storage_pools = None
self.provisioning_type = None
@ -122,17 +123,17 @@ class VxFlexOSDriver(driver.VolumeDriver):
properties = {}
self._set_property(
properties,
"vxflexos:replication_cg",
"VxFlex OS Replication Consistency Group.",
_("Specifies the VxFlex OS Replication Consistency group for a "
"powerflex:replication_cg",
"PowerFlex Replication Consistency Group.",
_("Specifies the PowerFlex Replication Consistency group for a "
"volume type. Source and target volumes will be added to the "
"specified RCG during creation."),
"string")
return properties, "vxflexos"
return properties, "powerflex"
@staticmethod
def get_driver_options():
return vxflexos_opts
return powerflex_opts
@staticmethod
def _extract_domain_and_pool_from_host(host):
@ -174,12 +175,12 @@ class VxFlexOSDriver(driver.VolumeDriver):
self.active_backend_id = manager.VolumeManager.FAILBACK_SENTINEL
if not self.failover_choices:
self.failover_choices = {manager.VolumeManager.FAILBACK_SENTINEL}
vxflexos_storage_pools = (
self.configuration.safe_get("vxflexos_storage_pools")
powerflex_storage_pools = (
self.configuration.safe_get("powerflex_storage_pools")
)
if vxflexos_storage_pools:
if powerflex_storage_pools:
self.storage_pools = [
e.strip() for e in vxflexos_storage_pools.split(",")
e.strip() for e in powerflex_storage_pools.split(",")
]
LOG.info("Storage pools names: %s.", self.storage_pools)
self.provisioning_type = (
@ -187,7 +188,7 @@ class VxFlexOSDriver(driver.VolumeDriver):
)
LOG.info("Default provisioning type: %s.", self.provisioning_type)
self.configuration.max_over_subscription_ratio = (
self.configuration.vxflexos_max_over_subscription_ratio
self.configuration.powerflex_max_over_subscription_ratio
)
self.connector = initiator.connector.InitiatorConnector.factory(
initiator.SCALEIO,
@ -205,22 +206,22 @@ class VxFlexOSDriver(driver.VolumeDriver):
# validate oversubscription ratio
if (self.configuration.max_over_subscription_ratio >
VXFLEXOS_MAX_OVERSUBSCRIPTION_RATIO):
POWERFLEX_MAX_OVERSUBSCRIPTION_RATIO):
msg = (_("Max over subscription is configured to %(ratio)1f "
"while VxFlex OS support up to %(vxflexos_ratio)s.") %
"while PowerFlex support up to %(powerflex_ratio)s.") %
{"ratio": self.configuration.max_over_subscription_ratio,
"vxflexos_ratio": VXFLEXOS_MAX_OVERSUBSCRIPTION_RATIO})
"powerflex_ratio": POWERFLEX_MAX_OVERSUBSCRIPTION_RATIO})
raise exception.InvalidInput(reason=msg)
# validate that version of VxFlex OS is supported
# validate that version of PowerFlex is supported
if not flex_utils.version_gte(client.query_rest_api_version(), "2.0"):
# we are running against a pre-2.0.0 VxFlex OS(ScaleIO) instance
msg = (_("Using VxFlex OS versions less "
# we are running against a pre-2.0.0 PowerFlex(ScaleIO) instance
msg = (_("Using PowerFlex versions less "
"than v2.0 has been deprecated and will be "
"removed in a future version."))
versionutils.report_deprecated_feature(LOG, msg)
if not self.storage_pools:
msg = (_("Must specify storage pools. "
"Option: vxflexos_storage_pools."))
"Option: powerflex_storage_pools."))
raise exception.InvalidInput(reason=msg)
# validate the storage pools and check if zero padding is enabled
for pool in self.storage_pools:
@ -241,7 +242,7 @@ class VxFlexOSDriver(driver.VolumeDriver):
LOG.warning("Zero padding is disabled for pool %s. "
"This could lead to existing data being "
"accessible on new provisioned volumes. "
"Consult the VxFlex OS product documentation "
"Consult the PowerFlex product documentation "
"for information on how to enable zero padding "
"and prevent this from occurring.", pool)
# validate replication configuration
@ -259,7 +260,7 @@ class VxFlexOSDriver(driver.VolumeDriver):
)
if not (flex_utils.version_gte(primary_version, "3.5") and
flex_utils.version_gte(secondary_version, "3.5")):
LOG.info("VxFlex OS versions less than v3.5 do not "
LOG.info("PowerFlex versions less than v3.5 do not "
"support replication.")
self.replication_enabled = False
else:
@ -280,10 +281,10 @@ class VxFlexOSDriver(driver.VolumeDriver):
return []
def _get_queryable_statistics(self, sio_type, sio_id):
"""Get statistic properties that can be obtained from VxFlex OS.
"""Get statistic properties that can be obtained from PowerFlex.
:param sio_type: VxFlex OS resource type
:param sio_id: VxFlex OS resource id
:param sio_type: PowerFlex resource type
:param sio_id: PowerFlex resource id
:return: statistic properties
"""
@ -291,7 +292,7 @@ class VxFlexOSDriver(driver.VolumeDriver):
client = self._get_client()
if self.statisticProperties is None:
# in VxFlex OS 3.5 snapCapacityInUseInKb is replaced by
# in PowerFlex 3.5 snapCapacityInUseInKb is replaced by
# snapshotCapacityInKb
if flex_utils.version_gte(client.query_rest_api_version(), "3.5"):
self.statisticProperties = [
@ -303,7 +304,7 @@ class VxFlexOSDriver(driver.VolumeDriver):
"snapCapacityInUseInKb",
"thickCapacityInUseInKb",
]
# VxFlex OS 3.0 provide useful precomputed stats
# PowerFlex 3.0 provide useful precomputed stats
if flex_utils.version_gte(client.query_rest_api_version(), "3.0"):
self.statisticProperties.extend([
"netCapacityInUseInKb",
@ -328,7 +329,7 @@ class VxFlexOSDriver(driver.VolumeDriver):
"thinCapacityAllocatedInKb",
],
}
r, response = client.execute_vxflexos_post_request(
r, response = client.execute_powerflex_post_request(
url=url,
params=params,
sio_type=sio_type
@ -348,11 +349,11 @@ class VxFlexOSDriver(driver.VolumeDriver):
def _setup_volume_replication(self, vol_or_snap, source_provider_id):
"""Configure replication for volume or snapshot.
Create volume on secondary VxFlex OS storage backend.
Create volume on secondary PowerFlex storage backend.
Pair volumes and add replication pair to replication consistency group.
:param vol_or_snap: source volume/snapshot
:param source_provider_id: primary VxFlex OS volume id
:param source_provider_id: primary PowerFlex volume id
"""
try:
# If vol_or_snap has 'volume' attribute we are dealing
@ -402,13 +403,13 @@ class VxFlexOSDriver(driver.VolumeDriver):
def _teardown_volume_replication(self, provider_id):
"""Stop volume/snapshot replication.
Unpair volumes/snapshot and remove volume/snapshot from VxFlex OS
Unpair volumes/snapshot and remove volume/snapshot from PowerFlex
secondary storage backend.
"""
if not provider_id:
LOG.warning("Volume or snapshot does not have provider_id thus "
"does not map to VxFlex OS volume.")
"does not map to PowerFlex volume.")
return
try:
pair_id, remote_pair_id, vol_id, remote_vol_id = (
@ -465,7 +466,7 @@ class VxFlexOSDriver(driver.VolumeDriver):
def _failover_replication_cg(self, rcg_name, is_failback):
"""Failover/failback Replication Consistency Group on storage backend.
:param rcg_name: name of VxFlex OS Replication Consistency Group
:param rcg_name: name of PowerFlex Replication Consistency Group
:param is_failback: is failover or failback
:return: failover status of Replication Consistency Group
"""
@ -560,8 +561,8 @@ class VxFlexOSDriver(driver.VolumeDriver):
"""Get volume provisioning and compression from VolumeType extraspecs.
:param storage_type: extraspecs
:param protection_domain_name: name of VxFlex OS Protection Domain
:param storage_pool_name: name of VxFlex OS Storage Pool
:param protection_domain_name: name of PowerFlex Protection Domain
:param storage_pool_name: name of PowerFlex Storage Pool
:param secondary: primary or secondary client
:return: volume provisioning and compression
"""
@ -590,7 +591,7 @@ class VxFlexOSDriver(driver.VolumeDriver):
return provisioning, compression
def create_volume(self, volume):
"""Create volume on VxFlex OS storage backend.
"""Create volume on PowerFlex storage backend.
:param volume: volume to be created
:return: volume model updates
@ -632,7 +633,7 @@ class VxFlexOSDriver(driver.VolumeDriver):
"replication_status": fields.ReplicationStatus.DISABLED,
}
LOG.info("Successfully created volume %(vol_id)s. "
"Volume size: %(size)s. VxFlex OS volume name: %(vol_name)s, "
"Volume size: %(size)s. PowerFlex volume name: %(vol_name)s, "
"id: %(provider_id)s.",
{
"vol_id": volume.id,
@ -655,7 +656,7 @@ class VxFlexOSDriver(driver.VolumeDriver):
if size % 8 != 0:
round_volume_capacity = (
self.configuration.vxflexos_round_volume_capacity
self.configuration.powerflex_round_volume_capacity
)
if not round_volume_capacity:
msg = (_("Cannot create volume of size %s: "
@ -678,14 +679,14 @@ class VxFlexOSDriver(driver.VolumeDriver):
"zero padding being disabled for pool, %s:%s. "
"This behaviour can be changed by setting "
"the configuration option "
"vxflexos_allow_non_padded_volumes = True.",
"powerflex_allow_non_padded_volumes = True.",
protection_domain_name, storage_pool_name)
msg = _("Volume creation rejected due to "
"unsafe backend configuration.")
raise exception.VolumeBackendAPIException(data=msg)
def create_snapshot(self, snapshot):
"""Create volume snapshot on VxFlex OS storage backend.
"""Create volume snapshot on PowerFlex storage backend.
:param snapshot: volume snapshot to be created
:return: snapshot model updates
@ -699,7 +700,7 @@ class VxFlexOSDriver(driver.VolumeDriver):
snapshot.id)
model_updates = {"provider_id": provider_id}
LOG.info("Successfully created snapshot %(snap_id)s "
"for volume %(vol_id)s. VxFlex OS volume name: %(vol_name)s, "
"for volume %(vol_id)s. PowerFlex volume name: %(vol_name)s, "
"id: %(vol_provider_id)s, snapshot name: %(snap_name)s, "
"snapshot id: %(snap_provider_id)s.",
{
@ -715,9 +716,9 @@ class VxFlexOSDriver(driver.VolumeDriver):
return model_updates
def _create_volume_from_source(self, volume, source):
"""Create volume from volume or snapshot on VxFlex OS storage backend.
"""Create volume from volume or snapshot on PowerFlex storage backend.
We interchange 'volume' and 'snapshot' because in VxFlex OS
We interchange 'volume' and 'snapshot' because in PowerFlex
snapshot is a volume: once a snapshot is generated it
becomes a new unmapped volume in the system and the user
may manipulate it in the same manner as any other volume
@ -736,7 +737,7 @@ class VxFlexOSDriver(driver.VolumeDriver):
"replication_status": fields.ReplicationStatus.DISABLED,
}
LOG.info("Successfully created volume %(vol_id)s "
"from source %(source_id)s. VxFlex OS volume name: "
"from source %(source_id)s. PowerFlex volume name: "
"%(vol_name)s, id: %(vol_provider_id)s, source name: "
"%(source_name)s, source id: %(source_provider_id)s.",
{
@ -763,7 +764,7 @@ class VxFlexOSDriver(driver.VolumeDriver):
return model_updates
def create_volume_from_snapshot(self, volume, snapshot):
"""Create volume from snapshot on VxFlex OS storage backend.
"""Create volume from snapshot on PowerFlex storage backend.
:param volume: volume to be created
:param snapshot: snapshot from which volume will be created
@ -775,7 +776,7 @@ class VxFlexOSDriver(driver.VolumeDriver):
return self._create_volume_from_source(volume, snapshot)
def extend_volume(self, volume, new_size):
"""Extend size of existing and available VxFlex OS volume.
"""Extend size of existing and available PowerFlex volume.
This action will round up volume to nearest size that is
granularity of 8 GBs.
@ -800,7 +801,7 @@ class VxFlexOSDriver(driver.VolumeDriver):
self._get_client().extend_volume(volume.provider_id, volume_new_size)
def create_cloned_volume(self, volume, src_vref):
"""Create cloned volume on VxFlex OS storage backend.
"""Create cloned volume on PowerFlex storage backend.
:param volume: volume to be created
:param src_vref: source volume from which volume will be cloned
@ -812,7 +813,7 @@ class VxFlexOSDriver(driver.VolumeDriver):
return self._create_volume_from_source(volume, src_vref)
def delete_volume(self, volume):
"""Delete volume from VxFlex OS storage backend.
"""Delete volume from PowerFlex storage backend.
If volume is replicated, replication will be stopped first.
@ -825,7 +826,7 @@ class VxFlexOSDriver(driver.VolumeDriver):
self._get_client().remove_volume(volume.provider_id)
def delete_snapshot(self, snapshot):
"""Delete snapshot from VxFlex OS storage backend.
"""Delete snapshot from PowerFlex storage backend.
:param snapshot: snapshot to be deleted
"""
@ -841,7 +842,7 @@ class VxFlexOSDriver(driver.VolumeDriver):
def _initialize_connection(self, vol_or_snap, connector, vol_size):
"""Initialize connection and return connection info.
VxFlex OS driver returns a driver_volume_type of 'scaleio'.
PowerFlex driver returns a driver_volume_type of 'scaleio'.
"""
try:
@ -891,7 +892,7 @@ class VxFlexOSDriver(driver.VolumeDriver):
LOG.info("Bandwidth per GB: %s.", bw_per_gb)
if bw_per_gb is None:
return max_bandwidth
# Since VxFlex OS volumes size is in 8GB granularity
# Since PowerFlex volumes size is in 8GB granularity
# and BWS limitation is in 1024 KBs granularity, we need to make
# sure that scaled_bw_limit is in 128 granularity.
scaled_bw_limit = (
@ -934,7 +935,7 @@ class VxFlexOSDriver(driver.VolumeDriver):
def _terminate_connection(volume_or_snap, connector):
"""Terminate connection to volume or snapshot.
With VxFlex OS, snaps and volumes are terminated identically.
With PowerFlex, snaps and volumes are terminated identically.
"""
try:
@ -950,7 +951,7 @@ class VxFlexOSDriver(driver.VolumeDriver):
stats = {}
backend_name = self.configuration.safe_get("volume_backend_name")
stats["volume_backend_name"] = backend_name or "vxflexos"
stats["volume_backend_name"] = backend_name or "powerflex"
stats["vendor_name"] = "Dell EMC"
stats["driver_version"] = self.VERSION
stats["storage_protocol"] = "scaleio"
@ -1026,10 +1027,10 @@ class VxFlexOSDriver(driver.VolumeDriver):
self._stats = stats
def _query_pool_stats(self, domain_name, pool_name):
"""Get VxFlex OS Storage Pool statistics.
"""Get PowerFlex Storage Pool statistics.
:param domain_name: name of VxFlex OS Protection Domain
:param pool_name: name of VxFlex OS Storage Pool
:param domain_name: name of PowerFlex Protection Domain
:param pool_name: name of PowerFlex Storage Pool
:return: total, free and provisioned capacity in GB
"""
@ -1040,7 +1041,7 @@ class VxFlexOSDriver(driver.VolumeDriver):
pool_id = client.get_storage_pool_id(domain_name, pool_name)
props = self._get_queryable_statistics("StoragePool", pool_id)
params = {"ids": [pool_id], "properties": props}
r, response = client.execute_vxflexos_post_request(url, params)
r, response = client.execute_powerflex_post_request(url, params)
if r.status_code != http_client.OK:
msg = (_("Failed to query stats for Storage Pool %s.") % pool_name)
raise exception.VolumeBackendAPIException(data=msg)
@ -1066,7 +1067,7 @@ class VxFlexOSDriver(driver.VolumeDriver):
if flex_utils.version_gte(client.query_rest_api_version(), "3.0"):
return self._compute_pool_stats_v3(stats)
# Divide by two because VxFlex OS creates
# Divide by two because PowerFlex creates
# a copy for each volume
total_capacity_raw = flex_utils.convert_kb_to_gib(
(stats["capacityLimitInKb"] - stats["spareCapacityInKb"]) / 2
@ -1083,7 +1084,7 @@ class VxFlexOSDriver(driver.VolumeDriver):
thin_capacity_allocated = stats.get("thinCapacityAllocatedInKm")
if thin_capacity_allocated is None:
thin_capacity_allocated = stats.get("thinCapacityAllocatedInKb", 0)
# Divide by two because VxFlex OS creates
# Divide by two because PowerFlex creates
# a copy for each volume
provisioned_capacity = flex_utils.convert_kb_to_gib(
(stats["thickCapacityInUseInKb"] +
@ -1094,7 +1095,7 @@ class VxFlexOSDriver(driver.VolumeDriver):
@staticmethod