FIP support for Octavia VIPs 81/75281/16
authorJosh <jhershbe@redhat.com>
Fri, 17 Aug 2018 22:20:29 +0000 (15:20 -0700)
committerSam Hague <shague@redhat.com>
Sun, 23 Sep 2018 12:02:29 +0000 (12:02 +0000)
commit85a0391d26963d4abfacb00ef3f285efaf6f2029
tree94ee7a556b521b5e67dfac2d20d4610d4f2657a6
parentadc3d69c7f1438f73668c672b50b121a60b52d04
FIP support for Octavia VIPs

This patch resolves the issue documented in the Jira
issue referenced below.

The basic solution is to use the OF packet-in event to
learn the dpn where the NAT flows need to be programmed.

Overview of code changes:
1. Refactor NatInterfaceStateChangeListener into two classes:
 - NatInterfaceStateChangeListener which just receives events
 - NatSouthboundEventHandlers which contains the logic invoked
   for when an interface state changes (or a garp is received)
2. Implementation of NatArpNotificationHandler which receives
   the garps and invokes the correct methods in
   NatSouthboundEventHandlers
3. neutron-vip-state yang model which is used together with
   VipStateTracker (DataObjectCache) to manage state of the
   discovered VIPs. This is required in cases where the
   associated Ocatavia Amphora VM changes to a different
   compute node. In this case the existing flows must be
   removed from the odl compute node.
4. Tweak VIP learning code to accept neutron ports that are
   owned by "Octavia", previously the code assumed no neutron
   port ever needed to be learned.

Jira: NETVIRT-1402

Change-Id: I7867124f3cbbe88d1ce6d075e51e2b11f941aec2
Signed-off-by: Josh <jhershbe@redhat.com>
natservice/api/src/main/yang/odl-nat.yang
natservice/impl/src/main/java/org/opendaylight/netvirt/natservice/internal/FloatingIPListener.java
natservice/impl/src/main/java/org/opendaylight/netvirt/natservice/internal/NatArpNotificationHandler.java [new file with mode: 0644]
natservice/impl/src/main/java/org/opendaylight/netvirt/natservice/internal/NatInterfaceStateChangeListener.java
natservice/impl/src/main/java/org/opendaylight/netvirt/natservice/internal/NatSouthboundEventHandlers.java [new file with mode: 0644]
natservice/impl/src/main/java/org/opendaylight/netvirt/natservice/internal/VipStateTracker.java [new file with mode: 0644]
natservice/impl/src/main/resources/org/opendaylight/blueprint/natservice.xml
vpnmanager/impl/src/main/java/org/opendaylight/netvirt/vpnmanager/iplearn/AbstractIpLearnNotificationHandler.java
vpnmanager/impl/src/main/java/org/opendaylight/netvirt/vpnmanager/iplearn/ipv4/ArpNotificationHandler.java
vpnmanager/impl/src/main/java/org/opendaylight/netvirt/vpnmanager/iplearn/ipv6/Ipv6NaNotificationHandler.java