]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Refactor management of namespaces in the L3 Agent
authorMiguel Lavalle <miguel@mlavalle.com>
Fri, 16 Jan 2015 04:16:01 +0000 (22:16 -0600)
committerCarl Baldwin <carl.baldwin@hp.com>
Wed, 4 Mar 2015 21:28:23 +0000 (21:28 +0000)
commit01a7ba19cf6661b1aef7d08fb748bb2470caf28f
tree4f25fdd841548fad02a14ec5e27ea8b799e57941
parent1e93c0c5fb2e690b8253f2ba21ec13b86e1fd7c3
Refactor management of namespaces in the L3 Agent

Creates classes representing the 3 types of namespaces handled by the L3 agent:
router, snat and fip.

The scope of this change is:

- Creation and deletion methods are provided for each namespace class
- Creation and deletion of router and snat namespaces are moved to the router
  classes. These namespaces are now members of the corresponding router class
- Invocation of Fip namespace creation and deletion is left in the agent, since
  the agent owns it
- A context manager is provided to move the namespaces (router and snat)
  cleanup code out of the agent

A follow up patchset will add methods to create and delete interfaces in the
namespaces. These methods are intended to be used by the router classes

Change-Id: I54b14e593ded6b2990d57a3ae9d598a699ae133e
Partially-Implements: bp restructure-l3-agent
18 files changed:
neutron/agent/l3/agent.py
neutron/agent/l3/dvr.py
neutron/agent/l3/dvr_fip_ns.py
neutron/agent/l3/dvr_router.py
neutron/agent/l3/dvr_snat_ns.py [new file with mode: 0644]
neutron/agent/l3/namespace_manager.py [new file with mode: 0644]
neutron/agent/l3/namespaces.py [new file with mode: 0644]
neutron/agent/l3/router_info.py
neutron/common/exceptions.py
neutron/tests/common/agents/l3_agent.py [deleted file]
neutron/tests/functional/agent/test_l3_agent.py
neutron/tests/unit/agent/l3/test_dvr_router.py
neutron/tests/unit/agent/l3/test_ha_router.py
neutron/tests/unit/agent/l3/test_l3_router.py
neutron/tests/unit/agent/l3/test_legacy_router.py
neutron/tests/unit/agent/l3/test_router_info.py
neutron/tests/unit/agent/test_dvr_fip_ns.py
neutron/tests/unit/test_l3_agent.py