Adjust qos supported rules to Neutron
In Neutron in patch I75bd18b3a1875daa5639dd141fb7bbd6e1c54118 list of supported_rules was changed from list of rule types to dict with rule types and available parameters and values. Additionally parameter `direction` was introduced for qos_bandwidth_limit rule type in Neutron in Ia13568879c2b6f80fb190ccafe7e19ca05b0c6a8 By default each rule has got EGRESS direction so this value of direction is supported by existing qos_driver. Change-Id: I1584703a5e43638a3a5f6b96c35614c203c03584 Depends-On: Ia13568879c2b6f80fb190ccafe7e19ca05b0c6a8 Related-Bug: #1586056 Related-Bug: #1560961
This commit is contained in:
parent
cc7e2e336d
commit
49940ba417
@ -16,13 +16,25 @@
|
||||
|
||||
from oslo_log import log as logging
|
||||
|
||||
from neutron.common import constants as n_consts
|
||||
from neutron.services.qos.drivers import base
|
||||
from neutron.services.qos import qos_consts
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
DRIVER = None
|
||||
SUPPORTED_RULES = [qos_consts.RULE_TYPE_BANDWIDTH_LIMIT,
|
||||
qos_consts.RULE_TYPE_MINIMUM_BANDWIDTH]
|
||||
SUPPORTED_RULES = {
|
||||
qos_consts.RULE_TYPE_BANDWIDTH_LIMIT: {
|
||||
qos_consts.MAX_KBPS: {
|
||||
'type:range': [0, n_consts.DB_INTEGER_MAX_VALUE]},
|
||||
qos_consts.MAX_BURST: {
|
||||
'type:range': [0, n_consts.DB_INTEGER_MAX_VALUE]},
|
||||
qos_consts.DIRECTION: {
|
||||
'type:values': [n_consts.EGRESS_DIRECTION]}
|
||||
},
|
||||
qos_consts.RULE_TYPE_DSCP_MARKING: {
|
||||
qos_consts.DSCP_MARK: {'type:values': n_consts.VALID_DSCP_MARKS}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class NSXvQosDriver(base.DriverBase):
|
||||
|
@ -16,6 +16,7 @@
|
||||
|
||||
from oslo_log import log as logging
|
||||
|
||||
from neutron.common import constants as n_consts
|
||||
from neutron.services.qos.drivers import base
|
||||
from neutron.services.qos import qos_consts
|
||||
|
||||
@ -25,8 +26,19 @@ LOG = logging.getLogger(__name__)
|
||||
|
||||
DRIVER = None
|
||||
|
||||
SUPPORTED_RULES = [qos_consts.RULE_TYPE_BANDWIDTH_LIMIT,
|
||||
qos_consts.RULE_TYPE_MINIMUM_BANDWIDTH]
|
||||
SUPPORTED_RULES = {
|
||||
qos_consts.RULE_TYPE_BANDWIDTH_LIMIT: {
|
||||
qos_consts.MAX_KBPS: {
|
||||
'type:range': [0, n_consts.DB_INTEGER_MAX_VALUE]},
|
||||
qos_consts.MAX_BURST: {
|
||||
'type:range': [0, n_consts.DB_INTEGER_MAX_VALUE]},
|
||||
qos_consts.DIRECTION: {
|
||||
'type:values': [n_consts.EGRESS_DIRECTION]}
|
||||
},
|
||||
qos_consts.RULE_TYPE_DSCP_MARKING: {
|
||||
qos_consts.DSCP_MARK: {'type:values': n_consts.VALID_DSCP_MARKS}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class NSXv3QosDriver(base.DriverBase):
|
||||
|
Loading…
x
Reference in New Issue
Block a user