summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Srnicek <jsrnicek@cisco.com>2017-10-11 11:38:06 +0200
committerJan Srnicek <jsrnicek@cisco.com>2017-10-12 13:16:26 +0000
commitde2390b07e0ba53a21a7d25f9f6455a8b6b33eac (patch)
tree5f7c73bd663ec5e88c073f5bea726809f82759de
parent36394d37e1e6585c063eeb57e0091cb46a46b1aa (diff)
HC2VPP-245 - Local mapping vs Locator set ordering
LocalMapping must be writen after/deleted before Locator set, as it has reference to it Change-Id: I8a7299d25e0fb5c2ffb83a34f478d82b2edfa749 Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/factory/EidTableWriterFactory.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/factory/EidTableWriterFactory.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/factory/EidTableWriterFactory.java
index 1e0758eec..9be3b60ea 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/factory/EidTableWriterFactory.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/factory/EidTableWriterFactory.java
@@ -16,6 +16,8 @@
package io.fd.hc2vpp.lisp.translate.write.factory;
+import static io.fd.hc2vpp.lisp.translate.write.factory.LocatorSetWriterFactory.LOCATOR_SET_ID;
+
import com.google.common.collect.ImmutableSet;
import io.fd.hc2vpp.lisp.translate.AbstractLispInfraFactoryBase;
import io.fd.hc2vpp.lisp.translate.write.AdjacencyCustomizer;
@@ -84,15 +86,16 @@ public final class EidTableWriterFactory extends AbstractLispInfraFactoryBase im
private void addLocalMappingSubtree(final ModifiableWriterRegistryBuilder registry) {
final InstanceIdentifier<LocalMapping> localMappingSubtreeId = InstanceIdentifier.create(LocalMapping.class);
+ // LocalMapping must be writen after/deleted before Locator set, as it has reference to it
final ImmutableSet<InstanceIdentifier<?>> localMappingHandledChildren =
ImmutableSet.of(localMappingSubtreeId.child(Eid.class), localMappingSubtreeId.child(HmacKey.class));
- registry.subtreeAdd(localMappingHandledChildren,
+ registry.subtreeAddAfter(localMappingHandledChildren,
new GenericListWriter<>(VRF_SUBTABLE_ID.child(LocalMappings.class).child(LocalMapping.class),
- new LocalMappingCustomizer(vppApi, localMappingContext)));
+ new LocalMappingCustomizer(vppApi, localMappingContext)), LOCATOR_SET_ID);
- registry.subtreeAdd(localMappingHandledChildren,
+ registry.subtreeAddAfter(localMappingHandledChildren,
new GenericListWriter<>(BRIDGE_DOMAIN_SUBTABLE_ID.child(LocalMappings.class).child(LocalMapping.class),
- new LocalMappingCustomizer(vppApi, localMappingContext)));
+ new LocalMappingCustomizer(vppApi, localMappingContext)), LOCATOR_SET_ID);
}
/**