From 0380f0c860ec12594f43ba35e986001fa415a267 Mon Sep 17 00:00:00 2001 From: elajkat Date: Wed, 26 Aug 2020 14:06:09 +0200 Subject: [PATCH] New exception QosPlacementAllocationConflict In case the update of placement allocation fails with conflict and with message like: "The requested amount would exceed the capacity" this new exception can indicate it for neuton users. Change-Id: I2460e7d8025cedd2e92abdc9d769d2ad0b84838b Related-Bug: #1882804 --- neutron_lib/exceptions/qos.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/neutron_lib/exceptions/qos.py b/neutron_lib/exceptions/qos.py index 847bdd4e0..ee5fd1475 100644 --- a/neutron_lib/exceptions/qos.py +++ b/neutron_lib/exceptions/qos.py @@ -105,3 +105,9 @@ class RouterQosBindingNotFound(e.NotFound): class RouterQosBindingError(e.NeutronException): message = _("QoS binding for router %(router_id)s gateway and policy " "%(policy_id)s could not be created: %(db_error)s.") + + +class QosPlacementAllocationConflict(e.Conflict): + message = _("Allocation for consumer %(consumer)s is not possible on " + "resource provider %(rp)s, the requested amount of bandwidth " + "would exceed the capacity available.")