Merge "DVR Floating IP create don't raise exception if agent not found"
This commit is contained in:
commit
5d8c8d8feb
@ -983,8 +983,7 @@ class _DVRAgentInterfaceMixin(object):
|
|||||||
try:
|
try:
|
||||||
l3_agent_db = self._get_agent_by_type_and_host(
|
l3_agent_db = self._get_agent_by_type_and_host(
|
||||||
context, const.AGENT_TYPE_L3, host)
|
context, const.AGENT_TYPE_L3, host)
|
||||||
except agent_exc.AgentNotFoundByTypeHost(
|
except agent_exc.AgentNotFoundByTypeHost:
|
||||||
agent_type=const.AGENT_TYPE_L3, host=host):
|
|
||||||
LOG.warning("%(ag)s agent not found for the given host: %(host)s",
|
LOG.warning("%(ag)s agent not found for the given host: %(host)s",
|
||||||
{'ag': const.AGENT_TYPE_L3,
|
{'ag': const.AGENT_TYPE_L3,
|
||||||
'host': host})
|
'host': host})
|
||||||
|
@ -20,7 +20,6 @@ from neutron_lib.api.definitions import portbindings
|
|||||||
from neutron_lib.callbacks import events
|
from neutron_lib.callbacks import events
|
||||||
from neutron_lib.callbacks import registry
|
from neutron_lib.callbacks import registry
|
||||||
from neutron_lib.callbacks import resources
|
from neutron_lib.callbacks import resources
|
||||||
from neutron_lib.exceptions import agent as agent_exc
|
|
||||||
|
|
||||||
from neutron_lib import constants
|
from neutron_lib import constants
|
||||||
from neutron_lib import context
|
from neutron_lib import context
|
||||||
@ -338,12 +337,9 @@ class L3DvrTestCase(L3DvrTestCaseBase):
|
|||||||
self.context, router['id'],
|
self.context, router['id'],
|
||||||
{'subnet_id': int_subnet['subnet']['id']})
|
{'subnet_id': int_subnet['subnet']['id']})
|
||||||
if test_agent_mode is None:
|
if test_agent_mode is None:
|
||||||
self.assertRaises(
|
self.assertIsNone(
|
||||||
agent_exc.AgentNotFoundByTypeHost,
|
self.l3_plugin.create_fip_agent_gw_port_if_not_exists(
|
||||||
self.l3_plugin.create_fip_agent_gw_port_if_not_exists,
|
self.context, ext_net_id, 'host1'))
|
||||||
self.context,
|
|
||||||
ext_net_id,
|
|
||||||
'host1')
|
|
||||||
return
|
return
|
||||||
floating_ip = {'floating_network_id': ext_net_id,
|
floating_ip = {'floating_network_id': ext_net_id,
|
||||||
'router_id': router['id'],
|
'router_id': router['id'],
|
||||||
|
Loading…
Reference in New Issue
Block a user