]> 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)
committerThomas Goirand <thomas@goirand.fr>
Thu, 13 Mar 2014 07:20:21 +0000 (15:20 +0800)
commit9aa1cf83851492139e5cb191ee8e72d4024c8249
tree2ad0aeeb422b4cd99ce7bf645a889b00cb5b8988
parentc611cc9090c15f3dd13d3e454492cb0e20bbbba9
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