Merge "DVR: Remove get_port call from dvr_update_router_addvm"

This commit is contained in:
Jenkins 2015-12-23 12:33:05 +00:00 committed by Gerrit Code Review
commit a5b22858b8
2 changed files with 1 additions and 5 deletions

View File

@ -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:

View File

@ -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: