Skip to content

Commit

Permalink
contrail raises wrong quota exception
Browse files Browse the repository at this point in the history
This patch reraise OverQuota exception which
come from contrail.

In kilo and Liberty, OverQuota exception is defined
in neutron/common/exceptions.py.In Mitaka, it moved
to neutron_lib project neutron_lib/exceptions.py#L212

Change-Id: I1d3615f073fd3352b74a522604601c02f34bd814
Closes-Bug: #1590930
  • Loading branch information
sajuptpm committed Jun 24, 2016
1 parent 07ffed4 commit 534e7dd
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -40,6 +40,10 @@
except ImportError:
from oslo_log import log as logging

try:
from neutron_lib import exceptions as libexc
except ImportError:
libexc = None

# Constant for max length of network interface names
# eg 'bridge' in the Network class or 'devname' in
Expand Down Expand Up @@ -100,6 +104,8 @@ def _raise_contrail_error(info, obj_name):
raise getattr(securitygroup, exc_name)(**info)
if hasattr(allowedaddresspairs, exc_name):
raise getattr(allowedaddresspairs, exc_name)(**info)
if libexc and hasattr(libexc, exc_name):
raise getattr(libexc, exc_name)(**info)
raise exc.NeutronException(**info)


Expand Down

0 comments on commit 534e7dd

Please sign in to comment.