diff --git a/cinder/volume/drivers/dell_emc/vmax/utils.py b/cinder/volume/drivers/dell_emc/vmax/utils.py index 7543d358335..52b1773b0f7 100644 --- a/cinder/volume/drivers/dell_emc/vmax/utils.py +++ b/cinder/volume/drivers/dell_emc/vmax/utils.py @@ -783,9 +783,9 @@ class VMAXUtils(object): :param new_type_extra_specs: the target type extra specs :return: bool """ - is_src_multiattach = vol_utils.is_replicated_str( + is_src_multiattach = vol_utils.is_boolean_str( extra_specs.get('multiattach')) - is_tgt_multiattach = vol_utils.is_replicated_str( + is_tgt_multiattach = vol_utils.is_boolean_str( new_type_extra_specs.get('multiattach')) return is_src_multiattach != is_tgt_multiattach diff --git a/cinder/volume/manager.py b/cinder/volume/manager.py index 7f84b8b9d92..6df939aff7b 100644 --- a/cinder/volume/manager.py +++ b/cinder/volume/manager.py @@ -2839,7 +2839,7 @@ class VolumeManager(manager.CleanableManager, replication_diff = diff_specs.get('replication_enabled') if replication_diff: - is_replicated = vol_utils.is_replicated_str(replication_diff[1]) + is_replicated = vol_utils.is_boolean_str(replication_diff[1]) if is_replicated: replication_status = fields.ReplicationStatus.ENABLED else: diff --git a/cinder/volume/utils.py b/cinder/volume/utils.py index 1dd50435ec8..7e860988a7f 100644 --- a/cinder/volume/utils.py +++ b/cinder/volume/utils.py @@ -968,7 +968,7 @@ def clone_encryption_key(context, key_manager, encryption_key_id): return clone_key_id -def is_replicated_str(str): +def is_boolean_str(str): spec = (str or '').split() return (len(spec) == 2 and spec[0] == '' and strutils.bool_from_string(spec[1])) @@ -976,12 +976,12 @@ def is_replicated_str(str): def is_replicated_spec(extra_specs): return (extra_specs and - is_replicated_str(extra_specs.get('replication_enabled'))) + is_boolean_str(extra_specs.get('replication_enabled'))) def is_multiattach_spec(extra_specs): return (extra_specs and - is_replicated_str(extra_specs.get('multiattach'))) + is_boolean_str(extra_specs.get('multiattach'))) def group_get_by_id(group_id):