summaryrefslogtreecommitdiffstats
path: root/lisp
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:47 +0000
commit4d75bfbebc2c5addf1be8f04027a07f14ca853cd (patch)
tree6054cecf5196d97fe463110bfeb9eef736970647 /lisp
parent50d5c2e2649ff07e2ff803d29fd0f9d62d851d8d (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>
Diffstat (limited to 'lisp')
-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);
}
/**