Merge "Don't catch DBError in DHCP action handler"
This commit is contained in:
commit
aae2e8dcbc
|
@ -20,7 +20,6 @@ import operator
|
|||
from neutron_lib import constants
|
||||
from neutron_lib import exceptions
|
||||
from oslo_config import cfg
|
||||
from oslo_db import exception as db_exc
|
||||
from oslo_log import log as logging
|
||||
import oslo_messaging
|
||||
from oslo_utils import excutils
|
||||
|
@ -101,8 +100,7 @@ class DhcpRpcCallback(object):
|
|||
else:
|
||||
msg = _('Unrecognized action')
|
||||
raise exceptions.Invalid(message=msg)
|
||||
except (db_exc.DBError,
|
||||
exceptions.NetworkNotFound,
|
||||
except (exceptions.NetworkNotFound,
|
||||
exceptions.SubnetNotFound,
|
||||
exceptions.InvalidInput,
|
||||
exceptions.IpAddressGenerationFailure) as e:
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
import mock
|
||||
from neutron_lib import constants
|
||||
from neutron_lib import exceptions as n_exc
|
||||
from oslo_db import exception as db_exc
|
||||
|
||||
from neutron.api.rpc.handlers import dhcp_rpc
|
||||
from neutron.callbacks import resources
|
||||
|
@ -140,10 +139,6 @@ class TestDhcpRpcCallback(base.BaseTestCase):
|
|||
exc=n_exc.SubnetNotFound(subnet_id='foo_subnet_id'),
|
||||
action='create_port')
|
||||
|
||||
def test_create_port_catch_db_error(self):
|
||||
self._test__port_action_with_failures(exc=db_exc.DBError(),
|
||||
action='create_port')
|
||||
|
||||
def test_create_port_catch_ip_generation_failure_reraise(self):
|
||||
self.assertRaises(
|
||||
n_exc.IpAddressGenerationFailure,
|
||||
|
|
Loading…
Reference in New Issue