HONEYCOMB-222 Fix Interface L2 writer order
authorMaros Marsalek <[email protected]>
Tue, 20 Sep 2016 13:53:57 +0000 (15:53 +0200)
committerMaros Marsalek <[email protected]>
Tue, 20 Sep 2016 13:59:07 +0000 (13:59 +0000)
The writer was placed between Interface and Subitnerface,
so it was invoked before subinterfaces were processed.

Meaning that if the L2/xconnect targetted subitnerface, it
would be submitted prematurely.

Moving the Interface L2 writer after Subinterface writer.

Change-Id: I192ebde5eaf4b05a104d76bce39de74569cdb608
Signed-off-by: Maros Marsalek <[email protected]>
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesWriterFactory.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/Readme.adoc

index 97f21fb..39e328a 100644 (file)
@@ -171,9 +171,9 @@ public final class InterfacesWriterFactory implements WriterFactory {
         registry.addAfter(
                 new GenericWriter<>(VPP_IFC_AUG_ID.child(Routing.class), new RoutingCustomizer(jvpp, ifcNamingContext)),
                 specificIfcTypes);
-        // Routing(Execute only after specific interface customizers) =
+        // L2(Execute only after subinterface (and all other ifc types) =
         registry.addAfter(new GenericWriter<>(L2_ID, new L2Customizer(jvpp, ifcNamingContext, bdNamingContext)),
-                specificIfcTypes);
+                SubinterfaceAugmentationWriterFactory.SUB_IFC_ID);
         // Proxy Arp (execute after specific interface customizers)
         registry.addAfter(
                 new GenericWriter<>(VPP_IFC_AUG_ID.child(ProxyArp.class), new ProxyArpCustomizer(jvpp, ifcNamingContext)),
index 57800d2..a95c397 100644 (file)
@@ -10,9 +10,9 @@ Current order of v3po-api writers is:
 . Tap
 . Vxlan
 . Interface
-. L2
 . SubInterface
 . L2
+. SubInterface-L2
 . Ethernet
 . Routing
 . ClassifyTable