neutron/neutron/services/l3_router
Kevin Benton 5e674bf738 Eliminate DVR inheritance of router create/update_db
This patch eliminates the following methods in L3 DVR DB
and converts the necessary logic into callbacks:

* _create_router_db
* _update_router_db

There should be no functional difference between the two.
However, this will get us closer to completely eliminating
the inheritance approach for the DVR DB and we can then move
all DVR specific logic into its service provider driver.

This patch had to fix some of the L3HA unit tests that
were instantiating both the regular L3 service plugin as
well as a custom test plugin for L3 operations.

Additionally, to ensure correct ordering of the flag
setting for 'distributed' and the verification of
user-provided flags by the L3 flavor framework, the
L3 flavor framework now subscribed to a BEFORE_CREATE
event that provides the API request before it's mutated
by the DVR code.

Change-Id: I5d4752bf0f8be412af8924d8209bb5fa6d94f40d
2016-12-02 14:29:43 -05:00
..
service_providers Eliminate DVR inheritance of router create/update_db 2016-12-02 14:29:43 -05:00
README Adopt neutron-lib plugin directory 2016-11-23 04:45:33 -07:00
__init__.py Empty files should not contain copyright or license 2014-10-20 00:50:32 +00:00
l3_router_plugin.py Relocate L3 DB Models 2016-09-27 16:58:55 +00:00

README

This service plugin implements the L3 routing functionality (resources router
and floatingip) that in earlier releases before Havana was provided by core
plugins (openvswitch, linuxbridge, ... etc).

Core plugins can now choose not to implement L3 routing functionality and
instead delegate that to the L3 routing service plugin.

The required changes to a core plugin are in that case:
- Do not inherit 'l3_db.L3_NAT_db_mixin' (or its descendants like extraroute)
  anymore.
- Remove "router" from 'supported_extension_aliases'.
- Modify any 'self' references to members in L3_NAT_db_mixin to instead use
  'directory.get_plugin(constants.L3)'
  For example,
     self.prevent_l3_port_deletion(...)
  becomes something like
     plugin = directory.get_plugin(constants.L3)
     if plugin:
         plugin.prevent_l3_port_deletion(...)

If the core plugin has relied on the L3Agent the following must also be changed:
- Do not inherit 'l3_rpc_base.L3RpcCallbackMixin' in any '*RpcCallbacks' class.
- Do not be a consumer of the topics.L3PLUGIN topic for RPC.

To use the L3 routing service plugin, add
'neutron.services.l3_router.l3_router_plugin.L3RouterPlugin'
to 'service_plugins' in '/etc/neutron/neutron.conf'.
That is,
service_plugins = neutron.services.l3_router.l3_router_plugin.L3RouterPlugin