Files
neutron-lib/neutron_lib/exceptions/vlantransparent.py
Slawek Kaplonski 102274bf7e Change parent for the VlanTransparencyDriverError
Previously this exception class inherited from the generic
NeutronException which caused errors 500 returned in the API when it was
raised.
Now it inherits from the BadRequest exception, it is handled by the
API in a "nicer" way and returns 400 with proper error message.

Depends-On: https://review.opendev.org/c/openstack/neutron/+/937668

Closes-Bug: #2091613
Change-Id: I6ec6b431371a2a902b7e8a35cf9a172ff5d5d82b
2024-12-13 08:32:17 +00:00

22 lines
896 B
Python

# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from neutron_lib._i18n import _
from neutron_lib import exceptions
class VlanTransparencyDriverError(exceptions.BadRequest):
"""Vlan Transparency not supported by all mechanism drivers."""
message = _("Backend does not support VLAN Transparency.")