From b934133e697527addc75849a99d811d90aec087b Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Tue, 11 Dec 2018 16:24:54 +0000 Subject: [PATCH] Add traffic control exceptions Added new traffic control exceptions TcLibQdiscNeededArguments and TcLibQdiscTypeError in ``neutron-lib.exceptions.qos``. Related-Bug: #1560963 Change-Id: I4cad9bbfc5e0ed20bd24be33544ba0fa06898f54 --- neutron_lib/exceptions/qos.py | 10 ++++++++++ ...dd-traffic-control-exceptions-0e137dae3a556d54.yaml | 5 +++++ 2 files changed, 15 insertions(+) create mode 100644 releasenotes/notes/add-traffic-control-exceptions-0e137dae3a556d54.yaml diff --git a/neutron_lib/exceptions/qos.py b/neutron_lib/exceptions/qos.py index 40f650abd..9e2acbe3b 100644 --- a/neutron_lib/exceptions/qos.py +++ b/neutron_lib/exceptions/qos.py @@ -85,3 +85,13 @@ class QoSRulesConflict(e.Conflict): class PolicyRemoveAuthorizationError(e.NotAuthorized): message = _("Failed to remove provided policy %(policy_id)s " "because you are not authorized.") + + +class TcLibQdiscTypeError(e.NeutronException): + message = _("TC Qdisc type %(qdisc_type)s is not supported; supported " + "types: %(supported_qdisc_types)s.") + + +class TcLibQdiscNeededArguments(e.NeutronException): + message = _("TC Qdisc type %(qdisc_type)s needs following arguments: " + "%(needed_arguments)s.") diff --git a/releasenotes/notes/add-traffic-control-exceptions-0e137dae3a556d54.yaml b/releasenotes/notes/add-traffic-control-exceptions-0e137dae3a556d54.yaml new file mode 100644 index 000000000..9f5bba704 --- /dev/null +++ b/releasenotes/notes/add-traffic-control-exceptions-0e137dae3a556d54.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Adds new traffic control exceptions ``TcLibQdiscNeededArguments`` + and ``TcLibQdiscTypeError`` in ``neutron-lib.exceptions.qos``.