]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
L3 agent fetches the external network id once
authorCarl Baldwin <carl.baldwin@hp.com>
Wed, 15 Jan 2014 18:46:17 +0000 (18:46 +0000)
committerCarl Baldwin <carl.baldwin@hp.com>
Fri, 14 Feb 2014 00:27:17 +0000 (00:27 +0000)
commit702e1fbf7ad5dd961dfd35cd6a0e54d4d6da5e34
tree2023ca7d539e88916ccf8bf3a0bfc3430a2cca7d
parentcffaf7468ba93e6ee7377ae17ba5dd2016484c8a
L3 agent fetches the external network id once

Rather than fetching the id of the external network each time that
_process_routers is called, get it once and remember it.  If the agent
is ever requested to connect to a different ext-net then it will fetch
the current ext-net to double check for the unlikely event that the
ext-net has changed.  If it has then it will remember the new ext-net.

This is only applicable in the case where there is only one ext-net
that has not been configured explicitly in the config file.  That was
the only case that would cause an RPC message in the first place.

Change-Id: I40bbbf6233131ea5d40122ef9495fd3cb7dc823a
Closes-Bug: #1269567
neutron/agent/l3_agent.py
neutron/tests/unit/test_l3_agent.py