Fix bridge-domain and L2 of (sub-)interface ordering 85/3885/1
authorMarek Gradzki <[email protected]>
Sun, 20 Nov 2016 21:33:16 +0000 (22:33 +0100)
committerMarek Gradzki <[email protected]>
Mon, 21 Nov 2016 07:16:31 +0000 (08:16 +0100)
BD creation should go before L2 creation.

Change-Id: I155234a6d8babbf419b661db9a2fb948ada113bd
Signed-off-by: Marek Gradzki <[email protected]>
v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/VppHoneycombWriterFactory.java

index 0f836d6..3629fbc 100644 (file)
@@ -57,10 +57,13 @@ public final class VppHoneycombWriterFactory implements WriterFactory {
     public void init(final ModifiableWriterRegistryBuilder registry) {
         // Vpp has no handlers
         //  BridgeDomains has no handlers
-        //   BridgeDomain =
+        //   BridgeDomain(handled before L2 of ifc and subifc) =
         final InstanceIdentifier<BridgeDomain> bdId =
-                InstanceIdentifier.create(Vpp.class).child(BridgeDomains.class).child(BridgeDomain.class);
-        registry.add(new GenericListWriter<>(bdId, new BridgeDomainCustomizer(jvpp, bdContext)));
+            InstanceIdentifier.create(Vpp.class).child(BridgeDomains.class).child(BridgeDomain.class);
+        registry.addBefore(new GenericListWriter<>(bdId, new BridgeDomainCustomizer(jvpp, bdContext)),
+            Sets.newHashSet(
+                L2_ID,
+                SubinterfaceAugmentationWriterFactory.L2_ID));
         //    L2FibTable has no handlers
         //     L2FibEntry(handled after BridgeDomain and L2 of ifc and subifc) =
         final InstanceIdentifier<L2FibEntry> l2FibEntryId = bdId.child(L2FibTable.class).child(L2FibEntry.class);