For Ml2 plugin, the list of supported QoS rule types is defined as a common
subset of rules supported by all active mechanism drivers.
+Note: the list of supported rule types reported by core plugin is not enforced
+when accessing QoS rule resources. This is mostly because then we would not be
+able to create any rules while at least one ml2 driver in gate lacks support
+for QoS (at the moment of writing, linuxbridge is such a driver).
+
QoS resources
-------------
from neutron.extensions import portbindings
from neutron.plugins.common import constants as p_constants
from neutron.plugins.ml2.drivers import mech_agent
-from neutron.services.qos import qos_consts
LOG = log.getLogger(__name__)
network.
"""
- # TODO(QoS): really, there is no support for QoS in the driver. Leaving it
- # here since API tests are executed against both ovs and lb drivers, and it
- # effectively makes ml2 plugin return an empty list for supported rule
- # types
- supported_qos_rule_types = [qos_consts.RULE_TYPE_BANDWIDTH_LIMIT]
-
def __init__(self):
sg_enabled = securitygroups_rpc.is_firewall_enabled()
super(LinuxbridgeMechanismDriver, self).__init__(
self._get_policy_obj(context, policy_id)
return rule_object.QosBandwidthLimitRule.get_objects(context)
+ # TODO(QoS): enforce rule types when accessing rule objects
@db_base_plugin_common.filter_fields
@db_base_plugin_common.convert_result_to_dict
def get_rule_types(self, context, filters=None, fields=None,
@test.idempotent_id('cf776f77-8d3d-49f2-8572-12d6a1557224')
def test_list_rule_types(self):
# List supported rule types
- expected_rule_types = qos_consts.VALID_RULE_TYPES
+ # TODO(QoS): since in gate we run both ovs and linuxbridge ml2 drivers,
+ # and since Linux Bridge ml2 driver does not have QoS support yet, ml2
+ # plugin reports no rule types are supported. Once linuxbridge will
+ # receive support for QoS, the list of expected rule types will change.
+ #
+ # In theory, we could make the test conditional on which ml2 drivers
+ # are enabled in gate (or more specifically, on which supported qos
+ # rules are claimed by core plugin), but that option doesn't seem to be
+ # available thru tempest_lib framework
+ expected_rule_types = []
expected_rule_details = ['type']
rule_types = self.admin_client.list_qos_rule_types()