diff --git a/vmware_nsx/services/qos/nsx_v/driver.py b/vmware_nsx/services/qos/nsx_v/driver.py index 7597c31293..884a91a902 100644 --- a/vmware_nsx/services/qos/nsx_v/driver.py +++ b/vmware_nsx/services/qos/nsx_v/driver.py @@ -14,26 +14,27 @@ # License for the specific language governing permissions and limitations # under the License. +from neutron_lib import constants +from neutron_lib.db import constants as db_constants from neutron_lib.services.qos import base from neutron_lib.services.qos import constants as qos_consts from oslo_log import log as logging -from neutron.common import constants as n_consts LOG = logging.getLogger(__name__) DRIVER = None SUPPORTED_RULES = { qos_consts.RULE_TYPE_BANDWIDTH_LIMIT: { qos_consts.MAX_KBPS: { - 'type:range': [0, n_consts.DB_INTEGER_MAX_VALUE]}, + 'type:range': [0, db_constants.DB_INTEGER_MAX_VALUE]}, qos_consts.MAX_BURST: { - 'type:range': [0, n_consts.DB_INTEGER_MAX_VALUE]}, + 'type:range': [0, db_constants.DB_INTEGER_MAX_VALUE]}, qos_consts.DIRECTION: { - 'type:values': [n_consts.EGRESS_DIRECTION, - n_consts.INGRESS_DIRECTION]} + 'type:values': [constants.EGRESS_DIRECTION, + constants.INGRESS_DIRECTION]} }, qos_consts.RULE_TYPE_DSCP_MARKING: { - qos_consts.DSCP_MARK: {'type:values': n_consts.VALID_DSCP_MARKS} + qos_consts.DSCP_MARK: {'type:values': constants.VALID_DSCP_MARKS} } } diff --git a/vmware_nsx/services/qos/nsx_v/utils.py b/vmware_nsx/services/qos/nsx_v/utils.py index 8544710f37..48852f80f4 100644 --- a/vmware_nsx/services/qos/nsx_v/utils.py +++ b/vmware_nsx/services/qos/nsx_v/utils.py @@ -14,7 +14,7 @@ # License for the specific language governing permissions and limitations # under the License. -from neutron.common import constants as n_consts +from neutron_lib import constants as n_consts from neutron_lib.plugins import constants as plugin_const from neutron_lib.plugins import directory from neutron_lib.services.qos import constants as qos_consts diff --git a/vmware_nsx/services/qos/nsx_v3/driver.py b/vmware_nsx/services/qos/nsx_v3/driver.py index 1d6726121c..103c7071a3 100644 --- a/vmware_nsx/services/qos/nsx_v3/driver.py +++ b/vmware_nsx/services/qos/nsx_v3/driver.py @@ -14,12 +14,12 @@ # License for the specific language governing permissions and limitations # under the License. +from neutron_lib import constants +from neutron_lib.db import constants as db_constants from neutron_lib.services.qos import base from neutron_lib.services.qos import constants as qos_consts from oslo_log import log as logging -from neutron.common import constants as n_consts - from vmware_nsx.services.qos.nsx_v3 import utils as qos_utils LOG = logging.getLogger(__name__) @@ -29,15 +29,15 @@ DRIVER = None SUPPORTED_RULES = { qos_consts.RULE_TYPE_BANDWIDTH_LIMIT: { qos_consts.MAX_KBPS: { - 'type:range': [0, n_consts.DB_INTEGER_MAX_VALUE]}, + 'type:range': [0, db_constants.DB_INTEGER_MAX_VALUE]}, qos_consts.MAX_BURST: { - 'type:range': [0, n_consts.DB_INTEGER_MAX_VALUE]}, + 'type:range': [0, db_constants.DB_INTEGER_MAX_VALUE]}, qos_consts.DIRECTION: { - 'type:values': [n_consts.EGRESS_DIRECTION, - n_consts.INGRESS_DIRECTION]} + 'type:values': [constants.EGRESS_DIRECTION, + constants.INGRESS_DIRECTION]} }, qos_consts.RULE_TYPE_DSCP_MARKING: { - qos_consts.DSCP_MARK: {'type:values': n_consts.VALID_DSCP_MARKS} + qos_consts.DSCP_MARK: {'type:values': constants.VALID_DSCP_MARKS} } } diff --git a/vmware_nsx/services/qos/nsx_v3/utils.py b/vmware_nsx/services/qos/nsx_v3/utils.py index 6e3739856a..97426d2c74 100644 --- a/vmware_nsx/services/qos/nsx_v3/utils.py +++ b/vmware_nsx/services/qos/nsx_v3/utils.py @@ -17,8 +17,8 @@ from oslo_config import cfg from oslo_log import log as logging -from neutron.common import constants as n_consts from neutron_lib.api import validators +from neutron_lib import constants as n_consts from neutron_lib import exceptions as n_exc from neutron_lib.plugins import directory from neutron_lib.services.qos import constants as qos_consts