]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Create DvrRouter and HaRouter as a sub-class of Router
authorCarl Baldwin <carl.baldwin@hp.com>
Mon, 22 Dec 2014 21:01:45 +0000 (21:01 +0000)
committerCarl Baldwin <carl.baldwin@hp.com>
Sat, 17 Jan 2015 18:23:36 +0000 (18:23 +0000)
commit522695e9cd959f79a5fab003941cf52aa618821d
tree989f8d4888efc92aca2e791881fdc9eb5d5b822d
parent6e5762be5b3324f1cf0e52f2680455d760bcc3ea
Create DvrRouter and HaRouter as a sub-class of Router

This commit creates them as simple sub-classes and instantiates them
when appropriate.  It also moves the basic mixin classes from
RouterInfo.  Since all of the properties and attributes from these
mixins are only used in the ha or dvr contexts, this is safe.  Future
refactoring will further tease things out until they are properly
encapsulated.

They inherit everything else from their base class so that they all
still share the same code.  Creating them up front provides a place
for dvr and ha specific logic to land as methods are moved from the L3
agent and mixins to the new router classes.  Eventually, all of the
specific logic will be teased in to the specific classes.

Change-Id: I8c485e74ae06b10fd284797359bc6d1115361713
Partially-Implements: blueprint restructure-l3-agent
neutron/agent/l3/agent.py
neutron/agent/l3/dvr.py
neutron/agent/l3/dvr_router.py [new file with mode: 0644]
neutron/agent/l3/ha.py
neutron/agent/l3/ha_router.py [new file with mode: 0644]
neutron/agent/l3/legacy_router.py [new file with mode: 0644]
neutron/agent/l3/router_info.py
neutron/common/exceptions.py
neutron/tests/unit/test_l3_agent.py