Merge "DVR: Remove get_port call from dvr_update_router_addvm"
This commit is contained in:
commit
a5b22858b8
|
@ -100,8 +100,7 @@ class L3_DVRsch_db_mixin(l3agent_sch_db.L3AgentSchedulerDbMixin):
|
|||
"""
|
||||
|
||||
def dvr_update_router_addvm(self, context, port):
|
||||
port_dict = self._core_plugin.get_port(context, port['id'])
|
||||
port_host = port_dict[portbindings.HOST_ID]
|
||||
port_host = port[portbindings.HOST_ID]
|
||||
l3_agent_on_host = (self.get_l3_agents(
|
||||
context, filters={'host': [port_host]}) or [None])[0]
|
||||
if not l3_agent_on_host:
|
||||
|
|
|
@ -1197,9 +1197,6 @@ class L3DvrSchedulerTestCase(testlib_api.SqlTestCase):
|
|||
return_value=dvr_ports),\
|
||||
mock.patch('neutron.api.rpc.agentnotifiers.l3_rpc_agent_api'
|
||||
'.L3AgentNotifyAPI'),\
|
||||
mock.patch(
|
||||
'neutron.db.db_base_plugin_v2.NeutronDbPluginV2.get_port',
|
||||
return_value=port),\
|
||||
mock.patch.object(
|
||||
self.dut, 'get_l3_agents',
|
||||
return_value=[agent_on_host]) as get_l3_agents:
|
||||
|
|
Loading…
Reference in New Issue