Commit Graph

3 Commits

Author SHA1 Message Date
Nurmatov Mamatisa 2dabcc5cf7 Add qos rule validation for network
Minimum bandwidth QoS rule is only applicable for the network
which is backed by physical networks.
When updating network policy on network without port
will raise exception.

Partial-Bug: #1913180
Change-Id: I6b57f7ce6d411be388c63b87f2c75f2de703cc97
2021-02-04 17:15:02 +03:00
Bence Romsics 6f3fb7fc81 Extend qos DriverBase with validate_rule_for_port()
The openvswitch qos driver supports the min-bw qos rule only on
networks backed by physnets. Currently the qos driver interface does
not have a method that takes both the policy/rule and the network/port,
therefore we don't have enough information in the driver to tell if
we support the min-bw rule for a port or not. This change introduces
validate_rule_for_port(..., rule, port) so we have all the information
to tell.

The base method validate_rule_for_port() is concrete and returns True
for backwards compatibility.

Change-Id: I58a47bb895bede219cfeebbf0665aaf01660ce89
Needed-By: https://review.opendev.org/705695
Partial-Bug: #1861442
Related-Bug: #1819029
2020-02-05 14:21:10 +01:00
Boden R d35f7e1716 rehome qos service DriverBase class
The neutron.services.qos.drivers.base.DriverBase class is used by a
number of consumers [1]. This patch rehomes it into neutron_lib along
with the qos_consts that are also used by consumers [2].

UTs and a release note are also included.

[1] http://codesearch.openstack.org/?q=from%20neutron%5C.services%5C.qos%5C.drivers%20import%20base
[2] http://codesearch.openstack.org/?q=from%20neutron%5C.services%5C.qos%20import%20qos_consts

Change-Id: Ifaf4657c37791e8e11907c66fb6cab7128c122a6
2017-06-13 09:06:33 -06:00