diff --git a/cinder/volume/drivers/dell_emc/powerstore/driver.py b/cinder/volume/drivers/dell_emc/powerstore/driver.py index 3b7e27f01ac..91ed3f91e21 100644 --- a/cinder/volume/drivers/dell_emc/powerstore/driver.py +++ b/cinder/volume/drivers/dell_emc/powerstore/driver.py @@ -34,7 +34,6 @@ POWERSTORE_OPTS = options.POWERSTORE_OPTS CONF = cfg.CONF CONF.register_opts(POWERSTORE_OPTS, group=configuration.SHARED_CONF_GROUP) LOG = logging.getLogger(__name__) -POWERSTORE_PP_KEY = "powerstore:protection_policy" @interface.volumedriver @@ -75,7 +74,7 @@ class PowerStoreDriver(driver.VolumeDriver): properties = {} self._set_property( properties, - POWERSTORE_PP_KEY, + utils.POWERSTORE_PP_KEY, "PowerStore Protection Policy.", _("Specifies the PowerStore Protection Policy for a " "volume type. Protection Policy is assigned to a volume during " diff --git a/cinder/volume/drivers/dell_emc/powerstore/utils.py b/cinder/volume/drivers/dell_emc/powerstore/utils.py index dd02fe93ca2..784d06d2ee1 100644 --- a/cinder/volume/drivers/dell_emc/powerstore/utils.py +++ b/cinder/volume/drivers/dell_emc/powerstore/utils.py @@ -26,7 +26,6 @@ from cinder.common import constants from cinder import exception from cinder.i18n import _ from cinder.objects import fields -from cinder.volume.drivers.dell_emc.powerstore import driver from cinder.volume import volume_utils @@ -36,6 +35,7 @@ CHAP_DEFAULT_SECRET_LENGTH = 60 PROTOCOL_FC = constants.FC PROTOCOL_ISCSI = constants.ISCSI PROTOCOL_NVME = "NVMe" +POWERSTORE_PP_KEY = "powerstore:protection_policy" def bytes_to_gib(size_in_bytes): @@ -167,7 +167,7 @@ def get_protection_policy_from_volume(volume): :return: Protection policy name """ - return volume.volume_type.extra_specs.get(driver.POWERSTORE_PP_KEY) + return volume.volume_type.extra_specs.get(POWERSTORE_PP_KEY) def is_group_a_cg_snapshot_type(func):