use common constants from lib

neutron-lib contains the neutron.common.constants.
This patch switches references over to use the lib version of them.

Change-Id: I0354c84bd85e20ff4ea7ba392bf9ebfc2e7ac70e
This commit is contained in:
Boden R 2017-09-22 15:55:08 -06:00
parent 2cfb2f77d8
commit 06bf8d1186
4 changed files with 16 additions and 15 deletions

View File

@ -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}
}
}

View File

@ -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

View File

@ -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}
}
}

View File

@ -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