L3 API support for NVP Plugin
The aim of this blueprint is to implement support for the L3 API extension in the Nicira NVP Plugin.
The use cases for this blueprint are exactly the same as those for using L3 API support, implemented for the plugins such as Open vSwitch and Linux Bridge since the Folsom release. There is no use case specific to the NVP Plugin.
Implementation of this blueprint is particularly important since the L3 APIs will become part of the core Quantum API in the Grizzly release.
The implementation will be performed using the same approach as the other plugins, ie: the core plugin will be augmented adding quantum.db.l3_db.l3_Nat_Db_Mixin to the list of ancestor classes for the NVP Plugin.
Even if splitting between L2 and L3 plugins will be allowed, according to https://blueprints.launchpad.net/quantum/+spec/quantum-l3-routing-plugin, we believe that it should and it will still be possible for the same plugins to provide functions for both API subsets. For this reasons we are keeping the 'mixin' approach as it seems more reasonable for this purpose.
The Nicira plugin will perform the mapping between quantum routers, floating IPs using the NVP API. This will result in the creation of the following objects:
- For each Quantum router, a NVP logical router with a single logical router port configured with a special 'Layer3 Gateway' attachment.
- For each interface attached to a router, a NVP logical router port connected to the corresponding port on a logical switch (This port won't be visible anywhere in Quantum)
- The external gateway port IP, and the default gateway of the external network's subnets will also be configured on the NVP logical router
- For each Quantum Floating IP a pair of SNAT/DNAT rules configured on the NVP logical rotuers
Data Model Changes
A single configuration variable will be added to /etc/plugins/nicira/nvp.ini:
UUID of the default layer 3 gateway service to use for this cluster. This is an optional value, but should be filled if planning to use logical routers with external gateways
default_l3_gw_service_uuid = <nvp_gateway_service_uuid>
This is a cluster-level variable and should be inserted in [CLUSTER:<cluster_name>] sections.
NVP specific unit tests for validating code in the plugin will be added to the test_nicira_plugin module.