diff --git a/manila/share/drivers/huawei/constants.py b/manila/share/drivers/huawei/constants.py index 98f64bf033..548df91faa 100644 --- a/manila/share/drivers/huawei/constants.py +++ b/manila/share/drivers/huawei/constants.py @@ -31,6 +31,8 @@ ACCESS_CIFS_RO = "0" ERROR_CONNECT_TO_SERVER = -403 ERROR_UNAUTHORIZED_TO_SERVER = -401 +ALLOC_TYPE_THIN_FLAG = "1" + OPTS_CAPABILITIES = { 'dedupe': False, 'compression': False, diff --git a/manila/share/drivers/huawei/v3/connection.py b/manila/share/drivers/huawei/v3/connection.py index c4084b8e50..85bc095e26 100644 --- a/manila/share/drivers/huawei/v3/connection.py +++ b/manila/share/drivers/huawei/v3/connection.py @@ -171,7 +171,7 @@ class V3StorageConnection(driver.HuaweiBase): LOG.error(err_msg) raise exception.InvalidShare(reason=err_msg) - if fs_info['ALLOCTYPE'] != '1': + if fs_info['ALLOCTYPE'] != constants.ALLOC_TYPE_THIN_FLAG: err_msg = (_("Share (%s) can not be shrunk. only 'Thin' shares " "support shrink.") % share_name)