Merge "FWaaS: make use of neutron_lib exceptions"

This commit is contained in:
Jenkins 2016-03-17 18:03:15 +00:00 committed by Gerrit Code Review
commit 3605570eca
4 changed files with 12 additions and 13 deletions

View File

@ -14,7 +14,7 @@
from neutron.api import extensions
from neutron.api.v2 import attributes as attr
from neutron.common import exceptions as excp
from neutron_lib import exceptions as excp
from neutron_fwaas._i18n import _

View File

@ -18,10 +18,10 @@ import abc
from neutron.api import extensions
from neutron.api.v2 import attributes as attr
from neutron.api.v2 import resource_helper
from neutron.common import exceptions as nexception
from neutron.plugins.common import constants as p_const
from neutron.services import service_base
from neutron_lib import constants
from neutron_lib import exceptions as nexception
from oslo_config import cfg
from oslo_log import log as logging
import six
@ -142,15 +142,14 @@ class FirewallRuleInfoMissing(nexception.InvalidInput):
class FirewallIpAddressConflict(nexception.InvalidInput):
message = _("Invalid input - IP addresses do not agree with IP Version")
# TODO(dougwig) - once this exception is out of neutron, restore this
#class FirewallInternalDriverError(nexception.NeutronException):
# """Fwaas exception for all driver errors.
#
# On any failure or exception in the driver, driver should log it and
# raise this exception to the agent
# """
# message = _("%(driver)s: Internal driver error.")
FirewallInternalDriverError = nexception.FirewallInternalDriverError
class FirewallInternalDriverError(nexception.NeutronException):
"""Fwaas exception for all driver errors.
On any failure or exception in the driver, driver should log it and
raise this exception to the agent
"""
message = _("%(driver)s: Internal driver error.")
class FirewallRuleConflict(nexception.Conflict):

View File

@ -15,7 +15,7 @@
from neutron.api import extensions
from neutron.api.v2 import attributes as attr
from neutron.common import exceptions as nexception
from neutron_lib import exceptions as nexception
from neutron_fwaas._i18n import _

View File

@ -26,7 +26,7 @@ import requests
import six
from contextlib import contextmanager
from neutron.common import exceptions as n_exc
from neutron_lib import exceptions as n_exc
from oslo_log import log as logging
from oslo_serialization import jsonutils