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: I1528ceab8607cad1bd88ea0e3230d5751f32e9b5
Closes-Bug: #1590930
  • Loading branch information
sajuptpm committed Jun 24, 2016
1 parent 4a09a96 commit 3fc7fee
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -39,6 +39,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 @@ -92,6 +96,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 3fc7fee

Please sign in to comment.