summaryrefslogtreecommitdiffstats
path: root/lisp/lisp2vpp/src/main/java
diff options
context:
space:
mode:
authorJan Srnicek <jsrnicek@cisco.com>2017-04-24 09:39:59 +0200
committerMarek Gradzki <mgradzki@cisco.com>2017-04-24 08:07:47 +0000
commit470588683af86c9ab73538ced85e1d88f55e3b70 (patch)
tree127211cd95071b425ec5e4836cccf7f45e70fe6c /lisp/lisp2vpp/src/main/java
parente4139584aaf94df71a4ddb5e5a0dded1a80c249d (diff)
HC2VPP-124 - Post lisp apis to one***
All apis starting with prefix lisp*** will be abandoned, so refactoring to one*** variants Change-Id: I603b3ce54ef1f8b6cefaaccedb87ccbf3ea38dd0 Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
Diffstat (limited to 'lisp/lisp2vpp/src/main/java')
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/AdjacencyCustomizer.java43
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/BridgeDomainSubtableCustomizer.java31
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/InterfaceCustomizer.java39
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/ItrRemoteLocatorSetCustomizer.java14
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LispStateCustomizer.java22
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocalMappingCustomizer.java45
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocatorSetCustomizer.java24
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapRegisterCustomizer.java8
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapRequestModeCustomizer.java8
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapResolverCustomizer.java28
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapServerCustomizer.java26
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/PetrCfgCustomizer.java6
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/PitrCfgCustomizer.java10
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/RemoteMappingCustomizer.java44
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/RlocProbeCustomizer.java8
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VniTableCustomizer.java30
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VrfSubtableCustomizer.java28
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/trait/LocatorReader.java12
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/trait/LocatorSetReader.java12
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/trait/MappingReader.java26
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/trait/SubtableReader.java14
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/service/LispStateCheckServiceImpl.java14
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/AdjacencyCustomizer.java12
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/InterfaceCustomizer.java12
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/ItrRemoteLocatorSetCustomizer.java6
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/LispCustomizer.java24
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/LocalMappingCustomizer.java6
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/LocatorSetCustomizer.java6
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/MapRegisterCustomizer.java6
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/MapRequestModeCustomizer.java10
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/MapResolverCustomizer.java6
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/MapServerCustomizer.java6
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/PetrCfgCustomizer.java10
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/PitrCfgCustomizer.java6
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/RemoteMappingCustomizer.java35
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/RlocProbeCustomizer.java6
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/VniTableCustomizer.java4
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/trait/SubtableWriter.java10
38 files changed, 325 insertions, 332 deletions
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/AdjacencyCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/AdjacencyCustomizer.java
index 03f8a2f9a..72ed941f5 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/AdjacencyCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/AdjacencyCustomizer.java
@@ -17,6 +17,8 @@
package io.fd.hc2vpp.lisp.translate.read;
+import static com.google.common.base.Preconditions.checkNotNull;
+
import com.google.common.base.Optional;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
@@ -33,10 +35,16 @@ import io.fd.honeycomb.translate.spi.read.InitializingListReaderCustomizer;
import io.fd.honeycomb.translate.util.RWUtils;
import io.fd.honeycomb.translate.util.read.cache.DumpCacheManager;
import io.fd.honeycomb.translate.util.read.cache.EntityDumpExecutor;
-import io.fd.vpp.jvpp.core.dto.LispAdjacenciesGet;
-import io.fd.vpp.jvpp.core.dto.LispAdjacenciesGetReply;
+import io.fd.vpp.jvpp.core.dto.OneAdjacenciesGet;
+import io.fd.vpp.jvpp.core.dto.OneAdjacenciesGetReply;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
-import io.fd.vpp.jvpp.core.types.LispAdjacency;
+import io.fd.vpp.jvpp.core.types.OneAdjacency;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.adjacencies.identification.context.rev160801.adjacencies.identification.context.attributes.adjacencies.identification.contexts.adjacencies.identification.mappings.mapping.EidIdentificatorPair;
import org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.adjacencies.identification.context.rev160801.adjacencies.identification.context.attributes.adjacencies.identification.contexts.adjacencies.identification.mappings.mapping.EidIdentificatorPairBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.MappingId;
@@ -51,20 +59,11 @@ import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier;
-import javax.annotation.Nonnull;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import java.util.Objects;
-import java.util.stream.Collectors;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
public class AdjacencyCustomizer extends FutureJVppCustomizer
implements InitializingListReaderCustomizer<Adjacency, AdjacencyKey, AdjacencyBuilder>, JvppReplyConsumer,
EidTranslator, LispInitPathsMapper {
- private final DumpCacheManager<LispAdjacenciesGetReply, AdjacencyDumpParams> dumpCacheManager;
+ private final DumpCacheManager<OneAdjacenciesGetReply, AdjacencyDumpParams> dumpCacheManager;
private final AdjacenciesMappingContext adjacenciesMappingContext;
private final EidPairProducer eidPairProducer;
@@ -74,9 +73,9 @@ public class AdjacencyCustomizer extends FutureJVppCustomizer
@Nonnull final EidMappingContext remoteMappingContext,
@Nonnull final AdjacenciesMappingContext adjacenciesMappingContext) {
super(futureJvpp);
- dumpCacheManager = new DumpCacheManager.DumpCacheManagerBuilder<LispAdjacenciesGetReply, AdjacencyDumpParams>()
+ dumpCacheManager = new DumpCacheManager.DumpCacheManagerBuilder<OneAdjacenciesGetReply, AdjacencyDumpParams>()
.withExecutor(createExecutor())
- .acceptOnly(LispAdjacenciesGetReply.class)
+ .acceptOnly(OneAdjacenciesGetReply.class)
.build();
this.adjacenciesMappingContext =
@@ -91,7 +90,7 @@ public class AdjacencyCustomizer extends FutureJVppCustomizer
final int vni = id.firstKeyOf(VniTable.class).getVirtualNetworkIdentifier().intValue();
- final Optional<LispAdjacenciesGetReply> optionalDump =
+ final Optional<OneAdjacenciesGetReply> optionalDump =
dumpCacheManager.getDump(id, context.getModificationCache(), new AdjacencyDumpParams(vni));
@@ -127,7 +126,7 @@ public class AdjacencyCustomizer extends FutureJVppCustomizer
final int vni = id.firstKeyOf(VniTable.class).getVirtualNetworkIdentifier().intValue();
- final Optional<LispAdjacenciesGetReply> optionalDump = dumpCacheManager
+ final Optional<OneAdjacenciesGetReply> optionalDump = dumpCacheManager
.getDump(id, ctx.getModificationCache(), new AdjacencyDumpParams(vni));
if (!optionalDump.isPresent() || optionalDump.get().adjacencies.length == 0) {
@@ -138,7 +137,7 @@ public class AdjacencyCustomizer extends FutureJVppCustomizer
final EidIdentificatorPair currentAdjacencyIdentificationPair =
adjacenciesMappingContext.getEidPair(currentAdjacencyId, ctx.getMappingContext());
- final LispAdjacency currentAdjacency = Arrays.stream(optionalDump.get().adjacencies)
+ final OneAdjacency currentAdjacency = Arrays.stream(optionalDump.get().adjacencies)
.filter(lispAdjacency -> Objects.equals(currentAdjacencyIdentificationPair,
eidPairProducer.createPair(lispAdjacency, vni, ctx.getMappingContext())))
.collect(RWUtils.singleItemCollector());
@@ -151,14 +150,14 @@ public class AdjacencyCustomizer extends FutureJVppCustomizer
MappingsDumpParams.EidType.valueOf(currentAdjacency.eidType), currentAdjacency.reid, vni));
}
- private EntityDumpExecutor<LispAdjacenciesGetReply, AdjacencyDumpParams> createExecutor() {
+ private EntityDumpExecutor<OneAdjacenciesGetReply, AdjacencyDumpParams> createExecutor() {
return (final InstanceIdentifier<?> identifier, final AdjacencyDumpParams params) -> {
checkNotNull(params, "Dump parameters cannot be null");
- final LispAdjacenciesGet request = new LispAdjacenciesGet();
+ final OneAdjacenciesGet request = new OneAdjacenciesGet();
request.vni = params.getVni();
- return getReplyForRead(getFutureJVpp().lispAdjacenciesGet(request).toCompletableFuture(), identifier);
+ return getReplyForRead(getFutureJVpp().oneAdjacenciesGet(request).toCompletableFuture(), identifier);
};
}
@@ -196,7 +195,7 @@ public class AdjacencyCustomizer extends FutureJVppCustomizer
this.remoteMappingContext = checkNotNull(remoteMappingContext, "Remote mapping context cannot be null");
}
- EidIdentificatorPair createPair(final LispAdjacency data, final int vni,
+ EidIdentificatorPair createPair(final OneAdjacency data, final int vni,
final MappingContext mappingContext) {
return new EidIdentificatorPairBuilder()
.setLocalEidId(new MappingId(localMappingContext.getId(getArrayAsEidLocal(
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/BridgeDomainSubtableCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/BridgeDomainSubtableCustomizer.java
index 198d21fa6..cccf4f928 100644
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/BridgeDomainSubtableCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/BridgeDomainSubtableCustomizer.java
@@ -16,6 +16,8 @@
package io.fd.hc2vpp.lisp.translate.read;
+import static com.google.common.base.Preconditions.checkNotNull;
+
import com.google.common.base.Optional;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
import io.fd.hc2vpp.common.translate.util.NamingContext;
@@ -28,9 +30,12 @@ import io.fd.honeycomb.translate.spi.read.Initialized;
import io.fd.honeycomb.translate.spi.read.InitializingReaderCustomizer;
import io.fd.honeycomb.translate.util.read.cache.DumpCacheManager;
import io.fd.honeycomb.translate.util.read.cache.DumpCacheManager.DumpCacheManagerBuilder;
-import io.fd.vpp.jvpp.core.dto.LispEidTableMapDetails;
-import io.fd.vpp.jvpp.core.dto.LispEidTableMapDetailsReplyDump;
+import io.fd.vpp.jvpp.core.dto.OneEidTableMapDetails;
+import io.fd.vpp.jvpp.core.dto.OneEidTableMapDetailsReplyDump;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
+import java.util.List;
+import java.util.stream.Collectors;
+import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.eid.table.grouping.eid.table.VniTable;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.eid.table.grouping.eid.table.VniTableBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.eid.table.grouping.eid.table.vni.table.BridgeDomainSubtable;
@@ -41,18 +46,12 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.annotation.Nonnull;
-import java.util.List;
-import java.util.stream.Collectors;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
public class BridgeDomainSubtableCustomizer extends FutureJVppCustomizer implements
InitializingReaderCustomizer<BridgeDomainSubtable, BridgeDomainSubtableBuilder>, SubtableReader, LispInitPathsMapper {
private static final Logger LOG = LoggerFactory.getLogger(BridgeDomainSubtableCustomizer.class);
- private final DumpCacheManager<LispEidTableMapDetailsReplyDump, SubtableDumpParams>
+ private final DumpCacheManager<OneEidTableMapDetailsReplyDump, SubtableDumpParams>
dumpManager;
private final NamingContext bridgeDomainContext;
@@ -60,9 +59,9 @@ public class BridgeDomainSubtableCustomizer extends FutureJVppCustomizer impleme
@Nonnull final NamingContext bridgeDomainContext) {
super(futureJvppCore);
dumpManager =
- new DumpCacheManagerBuilder<LispEidTableMapDetailsReplyDump, SubtableDumpParams>()
+ new DumpCacheManagerBuilder<OneEidTableMapDetailsReplyDump, SubtableDumpParams>()
.withExecutor(createExecutor(futureJvppCore))
- .acceptOnly(LispEidTableMapDetailsReplyDump.class)
+ .acceptOnly(OneEidTableMapDetailsReplyDump.class)
.build();
this.bridgeDomainContext = checkNotNull(bridgeDomainContext, "Bridge domain context cannot be null");
}
@@ -81,20 +80,20 @@ public class BridgeDomainSubtableCustomizer extends FutureJVppCustomizer impleme
.getVirtualNetworkIdentifier().intValue();
LOG.debug("Read attributes for id {}", id);
//dumps only L2(bridge domains)
- final Optional<LispEidTableMapDetailsReplyDump> reply =
+ final Optional<OneEidTableMapDetailsReplyDump> reply =
dumpManager.getDump(id, ctx.getModificationCache(), L2_PARAMS);
- if (!reply.isPresent() || reply.get().lispEidTableMapDetails.isEmpty()) {
+ if (!reply.isPresent() || reply.get().oneEidTableMapDetails.isEmpty()) {
return;
}
// Single item collector cant be used in this case,because bridge-domain-subtable is container
// so read is invoked every time parent is defined
- final List<LispEidTableMapDetails>
- details = reply.get().lispEidTableMapDetails.stream().filter(a -> a.vni == vni)
+ final List<OneEidTableMapDetails>
+ details = reply.get().oneEidTableMapDetails.stream().filter(a -> a.vni == vni)
.collect(Collectors.toList());
if (details.size() == 1) {
- final LispEidTableMapDetails detail = details.get(0);
+ final OneEidTableMapDetails detail = details.get(0);
builder.setBridgeDomainRef(bridgeDomainContext.getName(detail.dpTable, ctx.getMappingContext()));
LOG.debug("Attributes for {} successfully loaded", id);
}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/InterfaceCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/InterfaceCustomizer.java
index 7baf92a2b..5b0f4eccc 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/InterfaceCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/InterfaceCustomizer.java
@@ -17,6 +17,9 @@
package io.fd.hc2vpp.lisp.translate.read;
+import static com.google.common.base.Preconditions.checkNotNull;
+import static com.google.common.base.Preconditions.checkState;
+
import com.google.common.base.Optional;
import com.google.common.collect.ImmutableSet;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
@@ -32,9 +35,13 @@ import io.fd.honeycomb.translate.spi.read.InitializingListReaderCustomizer;
import io.fd.honeycomb.translate.util.RWUtils;
import io.fd.honeycomb.translate.util.read.cache.DumpCacheManager;
import io.fd.honeycomb.translate.util.read.cache.TypeAwareIdentifierCacheKeyFactory;
-import io.fd.vpp.jvpp.core.dto.LispLocatorDetails;
-import io.fd.vpp.jvpp.core.dto.LispLocatorDetailsReplyDump;
+import io.fd.vpp.jvpp.core.dto.OneLocatorDetails;
+import io.fd.vpp.jvpp.core.dto.OneLocatorDetailsReplyDump;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.locator.sets.grouping.locator.sets.LocatorSet;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.locator.sets.grouping.locator.sets.LocatorSetBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.locator.sets.grouping.locator.sets.locator.set.Interface;
@@ -45,14 +52,6 @@ import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier;
-import javax.annotation.Nonnull;
-import java.util.Collections;
-import java.util.List;
-import java.util.stream.Collectors;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-import static com.google.common.base.Preconditions.checkState;
-
/**
* Customizer for reading {@code Interface}<br> Currently not supported by jvpp
@@ -63,7 +62,7 @@ public class InterfaceCustomizer
private final NamingContext interfaceContext;
private final NamingContext locatorSetContext;
- private final DumpCacheManager<LispLocatorDetailsReplyDump, LocatorDumpParams> dumpCacheManager;
+ private final DumpCacheManager<OneLocatorDetailsReplyDump, LocatorDumpParams> dumpCacheManager;
public InterfaceCustomizer(@Nonnull final FutureJVppCore futureJvpp, @Nonnull final NamingContext interfaceContext,
@Nonnull final NamingContext locatorSetContext) {
@@ -71,10 +70,10 @@ public class InterfaceCustomizer
this.interfaceContext = checkNotNull(interfaceContext, "Interface context cannot be null");
this.locatorSetContext = checkNotNull(locatorSetContext, "Locator set context cannot be null");
this.dumpCacheManager =
- new DumpCacheManager.DumpCacheManagerBuilder<LispLocatorDetailsReplyDump, LocatorDumpParams>()
+ new DumpCacheManager.DumpCacheManagerBuilder<OneLocatorDetailsReplyDump, LocatorDumpParams>()
.withExecutor(createLocatorDumpExecutor(futureJvpp))
// must be cached per locator set
- .withCacheKeyFactory(new TypeAwareIdentifierCacheKeyFactory(LispLocatorDetailsReplyDump.class, ImmutableSet.of(LocatorSet.class)))
+ .withCacheKeyFactory(new TypeAwareIdentifierCacheKeyFactory(OneLocatorDetailsReplyDump.class, ImmutableSet.of(LocatorSet.class)))
.build();
}
@@ -102,15 +101,15 @@ public class InterfaceCustomizer
final LocatorDumpParams params =
new LocatorDumpParamsBuilder().setLocatorSetIndex(locatorSetIndexIndex).build();
- final Optional<LispLocatorDetailsReplyDump> reply =
+ final Optional<OneLocatorDetailsReplyDump> reply =
dumpCacheManager.getDump(id, ctx.getModificationCache(), params);
- if (!reply.isPresent() || reply.get().lispLocatorDetails.isEmpty()) {
+ if (!reply.isPresent() || reply.get().oneLocatorDetails.isEmpty()) {
return;
}
- final LispLocatorDetails details = reply.get()
- .lispLocatorDetails
+ final OneLocatorDetails details = reply.get()
+ .oneLocatorDetails
.stream()
.filter(a -> a.swIfIndex == referencedInterfaceIndex)
.collect(RWUtils.singleItemCollector());
@@ -134,15 +133,15 @@ public class InterfaceCustomizer
final LocatorDumpParams params = new LocatorDumpParamsBuilder()
.setLocatorSetIndex(locatorSetContext.getIndex(name, context.getMappingContext())).build();
- final Optional<LispLocatorDetailsReplyDump> reply =
+ final Optional<OneLocatorDetailsReplyDump> reply =
dumpCacheManager.getDump(id, context.getModificationCache(), params);
- if (!reply.isPresent() || reply.get().lispLocatorDetails.isEmpty()) {
+ if (!reply.isPresent() || reply.get().oneLocatorDetails.isEmpty()) {
return Collections.emptyList();
}
return reply.get()
- .lispLocatorDetails
+ .oneLocatorDetails
.stream()
.map(a -> new InterfaceKey(interfaceContext.getName(a.swIfIndex, context.getMappingContext())))
.collect(Collectors.toList());
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/ItrRemoteLocatorSetCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/ItrRemoteLocatorSetCustomizer.java
index 5799bd9c3..982d191f6 100644
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/ItrRemoteLocatorSetCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/ItrRemoteLocatorSetCustomizer.java
@@ -31,8 +31,8 @@ import io.fd.honeycomb.translate.spi.read.Initialized;
import io.fd.honeycomb.translate.spi.read.InitializingReaderCustomizer;
import io.fd.honeycomb.translate.util.read.cache.DumpCacheManager;
import io.fd.honeycomb.translate.util.read.cache.DumpCacheManager.DumpCacheManagerBuilder;
-import io.fd.vpp.jvpp.core.dto.LispGetMapRequestItrRlocs;
-import io.fd.vpp.jvpp.core.dto.LispGetMapRequestItrRlocsReply;
+import io.fd.vpp.jvpp.core.dto.OneGetMapRequestItrRlocs;
+import io.fd.vpp.jvpp.core.dto.OneGetMapRequestItrRlocsReply;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.itr.remote.locator.sets.grouping.ItrRemoteLocatorSet;
@@ -50,16 +50,16 @@ public class ItrRemoteLocatorSetCustomizer extends CheckedLispCustomizer
private static final Logger LOG = LoggerFactory.getLogger(ItrRemoteLocatorSetCustomizer.class);
- private final DumpCacheManager<LispGetMapRequestItrRlocsReply, Void> dumpCacheManager;
+ private final DumpCacheManager<OneGetMapRequestItrRlocsReply, Void> dumpCacheManager;
public ItrRemoteLocatorSetCustomizer(@Nonnull final FutureJVppCore futureJVppCore,
@Nonnull final LispStateCheckService lispStateCheckService) {
super(futureJVppCore, lispStateCheckService);
- dumpCacheManager = new DumpCacheManagerBuilder<LispGetMapRequestItrRlocsReply, Void>()
+ dumpCacheManager = new DumpCacheManagerBuilder<OneGetMapRequestItrRlocsReply, Void>()
.withExecutor(((identifier, params) -> getReplyForRead(
- futureJVppCore.lispGetMapRequestItrRlocs(new LispGetMapRequestItrRlocs()).toCompletableFuture(),
+ futureJVppCore.oneGetMapRequestItrRlocs(new OneGetMapRequestItrRlocs()).toCompletableFuture(),
identifier)))
- .acceptOnly(LispGetMapRequestItrRlocsReply.class)
+ .acceptOnly(OneGetMapRequestItrRlocsReply.class)
.build();
}
@@ -79,7 +79,7 @@ public class ItrRemoteLocatorSetCustomizer extends CheckedLispCustomizer
return;
}
- final Optional<LispGetMapRequestItrRlocsReply> reply =
+ final Optional<OneGetMapRequestItrRlocsReply> reply =
dumpCacheManager.getDump(id, ctx.getModificationCache(), NO_PARAMS);
if (!reply.isPresent() || reply.get().locatorSetName == null) {
return;
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LispStateCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LispStateCustomizer.java
index 336accc0c..403937bbb 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LispStateCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LispStateCustomizer.java
@@ -31,9 +31,9 @@ import io.fd.honeycomb.translate.spi.read.Initialized;
import io.fd.honeycomb.translate.spi.read.InitializingReaderCustomizer;
import io.fd.honeycomb.translate.util.read.cache.DumpCacheManager;
import io.fd.vpp.jvpp.VppBaseCallException;
-import io.fd.vpp.jvpp.core.dto.LispLocatorSetDetailsReplyDump;
-import io.fd.vpp.jvpp.core.dto.ShowLispStatus;
-import io.fd.vpp.jvpp.core.dto.ShowLispStatusReply;
+import io.fd.vpp.jvpp.core.dto.OneLocatorSetDetailsReplyDump;
+import io.fd.vpp.jvpp.core.dto.ShowOneStatus;
+import io.fd.vpp.jvpp.core.dto.ShowOneStatusReply;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import java.util.concurrent.TimeoutException;
import javax.annotation.Nonnull;
@@ -58,15 +58,15 @@ public class LispStateCustomizer extends FutureJVppCustomizer
private static final Logger LOG = LoggerFactory.getLogger(LispStateCustomizer.class);
private final NamingContext locatorSetContext;
- private final DumpCacheManager<LispLocatorSetDetailsReplyDump, Void> dumpManager;
+ private final DumpCacheManager<OneLocatorSetDetailsReplyDump, Void> dumpManager;
public LispStateCustomizer(@Nonnull final FutureJVppCore futureJvpp,
@Nonnull final NamingContext locatorSetContext) {
super(futureJvpp);
this.locatorSetContext = locatorSetContext;
- this.dumpManager = new DumpCacheManager.DumpCacheManagerBuilder<LispLocatorSetDetailsReplyDump, Void>()
+ this.dumpManager = new DumpCacheManager.DumpCacheManagerBuilder<OneLocatorSetDetailsReplyDump, Void>()
.withExecutor(createExecutor(futureJvpp))
- .acceptOnly(LispLocatorSetDetailsReplyDump.class)
+ .acceptOnly(OneLocatorSetDetailsReplyDump.class)
.build();
}
@@ -79,9 +79,9 @@ public class LispStateCustomizer extends FutureJVppCustomizer
public void readCurrentAttributes(InstanceIdentifier<LispState> id, LispStateBuilder builder, ReadContext ctx)
throws ReadFailedException {
- ShowLispStatusReply reply;
+ ShowOneStatusReply reply;
try {
- reply = getReply(getFutureJVpp().showLispStatus(new ShowLispStatus()).toCompletableFuture());
+ reply = getReply(getFutureJVpp().showOneStatus(new ShowOneStatus()).toCompletableFuture());
} catch (TimeoutException | VppBaseCallException e) {
throw new ReadFailedException(id, e);
}
@@ -101,16 +101,16 @@ public class LispStateCustomizer extends FutureJVppCustomizer
/* TODO - HONEYCOMB-354 - must be done here(most upper node), because of ordering issues
In this case it will work fully, locator sets are not referenced from any outside model
*/
- final Optional<LispLocatorSetDetailsReplyDump> dumpOptional;
+ final Optional<OneLocatorSetDetailsReplyDump> dumpOptional;
try {
dumpOptional = dumpManager.getDump(id, ctx.getModificationCache(), NO_PARAMS);
} catch (ReadFailedException e) {
throw new IllegalStateException("Unable to initialize locator set context mapping", e);
}
- if (dumpOptional.isPresent() && !dumpOptional.get().lispLocatorSetDetails.isEmpty()) {
+ if (dumpOptional.isPresent() && !dumpOptional.get().oneLocatorSetDetails.isEmpty()) {
LOG.debug("Initializing locator set context for {}", dumpOptional.get());
- dumpOptional.get().lispLocatorSetDetails
+ dumpOptional.get().oneLocatorSetDetails
.forEach(set -> {
final String locatorSetName = toString(set.lsName);
//creates mapping for existing locator-set(if it is'nt already existing one)
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocalMappingCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocalMappingCustomizer.java
index 69df09c80..ff71d9c00 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocalMappingCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocalMappingCustomizer.java
@@ -16,6 +16,13 @@
package io.fd.hc2vpp.lisp.translate.read;
+import static com.google.common.base.Preconditions.checkNotNull;
+import static com.google.common.base.Preconditions.checkState;
+import static io.fd.hc2vpp.lisp.translate.read.dump.executor.params.MappingsDumpParams.EidType.valueOf;
+import static io.fd.hc2vpp.lisp.translate.read.dump.executor.params.MappingsDumpParams.FilterType;
+import static io.fd.hc2vpp.lisp.translate.read.dump.executor.params.MappingsDumpParams.MappingsDumpParamsBuilder;
+import static io.fd.hc2vpp.lisp.translate.read.dump.executor.params.MappingsDumpParams.QuantityType;
+
import com.google.common.base.Optional;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
import io.fd.hc2vpp.common.translate.util.NamingContext;
@@ -30,9 +37,13 @@ import io.fd.honeycomb.translate.spi.read.Initialized;
import io.fd.honeycomb.translate.spi.read.InitializingListReaderCustomizer;
import io.fd.honeycomb.translate.util.RWUtils;
import io.fd.honeycomb.translate.util.read.cache.DumpCacheManager;
-import io.fd.vpp.jvpp.core.dto.LispEidTableDetails;
-import io.fd.vpp.jvpp.core.dto.LispEidTableDetailsReplyDump;
+import io.fd.vpp.jvpp.core.dto.OneEidTableDetails;
+import io.fd.vpp.jvpp.core.dto.OneEidTableDetailsReplyDump;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.eid.mapping.context.rev160801.contexts.eid.mapping.context.mappings.mapping.Eid;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.Address;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.HmacKeyType;
@@ -51,16 +62,6 @@ import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.annotation.Nonnull;
-import java.util.Collections;
-import java.util.List;
-import java.util.stream.Collectors;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-import static com.google.common.base.Preconditions.checkState;
-import static io.fd.hc2vpp.lisp.translate.read.dump.executor.params.MappingsDumpParams.EidType.valueOf;
-import static io.fd.hc2vpp.lisp.translate.read.dump.executor.params.MappingsDumpParams.*;
-
/**
* Customizer for reading {@code LocalMapping}<br> Currently unsupported by jvpp
*/
@@ -71,7 +72,7 @@ public class LocalMappingCustomizer
private static final Logger LOG = LoggerFactory.getLogger(LocalMappingCustomizer.class);
- private final DumpCacheManager<LispEidTableDetailsReplyDump, MappingsDumpParams> dumpManager;
+ private final DumpCacheManager<OneEidTableDetailsReplyDump, MappingsDumpParams> dumpManager;
private final NamingContext locatorSetContext;
private final EidMappingContext localMappingContext;
@@ -81,9 +82,9 @@ public class LocalMappingCustomizer
this.locatorSetContext = checkNotNull(locatorSetContext, "Locator Set Mapping Context cannot be null");
this.localMappingContext = checkNotNull(localMappingsContext, "Local mappings context cannot be null");
this.dumpManager =
- new DumpCacheManager.DumpCacheManagerBuilder<LispEidTableDetailsReplyDump, MappingsDumpParams>()
+ new DumpCacheManager.DumpCacheManagerBuilder<OneEidTableDetailsReplyDump, MappingsDumpParams>()
.withExecutor(createMappingDumpExecutor(futureJvpp))
- .acceptOnly(LispEidTableDetailsReplyDump.class)
+ .acceptOnly(OneEidTableDetailsReplyDump.class)
.build();
}
@@ -117,14 +118,14 @@ public class LocalMappingCustomizer
.build();
LOG.debug("Dumping data for LocalMappings(id={})", id);
- final Optional<LispEidTableDetailsReplyDump> replyOptional =
+ final Optional<OneEidTableDetailsReplyDump> replyOptional =
dumpManager.getDump(id, ctx.getModificationCache(), dumpParams);
- if (!replyOptional.isPresent() || replyOptional.get().lispEidTableDetails.isEmpty()) {
+ if (!replyOptional.isPresent() || replyOptional.get().oneEidTableDetails.isEmpty()) {
return;
}
- LispEidTableDetails details = replyOptional.get().lispEidTableDetails.stream()
+ OneEidTableDetails details = replyOptional.get().oneEidTableDetails.stream()
.filter(subtableFilterForLocalMappings(id))
.filter(detail -> compareAddresses(eid.getAddress(), getAddressFromDumpDetail(detail)))
.collect(RWUtils.singleItemCollector());
@@ -147,7 +148,7 @@ public class LocalMappingCustomizer
}
}
- private Address getAddressFromDumpDetail(final LispEidTableDetails detail) {
+ private Address getAddressFromDumpDetail(final OneEidTableDetails detail) {
return getArrayAsEidLocal(valueOf(detail.eidType), detail.eid, detail.vni).getAddress();
}
@@ -172,15 +173,15 @@ public class LocalMappingCustomizer
.build();
LOG.debug("Dumping data for LocalMappings(id={})", id);
- final Optional<LispEidTableDetailsReplyDump> replyOptional =
+ final Optional<OneEidTableDetailsReplyDump> replyOptional =
dumpManager.getDump(id, context.getModificationCache(), dumpParams);
- if (!replyOptional.isPresent() || replyOptional.get().lispEidTableDetails.isEmpty()) {
+ if (!replyOptional.isPresent() || replyOptional.get().oneEidTableDetails.isEmpty()) {
return Collections.emptyList();
}
- return replyOptional.get().lispEidTableDetails.stream()
+ return replyOptional.get().oneEidTableDetails.stream()
.filter(a -> a.vni == vni)
.filter(subtableFilterForLocalMappings(id))
.map(detail -> getArrayAsEidLocal(valueOf(detail.eidType), detail.eid, detail.vni))
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocatorSetCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocatorSetCustomizer.java
index 75bf078f9..a2957972a 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocatorSetCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocatorSetCustomizer.java
@@ -29,8 +29,8 @@ import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.honeycomb.translate.spi.read.Initialized;
import io.fd.honeycomb.translate.spi.read.InitializingListReaderCustomizer;
import io.fd.honeycomb.translate.util.read.cache.DumpCacheManager;
-import io.fd.vpp.jvpp.core.dto.LispLocatorSetDetails;
-import io.fd.vpp.jvpp.core.dto.LispLocatorSetDetailsReplyDump;
+import io.fd.vpp.jvpp.core.dto.OneLocatorSetDetails;
+import io.fd.vpp.jvpp.core.dto.OneLocatorSetDetailsReplyDump;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import java.util.Collections;
import java.util.List;
@@ -52,14 +52,14 @@ public class LocatorSetCustomizer extends CheckedLispCustomizer
private static final Logger LOG = LoggerFactory.getLogger(LocatorSetCustomizer.class);
- private final DumpCacheManager<LispLocatorSetDetailsReplyDump, Void> dumpManager;
+ private final DumpCacheManager<OneLocatorSetDetailsReplyDump, Void> dumpManager;
public LocatorSetCustomizer(@Nonnull final FutureJVppCore futureJvpp,
@Nonnull final LispStateCheckService lispStateCheckService) {
super(futureJvpp, lispStateCheckService);
- this.dumpManager = new DumpCacheManager.DumpCacheManagerBuilder<LispLocatorSetDetailsReplyDump, Void>()
+ this.dumpManager = new DumpCacheManager.DumpCacheManagerBuilder<OneLocatorSetDetailsReplyDump, Void>()
.withExecutor(createExecutor(futureJvpp))
- .acceptOnly(LispLocatorSetDetailsReplyDump.class)
+ .acceptOnly(OneLocatorSetDetailsReplyDump.class)
.build();
}
@@ -78,17 +78,17 @@ public class LocatorSetCustomizer extends CheckedLispCustomizer
}
LOG.debug("Reading attributes for Locator Set {}", id);
- final Optional<LispLocatorSetDetailsReplyDump> dumpOptional =
+ final Optional<OneLocatorSetDetailsReplyDump> dumpOptional =
dumpManager.getDump(id, ctx.getModificationCache(), NO_PARAMS);
- if (!dumpOptional.isPresent() || dumpOptional.get().lispLocatorSetDetails.isEmpty()) {
+ if (!dumpOptional.isPresent() || dumpOptional.get().oneLocatorSetDetails.isEmpty()) {
return;
}
String keyName = id.firstKeyOf(LocatorSet.class).getName();
- LispLocatorSetDetailsReplyDump dump = dumpOptional.get();
+ OneLocatorSetDetailsReplyDump dump = dumpOptional.get();
- java.util.Optional<LispLocatorSetDetails> details = dump.lispLocatorSetDetails.stream()
+ java.util.Optional<OneLocatorSetDetails> details = dump.oneLocatorSetDetails.stream()
.filter(n -> keyName.equals(toString(n.lsName)))
.findFirst();
@@ -112,14 +112,14 @@ public class LocatorSetCustomizer extends CheckedLispCustomizer
LOG.debug("Dumping Locator Set {}", id);
- final Optional<LispLocatorSetDetailsReplyDump> dumpOptional =
+ final Optional<OneLocatorSetDetailsReplyDump> dumpOptional =
dumpManager.getDump(id, context.getModificationCache(), NO_PARAMS);
- if (!dumpOptional.isPresent() || dumpOptional.get().lispLocatorSetDetails.isEmpty()) {
+ if (!dumpOptional.isPresent() || dumpOptional.get().oneLocatorSetDetails.isEmpty()) {
return Collections.emptyList();
}
- return dumpOptional.get().lispLocatorSetDetails.stream()
+ return dumpOptional.get().oneLocatorSetDetails.stream()
.map(set -> new LocatorSetKey(toString(set.lsName)))
.collect(Collectors.toList());
}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapRegisterCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapRegisterCustomizer.java
index 808f53eff..393a27e68 100644
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapRegisterCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapRegisterCustomizer.java
@@ -25,8 +25,8 @@ import io.fd.honeycomb.translate.read.ReadContext;
import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.honeycomb.translate.spi.read.Initialized;
import io.fd.honeycomb.translate.spi.read.InitializingReaderCustomizer;
-import io.fd.vpp.jvpp.core.dto.ShowLispMapRegisterState;
-import io.fd.vpp.jvpp.core.dto.ShowLispMapRegisterStateReply;
+import io.fd.vpp.jvpp.core.dto.ShowOneMapRegisterState;
+import io.fd.vpp.jvpp.core.dto.ShowOneMapRegisterStateReply;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.lisp.feature.data.grouping.LispFeatureDataBuilder;
@@ -64,8 +64,8 @@ public class MapRegisterCustomizer extends CheckedLispCustomizer
return;
}
- final ShowLispMapRegisterStateReply read = getReplyForRead(getFutureJVpp()
- .showLispMapRegisterState(new ShowLispMapRegisterState()).toCompletableFuture(), instanceIdentifier);
+ final ShowOneMapRegisterStateReply read = getReplyForRead(getFutureJVpp()
+ .showOneMapRegisterState(new ShowOneMapRegisterState()).toCompletableFuture(), instanceIdentifier);
if (read != null) {
mapRegisterBuilder.setEnabled(byteToBoolean(read.isEnabled));
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapRequestModeCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapRequestModeCustomizer.java
index 267bc04c9..ae84015a2 100644
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapRequestModeCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapRequestModeCustomizer.java
@@ -24,8 +24,8 @@ import io.fd.honeycomb.translate.read.ReadContext;
import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.honeycomb.translate.spi.read.Initialized;
import io.fd.honeycomb.translate.spi.read.InitializingReaderCustomizer;
-import io.fd.vpp.jvpp.core.dto.ShowLispMapRequestMode;
-import io.fd.vpp.jvpp.core.dto.ShowLispMapRequestModeReply;
+import io.fd.vpp.jvpp.core.dto.ShowOneMapRequestMode;
+import io.fd.vpp.jvpp.core.dto.ShowOneMapRequestModeReply;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.lisp.feature.data.grouping.LispFeatureDataBuilder;
@@ -62,8 +62,8 @@ public class MapRequestModeCustomizer extends CheckedLispCustomizer
LOG.info("Lisp feature must be enabled first");
return;
}
- final ShowLispMapRequestModeReply reply = getReplyForRead(
- getFutureJVpp().showLispMapRequestMode(new ShowLispMapRequestMode()).toCompletableFuture(),
+ final ShowOneMapRequestModeReply reply = getReplyForRead(
+ getFutureJVpp().showOneMapRequestMode(new ShowOneMapRequestMode()).toCompletableFuture(),
instanceIdentifier);
if (reply != null) {
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapResolverCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapResolverCustomizer.java
index 199d1ff70..b5614408e 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapResolverCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapResolverCustomizer.java
@@ -30,9 +30,9 @@ import io.fd.honeycomb.translate.spi.read.Initialized;
import io.fd.honeycomb.translate.spi.read.InitializingListReaderCustomizer;
import io.fd.honeycomb.translate.util.RWUtils;
import io.fd.honeycomb.translate.util.read.cache.DumpCacheManager;
-import io.fd.vpp.jvpp.core.dto.LispMapResolverDetails;
-import io.fd.vpp.jvpp.core.dto.LispMapResolverDetailsReplyDump;
-import io.fd.vpp.jvpp.core.dto.LispMapResolverDump;
+import io.fd.vpp.jvpp.core.dto.OneMapResolverDetails;
+import io.fd.vpp.jvpp.core.dto.OneMapResolverDetailsReplyDump;
+import io.fd.vpp.jvpp.core.dto.OneMapResolverDump;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import java.util.Arrays;
import java.util.Collections;
@@ -57,17 +57,17 @@ public class MapResolverCustomizer extends CheckedLispCustomizer
private static final Logger LOG = LoggerFactory.getLogger(MapResolverCustomizer.class);
- private final DumpCacheManager<LispMapResolverDetailsReplyDump, Void> dumpManager;
+ private final DumpCacheManager<OneMapResolverDetailsReplyDump, Void> dumpManager;
public MapResolverCustomizer(@Nonnull final FutureJVppCore futureJvpp,
@Nonnull final LispStateCheckService lispStateCheckService) {
super(futureJvpp, lispStateCheckService);
this.dumpManager =
- new DumpCacheManager.DumpCacheManagerBuilder<LispMapResolverDetailsReplyDump, Void>()
+ new DumpCacheManager.DumpCacheManagerBuilder<OneMapResolverDetailsReplyDump, Void>()
.withExecutor((identifier, params) -> getReplyForRead(
- futureJvpp.lispMapResolverDump(new LispMapResolverDump()).toCompletableFuture(),
+ futureJvpp.oneMapResolverDump(new OneMapResolverDump()).toCompletableFuture(),
identifier))
- .acceptOnly(LispMapResolverDetailsReplyDump.class)
+ .acceptOnly(OneMapResolverDetailsReplyDump.class)
.build();
}
@@ -85,17 +85,17 @@ public class MapResolverCustomizer extends CheckedLispCustomizer
}
LOG.debug("Reading attributes...");
- final Optional<LispMapResolverDetailsReplyDump> dumpOptional =
+ final Optional<OneMapResolverDetailsReplyDump> dumpOptional =
dumpManager.getDump(id, ctx.getModificationCache(), NO_PARAMS);
- if (!dumpOptional.isPresent() || dumpOptional.get().lispMapResolverDetails.isEmpty()) {
+ if (!dumpOptional.isPresent() || dumpOptional.get().oneMapResolverDetails.isEmpty()) {
LOG.warn("No data dumped");
return;
}
final MapResolverKey key = id.firstKeyOf(MapResolver.class);
- final LispMapResolverDetails mapResolverDetails =
- dumpOptional.get().lispMapResolverDetails.stream()
+ final OneMapResolverDetails mapResolverDetails =
+ dumpOptional.get().oneMapResolverDetails.stream()
.filter(a -> addressesEqual(key.getIpAddress(),
arrayToIpAddress(byteToBoolean(a.isIpv6), a.ipAddress)))
.collect(RWUtils.singleItemCollector());
@@ -120,14 +120,14 @@ public class MapResolverCustomizer extends CheckedLispCustomizer
}
LOG.debug("Dumping MapResolver...");
- final Optional<LispMapResolverDetailsReplyDump> dumpOptional =
+ final Optional<OneMapResolverDetailsReplyDump> dumpOptional =
dumpManager.getDump(id, context.getModificationCache(), NO_PARAMS);
- if (!dumpOptional.isPresent() || dumpOptional.get().lispMapResolverDetails.isEmpty()) {
+ if (!dumpOptional.isPresent() || dumpOptional.get().oneMapResolverDetails.isEmpty()) {
return Collections.emptyList();
}
- return dumpOptional.get().lispMapResolverDetails.stream()
+ return dumpOptional.get().oneMapResolverDetails.stream()
.map(resolver -> new MapResolverKey(
arrayToIpAddress(byteToBoolean(resolver.isIpv6), resolver.ipAddress)))
.collect(Collectors.toList());
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapServerCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapServerCustomizer.java
index bd4c0ba5d..26e193a98 100644
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapServerCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapServerCustomizer.java
@@ -30,9 +30,9 @@ import io.fd.honeycomb.translate.spi.read.InitializingListReaderCustomizer;
import io.fd.honeycomb.translate.util.RWUtils;
import io.fd.honeycomb.translate.util.read.cache.DumpCacheManager;
import io.fd.honeycomb.translate.util.read.cache.DumpCacheManager.DumpCacheManagerBuilder;
-import io.fd.vpp.jvpp.core.dto.LispMapServerDetails;
-import io.fd.vpp.jvpp.core.dto.LispMapServerDetailsReplyDump;
-import io.fd.vpp.jvpp.core.dto.LispMapServerDump;
+import io.fd.vpp.jvpp.core.dto.OneMapServerDetails;
+import io.fd.vpp.jvpp.core.dto.OneMapServerDetailsReplyDump;
+import io.fd.vpp.jvpp.core.dto.OneMapServerDump;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import java.util.Arrays;
import java.util.Collections;
@@ -59,16 +59,16 @@ public class MapServerCustomizer extends CheckedLispCustomizer
private static final Logger LOG = LoggerFactory.getLogger(MapServerCustomizer.class);
- private final DumpCacheManager<LispMapServerDetailsReplyDump, Void> dumpManager;
+ private final DumpCacheManager<OneMapServerDetailsReplyDump, Void> dumpManager;
public MapServerCustomizer(@Nonnull final FutureJVppCore futureJVppCore,
@Nonnull final LispStateCheckService lispStateCheckService) {
super(futureJVppCore, lispStateCheckService);
- dumpManager = new DumpCacheManagerBuilder<LispMapServerDetailsReplyDump, Void>()
- .acceptOnly(LispMapServerDetailsReplyDump.class)
+ dumpManager = new DumpCacheManagerBuilder<OneMapServerDetailsReplyDump, Void>()
+ .acceptOnly(OneMapServerDetailsReplyDump.class)
.withExecutor((instanceIdentifier, aVoid) ->
getReplyForRead(getFutureJVpp()
- .lispMapServerDump(new LispMapServerDump()).toCompletableFuture(), instanceIdentifier))
+ .oneMapServerDump(new OneMapServerDump()).toCompletableFuture(), instanceIdentifier))
.build();
}
@@ -94,11 +94,11 @@ public class MapServerCustomizer extends CheckedLispCustomizer
return Collections.emptyList();
}
- final Optional<LispMapServerDetailsReplyDump> dump =
+ final Optional<OneMapServerDetailsReplyDump> dump =
dumpManager.getDump(instanceIdentifier, readContext.getModificationCache(), NO_PARAMS);
- if (dump.isPresent() && dump.get().lispMapServerDetails != null) {
- return dump.get().lispMapServerDetails.stream()
+ if (dump.isPresent() && dump.get().oneMapServerDetails != null) {
+ return dump.get().oneMapServerDetails.stream()
.map(detail -> arrayToIpAddress(byteToBoolean(detail.isIpv6), detail.ipAddress))
.map(MapServerKey::new)
.collect(Collectors.toList());
@@ -126,13 +126,13 @@ public class MapServerCustomizer extends CheckedLispCustomizer
LOG.info("Lisp feature must be enabled first");
return;
}
- final Optional<LispMapServerDetailsReplyDump> dump =
+ final Optional<OneMapServerDetailsReplyDump> dump =
dumpManager.getDump(instanceIdentifier, readContext.getModificationCache(), NO_PARAMS);
- if (dump.isPresent() && dump.get().lispMapServerDetails != null) {
+ if (dump.isPresent() && dump.get().oneMapServerDetails != null) {
final IpAddress currentAddress = instanceIdentifier.firstKeyOf(MapServer.class).getIpAddress();
- final LispMapServerDetails currentDetail = dump.get().lispMapServerDetails.stream()
+ final OneMapServerDetails currentDetail = dump.get().oneMapServerDetails.stream()
.filter(detail -> Arrays.equals(currentAddress.getValue(),
arrayToIpAddress(byteToBoolean(detail.isIpv6), detail.ipAddress).getValue()))
.collect(RWUtils.singleItemCollector());
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/PetrCfgCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/PetrCfgCustomizer.java
index da8f35743..4992f0370 100644
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/PetrCfgCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/PetrCfgCustomizer.java
@@ -25,8 +25,8 @@ import io.fd.honeycomb.translate.read.ReadContext;
import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.honeycomb.translate.spi.read.Initialized;
import io.fd.honeycomb.translate.spi.read.InitializingReaderCustomizer;
-import io.fd.vpp.jvpp.core.dto.ShowLispUsePetr;
-import io.fd.vpp.jvpp.core.dto.ShowLispUsePetrReply;
+import io.fd.vpp.jvpp.core.dto.ShowOneUsePetr;
+import io.fd.vpp.jvpp.core.dto.ShowOneUsePetrReply;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.lisp.feature.data.grouping.LispFeatureDataBuilder;
@@ -72,7 +72,7 @@ public class PetrCfgCustomizer extends CheckedLispCustomizer
return;
}
- final ShowLispUsePetrReply read = getReplyForRead(getFutureJVpp().showLispUsePetr(new ShowLispUsePetr())
+ final ShowOneUsePetrReply read = getReplyForRead(getFutureJVpp().showOneUsePetr(new ShowOneUsePetr())
.toCompletableFuture(), instanceIdentifier);
if (read != null && read.status != 0) {
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/PitrCfgCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/PitrCfgCustomizer.java
index 6e807ad36..da205da37 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/PitrCfgCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/PitrCfgCustomizer.java
@@ -27,8 +27,8 @@ import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.honeycomb.translate.spi.read.Initialized;
import io.fd.honeycomb.translate.spi.read.InitializingReaderCustomizer;
import io.fd.vpp.jvpp.VppBaseCallException;
-import io.fd.vpp.jvpp.core.dto.ShowLispPitr;
-import io.fd.vpp.jvpp.core.dto.ShowLispPitrReply;
+import io.fd.vpp.jvpp.core.dto.ShowOnePitr;
+import io.fd.vpp.jvpp.core.dto.ShowOnePitrReply;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import java.util.concurrent.TimeoutException;
import javax.annotation.Nonnull;
@@ -70,7 +70,7 @@ public class PitrCfgCustomizer extends CheckedLispCustomizer
}
LOG.debug("Reading status for Lisp Pitr node {}", id);
- ShowLispPitrReply reply;
+ ShowOnePitrReply reply;
try {
reply = getPitrStatus();
@@ -87,8 +87,8 @@ public class PitrCfgCustomizer extends CheckedLispCustomizer
((LispFeatureDataBuilder) parentBuilder).setPitrCfg(readValue);
}
- public ShowLispPitrReply getPitrStatus() throws TimeoutException, VppBaseCallException {
- return getReply(getFutureJVpp().showLispPitr(new ShowLispPitr()).toCompletableFuture());
+ public ShowOnePitrReply getPitrStatus() throws TimeoutException, VppBaseCallException {
+ return getReply(getFutureJVpp().showOnePitr(new ShowOnePitr()).toCompletableFuture());
}
@Nonnull
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/RemoteMappingCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/RemoteMappingCustomizer.java
index a81b37d65..2ba9eb831 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/RemoteMappingCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/RemoteMappingCustomizer.java
@@ -46,10 +46,10 @@ import io.fd.honeycomb.translate.spi.read.InitializingListReaderCustomizer;
import io.fd.honeycomb.translate.util.RWUtils;
import io.fd.honeycomb.translate.util.read.cache.DumpCacheManager;
import io.fd.honeycomb.translate.util.read.cache.TypeAwareIdentifierCacheKeyFactory;
-import io.fd.vpp.jvpp.core.dto.LispEidTableDetails;
-import io.fd.vpp.jvpp.core.dto.LispEidTableDetailsReplyDump;
-import io.fd.vpp.jvpp.core.dto.LispLocatorDetails;
-import io.fd.vpp.jvpp.core.dto.LispLocatorDetailsReplyDump;
+import io.fd.vpp.jvpp.core.dto.OneEidTableDetails;
+import io.fd.vpp.jvpp.core.dto.OneEidTableDetailsReplyDump;
+import io.fd.vpp.jvpp.core.dto.OneLocatorDetails;
+import io.fd.vpp.jvpp.core.dto.OneLocatorDetailsReplyDump;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import java.util.Collections;
import java.util.List;
@@ -91,8 +91,8 @@ public class RemoteMappingCustomizer extends FutureJVppCustomizer
private static final Logger LOG = LoggerFactory.getLogger(RemoteMappingCustomizer.class);
- private final DumpCacheManager<LispEidTableDetailsReplyDump, MappingsDumpParams> dumpManager;
- private final DumpCacheManager<LispLocatorDetailsReplyDump, LocatorDumpParams> locatorsDumpManager;
+ private final DumpCacheManager<OneEidTableDetailsReplyDump, MappingsDumpParams> dumpManager;
+ private final DumpCacheManager<OneLocatorDetailsReplyDump, LocatorDumpParams> locatorsDumpManager;
private final NamingContext locatorSetContext;
private final EidMappingContext remoteMappingContext;
@@ -104,16 +104,16 @@ public class RemoteMappingCustomizer extends FutureJVppCustomizer
this.remoteMappingContext = checkNotNull(remoteMappingContext, "Remote mappings not present");
// this one should have default scope == RemoteMapping
this.dumpManager =
- new DumpCacheManager.DumpCacheManagerBuilder<LispEidTableDetailsReplyDump, MappingsDumpParams>()
+ new DumpCacheManager.DumpCacheManagerBuilder<OneEidTableDetailsReplyDump, MappingsDumpParams>()
.withExecutor(createMappingDumpExecutor(futureJvpp))
- .acceptOnly(LispEidTableDetailsReplyDump.class)
+ .acceptOnly(OneEidTableDetailsReplyDump.class)
.build();
// cache key needs to have locator set scope to not mix with cached data
this.locatorsDumpManager =
- new DumpCacheManager.DumpCacheManagerBuilder<LispLocatorDetailsReplyDump, LocatorDumpParams>()
+ new DumpCacheManager.DumpCacheManagerBuilder<OneLocatorDetailsReplyDump, LocatorDumpParams>()
.withExecutor(createLocatorDumpExecutor(futureJvpp))
- .withCacheKeyFactory(new TypeAwareIdentifierCacheKeyFactory(LispLocatorDetailsReplyDump.class,
+ .withCacheKeyFactory(new TypeAwareIdentifierCacheKeyFactory(OneLocatorDetailsReplyDump.class,
ImmutableSet.of(LocatorSet.class)))
.build();
}
@@ -160,16 +160,16 @@ public class RemoteMappingCustomizer extends FutureJVppCustomizer
.build();
LOG.debug("Dumping data for LocalMappings(id={})", id);
- final Optional<LispEidTableDetailsReplyDump> replyOptional =
+ final Optional<OneEidTableDetailsReplyDump> replyOptional =
dumpManager.getDump(id, ctx.getModificationCache(), dumpParams);
- if (!replyOptional.isPresent() || replyOptional.get().lispEidTableDetails.isEmpty()) {
+ if (!replyOptional.isPresent() || replyOptional.get().oneEidTableDetails.isEmpty()) {
return;
}
LOG.debug("Valid dump loaded");
- LispEidTableDetails details = replyOptional.get().lispEidTableDetails.stream()
+ OneEidTableDetails details = replyOptional.get().oneEidTableDetails.stream()
.filter(subtableFilterForRemoteMappings(id))
.filter(a -> compareAddresses(eid.getAddress(),
getArrayAsEidLocal(valueOf(a.eidType), a.eid, a.vni).getAddress()))
@@ -205,15 +205,15 @@ public class RemoteMappingCustomizer extends FutureJVppCustomizer
.build();
LOG.debug("Dumping data for LocalMappings(id={})", id);
- final Optional<LispEidTableDetailsReplyDump> replyOptional =
+ final Optional<OneEidTableDetailsReplyDump> replyOptional =
dumpManager.getDump(id, context.getModificationCache(), dumpParams);
- if (!replyOptional.isPresent() || replyOptional.get().lispEidTableDetails.isEmpty()) {
+ if (!replyOptional.isPresent() || replyOptional.get().oneEidTableDetails.isEmpty()) {
return Collections.emptyList();
}
return replyOptional.get()
- .lispEidTableDetails
+ .oneEidTableDetails
.stream()
.filter(a -> a.vni == vni)
.filter(subtableFilterForRemoteMappings(id))
@@ -230,7 +230,7 @@ public class RemoteMappingCustomizer extends FutureJVppCustomizer
}
private void resolveMappings(final InstanceIdentifier id, final RemoteMappingBuilder builder,
- final LispEidTableDetails details,
+ final OneEidTableDetails details,
final ModificationCache cache,
final MappingContext mappingContext) throws ReadFailedException {
@@ -238,7 +238,7 @@ public class RemoteMappingCustomizer extends FutureJVppCustomizer
bindNegativeMapping(builder, MapReplyAction.forValue(details.action));
} else {
// cache key needs to have locator set scope to not mix with cached data
- final Optional<LispLocatorDetailsReplyDump> reply;
+ final Optional<OneLocatorDetailsReplyDump> reply;
// this will serve to achieve that locators have locator set scope
final InstanceIdentifier<Interface> locatorIfaceIdentifier = InstanceIdentifier.create(LocatorSets.class)
@@ -254,7 +254,7 @@ public class RemoteMappingCustomizer extends FutureJVppCustomizer
e.getCause()));
}
- bindPositiveMapping(builder, reply.or(new LispLocatorDetailsReplyDump()));
+ bindPositiveMapping(builder, reply.or(new OneLocatorDetailsReplyDump()));
}
}
@@ -265,13 +265,13 @@ public class RemoteMappingCustomizer extends FutureJVppCustomizer
.build());
}
- private void bindPositiveMapping(final RemoteMappingBuilder builder, final LispLocatorDetailsReplyDump reply) {
+ private void bindPositiveMapping(final RemoteMappingBuilder builder, final OneLocatorDetailsReplyDump reply) {
builder.setLocatorList(
new PositiveMappingBuilder()
.setRlocs(
new RlocsBuilder()
.setLocator(reply
- .lispLocatorDetails
+ .oneLocatorDetails
.stream()
.map(this::detailsToLocator)
.collect(Collectors.toList()))
@@ -281,7 +281,7 @@ public class RemoteMappingCustomizer extends FutureJVppCustomizer
);
}
- private Locator detailsToLocator(final LispLocatorDetails details) {
+ private Locator detailsToLocator(final OneLocatorDetails details) {
final IpAddress address = arrayToIpAddress(byteToBoolean(details.isIpv6), details.ipAddress);
return new LocatorBuilder()
.setAddress(address)
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/RlocProbeCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/RlocProbeCustomizer.java
index 0cd5b857f..f369850ff 100644
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/RlocProbeCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/RlocProbeCustomizer.java
@@ -25,8 +25,8 @@ import io.fd.honeycomb.translate.read.ReadContext;
import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.honeycomb.translate.spi.read.Initialized;
import io.fd.honeycomb.translate.spi.read.InitializingReaderCustomizer;
-import io.fd.vpp.jvpp.core.dto.ShowLispRlocProbeState;
-import io.fd.vpp.jvpp.core.dto.ShowLispRlocProbeStateReply;
+import io.fd.vpp.jvpp.core.dto.ShowOneRlocProbeState;
+import io.fd.vpp.jvpp.core.dto.ShowOneRlocProbeStateReply;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.lisp.feature.data.grouping.LispFeatureDataBuilder;
@@ -64,8 +64,8 @@ public class RlocProbeCustomizer extends CheckedLispCustomizer
return;
}
- final ShowLispRlocProbeStateReply read = getReplyForRead(getFutureJVpp()
- .showLispRlocProbeState(new ShowLispRlocProbeState()).toCompletableFuture(), instanceIdentifier);
+ final ShowOneRlocProbeStateReply read = getReplyForRead(getFutureJVpp()
+ .showOneRlocProbeState(new ShowOneRlocProbeState()).toCompletableFuture(), instanceIdentifier);
if (read != null) {
rlocProbeBuilder.setEnabled(byteToBoolean(read.isEnabled));
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VniTableCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VniTableCustomizer.java
index 56e60c231..28b5509ae 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VniTableCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VniTableCustomizer.java
@@ -29,9 +29,9 @@ import io.fd.honeycomb.translate.spi.read.Initialized;
import io.fd.honeycomb.translate.spi.read.InitializingListReaderCustomizer;
import io.fd.honeycomb.translate.util.RWUtils;
import io.fd.honeycomb.translate.util.read.cache.DumpCacheManager;
-import io.fd.vpp.jvpp.core.dto.LispEidTableVniDetails;
-import io.fd.vpp.jvpp.core.dto.LispEidTableVniDetailsReplyDump;
-import io.fd.vpp.jvpp.core.dto.LispEidTableVniDump;
+import io.fd.vpp.jvpp.core.dto.OneEidTableVniDetails;
+import io.fd.vpp.jvpp.core.dto.OneEidTableVniDetailsReplyDump;
+import io.fd.vpp.jvpp.core.dto.OneEidTableVniDump;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import java.util.Collections;
import java.util.List;
@@ -59,19 +59,19 @@ public class VniTableCustomizer extends CheckedLispCustomizer
private static final Logger LOG = LoggerFactory.getLogger(VniTableCustomizer.class);
- private final DumpCacheManager<LispEidTableVniDetailsReplyDump, Void> dumpManager;
+ private final DumpCacheManager<OneEidTableVniDetailsReplyDump, Void> dumpManager;
public VniTableCustomizer(@Nonnull final FutureJVppCore futureJvpp,
@Nonnull final LispStateCheckService lispStateCheckService) {
super(futureJvpp, lispStateCheckService);
- this.dumpManager = new DumpCacheManager.DumpCacheManagerBuilder<LispEidTableVniDetailsReplyDump, Void>()
+ this.dumpManager = new DumpCacheManager.DumpCacheManagerBuilder<OneEidTableVniDetailsReplyDump, Void>()
.withExecutor(((identifier, params) -> getReplyForRead(
- futureJvpp.lispEidTableVniDump(new LispEidTableVniDump()).toCompletableFuture(), identifier)))
- .acceptOnly(LispEidTableVniDetailsReplyDump.class)
+ futureJvpp.oneEidTableVniDump(new OneEidTableVniDump()).toCompletableFuture(), identifier)))
+ .acceptOnly(OneEidTableVniDetailsReplyDump.class)
.build();
}
- private static VniTableKey detailsToKey(final LispEidTableVniDetails lispEidTableMapDetails) {
+ private static VniTableKey detailsToKey(final OneEidTableVniDetails lispEidTableMapDetails) {
return new VniTableKey(Integer.valueOf(lispEidTableMapDetails.vni).longValue());
}
@@ -98,14 +98,14 @@ public class VniTableCustomizer extends CheckedLispCustomizer
}
LOG.trace("Reading all IDS...");
- final Optional<LispEidTableVniDetailsReplyDump> optionalReply =
+ final Optional<OneEidTableVniDetailsReplyDump> optionalReply =
dumpManager.getDump(id, context.getModificationCache(), NO_PARAMS);
- if (!optionalReply.isPresent() || optionalReply.get().lispEidTableVniDetails.isEmpty()) {
+ if (!optionalReply.isPresent() || optionalReply.get().oneEidTableVniDetails.isEmpty()) {
return Collections.emptyList();
}
- return optionalReply.get().lispEidTableVniDetails.stream().map(VniTableCustomizer::detailsToKey)
+ return optionalReply.get().oneEidTableVniDetails.stream().map(VniTableCustomizer::detailsToKey)
.collect(Collectors.toList());
}
@@ -121,16 +121,16 @@ public class VniTableCustomizer extends CheckedLispCustomizer
checkState(id.firstKeyOf(VniTable.class) != null, "No VNI present");
VniTableKey key = new VniTableKey(id.firstKeyOf(VniTable.class).getVirtualNetworkIdentifier());
- final Optional<LispEidTableVniDetailsReplyDump> optionalReply =
+ final Optional<OneEidTableVniDetailsReplyDump> optionalReply =
dumpManager.getDump(id, ctx.getModificationCache(), NO_PARAMS);
- if (!optionalReply.isPresent() || optionalReply.get().lispEidTableVniDetails.isEmpty()) {
+ if (!optionalReply.isPresent() || optionalReply.get().oneEidTableVniDetails.isEmpty()) {
return;
}
//transforming right away to single detail(specific request should do the magic)
- final LispEidTableVniDetails details = optionalReply.get()
- .lispEidTableVniDetails
+ final OneEidTableVniDetails details = optionalReply.get()
+ .oneEidTableVniDetails
.stream()
.filter(a -> a.vni == key.getVirtualNetworkIdentifier().intValue())
.collect(RWUtils.singleItemCollector());
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VrfSubtableCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VrfSubtableCustomizer.java
index 799d2ae9e..80d6cbd83 100644
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VrfSubtableCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VrfSubtableCustomizer.java
@@ -16,6 +16,8 @@
package io.fd.hc2vpp.lisp.translate.read;
+import static com.google.common.base.Preconditions.checkNotNull;
+
import com.google.common.base.Optional;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
import io.fd.hc2vpp.lisp.translate.read.dump.executor.params.SubtableDumpParams;
@@ -27,9 +29,13 @@ import io.fd.honeycomb.translate.spi.read.Initialized;
import io.fd.honeycomb.translate.spi.read.InitializingReaderCustomizer;
import io.fd.honeycomb.translate.util.read.cache.DumpCacheManager;
import io.fd.honeycomb.translate.util.read.cache.DumpCacheManager.DumpCacheManagerBuilder;
-import io.fd.vpp.jvpp.core.dto.LispEidTableMapDetails;
import io.fd.vpp.jvpp.core.dto.LispEidTableMapDetailsReplyDump;
+import io.fd.vpp.jvpp.core.dto.OneEidTableMapDetails;
+import io.fd.vpp.jvpp.core.dto.OneEidTableMapDetailsReplyDump;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
+import java.util.List;
+import java.util.stream.Collectors;
+import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.eid.table.grouping.eid.table.VniTable;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.eid.table.grouping.eid.table.VniTableBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.eid.table.grouping.eid.table.vni.table.VrfSubtable;
@@ -40,22 +46,16 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.annotation.Nonnull;
-import java.util.List;
-import java.util.stream.Collectors;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
public class VrfSubtableCustomizer extends FutureJVppCustomizer
implements InitializingReaderCustomizer<VrfSubtable, VrfSubtableBuilder>, SubtableReader, LispInitPathsMapper {
private static final Logger LOG = LoggerFactory.getLogger(VrfSubtableCustomizer.class);
- private final DumpCacheManager<LispEidTableMapDetailsReplyDump, SubtableDumpParams> dumpManager;
+ private final DumpCacheManager<OneEidTableMapDetailsReplyDump, SubtableDumpParams> dumpManager;
public VrfSubtableCustomizer(@Nonnull final FutureJVppCore futureJvpp) {
super(futureJvpp);
- dumpManager = new DumpCacheManagerBuilder<LispEidTableMapDetailsReplyDump, SubtableDumpParams>()
+ dumpManager = new DumpCacheManagerBuilder<OneEidTableMapDetailsReplyDump, SubtableDumpParams>()
.withExecutor(createExecutor(futureJvpp))
.acceptOnly(LispEidTableMapDetailsReplyDump.class)
.build();
@@ -75,19 +75,19 @@ public class VrfSubtableCustomizer extends FutureJVppCustomizer
final int vni = checkNotNull(id.firstKeyOf(VniTable.class), "Cannot find parent VNI Table")
.getVirtualNetworkIdentifier().intValue();
- final Optional<LispEidTableMapDetailsReplyDump> reply = dumpManager.getDump(id, ctx.getModificationCache(), L3_PARAMS);
+ final Optional<OneEidTableMapDetailsReplyDump> reply = dumpManager.getDump(id, ctx.getModificationCache(), L3_PARAMS);
- if (!reply.isPresent() || reply.get().lispEidTableMapDetails.isEmpty()) {
+ if (!reply.isPresent() || reply.get().oneEidTableMapDetails.isEmpty()) {
return;
}
// Single item collector cant be used in this case,because vrf-subtable is container
// so read is invoked every time parent is defined
- final List<LispEidTableMapDetails> details =
- reply.get().lispEidTableMapDetails.stream().filter(a -> a.vni == vni)
+ final List<OneEidTableMapDetails> details =
+ reply.get().oneEidTableMapDetails.stream().filter(a -> a.vni == vni)
.collect(Collectors.toList());
if (details.size() == 1) {
- final LispEidTableMapDetails detail = details.get(0);
+ final OneEidTableMapDetails detail = details.get(0);
builder.setTableId(Integer.valueOf(detail.dpTable).longValue());
LOG.debug("Attributes for {} successfully loaded", id);
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/trait/LocatorReader.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/trait/LocatorReader.java
index f342d48be..609bcb90b 100644
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/trait/LocatorReader.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/trait/LocatorReader.java
@@ -18,11 +18,11 @@ package io.fd.hc2vpp.lisp.translate.read.trait;
import static com.google.common.base.Preconditions.checkNotNull;
+import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
import io.fd.hc2vpp.lisp.translate.read.dump.executor.params.LocatorDumpParams;
import io.fd.honeycomb.translate.util.read.cache.EntityDumpExecutor;
-import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
-import io.fd.vpp.jvpp.core.dto.LispLocatorDetailsReplyDump;
-import io.fd.vpp.jvpp.core.dto.LispLocatorDump;
+import io.fd.vpp.jvpp.core.dto.OneLocatorDetailsReplyDump;
+import io.fd.vpp.jvpp.core.dto.OneLocatorDump;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import javax.annotation.Nonnull;
@@ -31,16 +31,16 @@ import javax.annotation.Nonnull;
*/
public interface LocatorReader extends JvppReplyConsumer {
- default EntityDumpExecutor<LispLocatorDetailsReplyDump, LocatorDumpParams> createLocatorDumpExecutor(
+ default EntityDumpExecutor<OneLocatorDetailsReplyDump, LocatorDumpParams> createLocatorDumpExecutor(
@Nonnull final FutureJVppCore vppApi) {
return (identifier, params) -> {
checkNotNull(params, "Params for dump request not present");
- final LispLocatorDump request = new LispLocatorDump();
+ final OneLocatorDump request = new OneLocatorDump();
request.lsIndex = params.getLocatorSetIndex();
//flag that lsIndex is set
request.isIndexSet = (byte) 1;
- return getReplyForRead(vppApi.lispLocatorDump(request).toCompletableFuture(), identifier);
+ return getReplyForRead(vppApi.oneLocatorDump(request).toCompletableFuture(), identifier);
};
}
}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/trait/LocatorSetReader.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/trait/LocatorSetReader.java
index cf76b92af..bc0e0d0e6 100644
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/trait/LocatorSetReader.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/trait/LocatorSetReader.java
@@ -16,10 +16,10 @@
package io.fd.hc2vpp.lisp.translate.read.trait;
-import io.fd.honeycomb.translate.util.read.cache.EntityDumpExecutor;
import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
-import io.fd.vpp.jvpp.core.dto.LispLocatorSetDetailsReplyDump;
-import io.fd.vpp.jvpp.core.dto.LispLocatorSetDump;
+import io.fd.honeycomb.translate.util.read.cache.EntityDumpExecutor;
+import io.fd.vpp.jvpp.core.dto.OneLocatorSetDetailsReplyDump;
+import io.fd.vpp.jvpp.core.dto.OneLocatorSetDump;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.locator.sets.grouping.locator.sets.LocatorSet;
@@ -29,13 +29,13 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev
*/
public interface LocatorSetReader extends JvppReplyConsumer {
- default EntityDumpExecutor<LispLocatorSetDetailsReplyDump, Void> createExecutor(
+ default EntityDumpExecutor<OneLocatorSetDetailsReplyDump, Void> createExecutor(
@Nonnull final FutureJVppCore vppApi) {
return (identifier, params) -> {
- final LispLocatorSetDump request = new LispLocatorSetDump();
+ final OneLocatorSetDump request = new OneLocatorSetDump();
//only local
request.filter = 1;
- return getReplyForRead(vppApi.lispLocatorSetDump(request).toCompletableFuture(), identifier);
+ return getReplyForRead(vppApi.oneLocatorSetDump(request).toCompletableFuture(), identifier);
};
}
}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/trait/MappingReader.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/trait/MappingReader.java
index 8e8b51890..bad719d01 100644
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/trait/MappingReader.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/trait/MappingReader.java
@@ -21,12 +21,12 @@ import static io.fd.hc2vpp.lisp.translate.read.dump.executor.params.MappingsDump
import static io.fd.hc2vpp.lisp.translate.read.dump.executor.params.MappingsDumpParams.EidType.IPV6;
import static io.fd.hc2vpp.lisp.translate.read.dump.executor.params.MappingsDumpParams.EidType.MAC;
+import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
import io.fd.hc2vpp.lisp.translate.read.dump.executor.params.MappingsDumpParams;
import io.fd.honeycomb.translate.util.read.cache.EntityDumpExecutor;
-import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
-import io.fd.vpp.jvpp.core.dto.LispEidTableDetails;
-import io.fd.vpp.jvpp.core.dto.LispEidTableDetailsReplyDump;
-import io.fd.vpp.jvpp.core.dto.LispEidTableDump;
+import io.fd.vpp.jvpp.core.dto.OneEidTableDetails;
+import io.fd.vpp.jvpp.core.dto.OneEidTableDetailsReplyDump;
+import io.fd.vpp.jvpp.core.dto.OneEidTableDump;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import java.util.function.Predicate;
import javax.annotation.Nonnull;
@@ -41,13 +41,13 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
*/
public interface MappingReader extends JvppReplyConsumer {
- Predicate<LispEidTableDetails> BRIDGE_DOMAIN_MAPPINGS_ONLY =
- (LispEidTableDetails detail) -> detail.eidType == MAC.getValue();
+ Predicate<OneEidTableDetails> BRIDGE_DOMAIN_MAPPINGS_ONLY =
+ (OneEidTableDetails detail) -> detail.eidType == MAC.getValue();
- Predicate<LispEidTableDetails> VRF_MAPPINGS_ONLY =
- (LispEidTableDetails detail) -> detail.eidType == IPV4.getValue() || detail.eidType == IPV6.getValue();
+ Predicate<OneEidTableDetails> VRF_MAPPINGS_ONLY =
+ (OneEidTableDetails detail) -> detail.eidType == IPV4.getValue() || detail.eidType == IPV6.getValue();
- default Predicate<LispEidTableDetails> subtableFilterForLocalMappings(
+ default Predicate<OneEidTableDetails> subtableFilterForLocalMappings(
@Nonnull final InstanceIdentifier<LocalMapping> identifier) {
if (identifier.firstIdentifierOf(VrfSubtable.class) != null) {
@@ -59,7 +59,7 @@ public interface MappingReader extends JvppReplyConsumer {
}
}
- default Predicate<LispEidTableDetails> subtableFilterForRemoteMappings(
+ default Predicate<OneEidTableDetails> subtableFilterForRemoteMappings(
@Nonnull final InstanceIdentifier<RemoteMapping> identifier) {
if (identifier.firstIdentifierOf(VrfSubtable.class) != null) {
@@ -71,12 +71,12 @@ public interface MappingReader extends JvppReplyConsumer {
}
}
- default EntityDumpExecutor<LispEidTableDetailsReplyDump, MappingsDumpParams> createMappingDumpExecutor(
+ default EntityDumpExecutor<OneEidTableDetailsReplyDump, MappingsDumpParams> createMappingDumpExecutor(
@Nonnull final FutureJVppCore vppApi) {
return (identifier, params) -> {
checkNotNull(params, "Params for dump request not present");
- LispEidTableDump request = new LispEidTableDump();
+ OneEidTableDump request = new OneEidTableDump();
request.eid = params.getEid();
request.eidSet = params.getEidSet();
request.eidType = params.getEidType();
@@ -84,7 +84,7 @@ public interface MappingReader extends JvppReplyConsumer {
request.vni = params.getVni();
request.filter = params.getFilter();
- return getReplyForRead(vppApi.lispEidTableDump(request).toCompletableFuture(), identifier);
+ return getReplyForRead(vppApi.oneEidTableDump(request).toCompletableFuture(), identifier);
};
}
}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/trait/SubtableReader.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/trait/SubtableReader.java
index 7229628e5..1ae0f1047 100644
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/trait/SubtableReader.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/trait/SubtableReader.java
@@ -22,15 +22,13 @@ import static io.fd.hc2vpp.lisp.translate.read.dump.executor.params.SubtableDump
import static io.fd.hc2vpp.lisp.translate.read.dump.executor.params.SubtableDumpParams.MapLevel.L3;
import static io.fd.hc2vpp.lisp.translate.read.dump.executor.params.SubtableDumpParams.SubtableDumpParamsBuilder;
+import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
import io.fd.hc2vpp.lisp.translate.read.dump.executor.params.SubtableDumpParams;
import io.fd.honeycomb.translate.util.read.cache.EntityDumpExecutor;
-import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
-import io.fd.vpp.jvpp.core.dto.LispEidTableMapDetailsReplyDump;
-import io.fd.vpp.jvpp.core.dto.LispEidTableMapDump;
+import io.fd.vpp.jvpp.core.dto.OneEidTableMapDetailsReplyDump;
+import io.fd.vpp.jvpp.core.dto.OneEidTableMapDump;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import javax.annotation.Nonnull;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.eid.table.grouping.eid.table.VniTable;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.eid.table.grouping.eid.table.vni.table.VrfSubtable;
/**
* Provides common logic for reading Eid subtables
@@ -40,12 +38,12 @@ public interface SubtableReader extends JvppReplyConsumer {
SubtableDumpParams L2_PARAMS = new SubtableDumpParamsBuilder().setL2(L2).build();
SubtableDumpParams L3_PARAMS = new SubtableDumpParamsBuilder().setL2(L3).build();
- default EntityDumpExecutor<LispEidTableMapDetailsReplyDump, SubtableDumpParams> createExecutor(
+ default EntityDumpExecutor<OneEidTableMapDetailsReplyDump, SubtableDumpParams> createExecutor(
@Nonnull final FutureJVppCore vppApi) {
return (identifier, params) -> {
- final LispEidTableMapDump request = new LispEidTableMapDump();
+ final OneEidTableMapDump request = new OneEidTableMapDump();
request.isL2 = checkNotNull(params, "Cannot bind null params").isL2();
- return getReplyForRead(vppApi.lispEidTableMapDump(request).toCompletableFuture(), identifier);
+ return getReplyForRead(vppApi.oneEidTableMapDump(request).toCompletableFuture(), identifier);
};
}
}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/service/LispStateCheckServiceImpl.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/service/LispStateCheckServiceImpl.java
index 8d46e9bed..a93f08349 100644
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/service/LispStateCheckServiceImpl.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/service/LispStateCheckServiceImpl.java
@@ -27,8 +27,8 @@ import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.honeycomb.translate.util.read.cache.DumpCacheManager;
import io.fd.honeycomb.translate.util.read.cache.DumpCacheManager.DumpCacheManagerBuilder;
import io.fd.honeycomb.translate.write.WriteContext;
-import io.fd.vpp.jvpp.core.dto.ShowLispStatus;
-import io.fd.vpp.jvpp.core.dto.ShowLispStatusReply;
+import io.fd.vpp.jvpp.core.dto.ShowOneStatus;
+import io.fd.vpp.jvpp.core.dto.ShowOneStatusReply;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.Lisp;
@@ -38,17 +38,17 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
public final class LispStateCheckServiceImpl implements LispStateCheckService, JvppReplyConsumer, ByteDataTranslator {
private static final Lisp STATIC_LISP_INSTANCE = new LispBuilder().setEnable(false).build();
- private static final ShowLispStatusReply DEFAULT_REPLY = new ShowLispStatusReply();
+ private static final ShowOneStatusReply DEFAULT_REPLY = new ShowOneStatusReply();
private static final InstanceIdentifier<Lisp> IDENTIFIER = InstanceIdentifier.create(Lisp.class);
- private final DumpCacheManager<ShowLispStatusReply, Void> dumpManager;
+ private final DumpCacheManager<ShowOneStatusReply, Void> dumpManager;
@Inject
public LispStateCheckServiceImpl(@Nonnull final FutureJVppCore vppApi) {
- dumpManager = new DumpCacheManagerBuilder<ShowLispStatusReply, Void>()
- .withExecutor((instanceIdentifier, aVoid) -> getReplyForRead(vppApi.showLispStatus(new ShowLispStatus())
+ dumpManager = new DumpCacheManagerBuilder<ShowOneStatusReply, Void>()
+ .withExecutor((instanceIdentifier, aVoid) -> getReplyForRead(vppApi.showOneStatus(new ShowOneStatus())
.toCompletableFuture(), instanceIdentifier))
- .acceptOnly(ShowLispStatusReply.class)
+ .acceptOnly(ShowOneStatusReply.class)
.build();
}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/AdjacencyCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/AdjacencyCustomizer.java
index 37a05f108..df5f431be 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/AdjacencyCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/AdjacencyCustomizer.java
@@ -21,17 +21,17 @@ import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
import static io.fd.hc2vpp.lisp.translate.read.dump.executor.params.MappingsDumpParams.EidType;
+import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
+import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
+import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
import io.fd.hc2vpp.lisp.context.util.AdjacenciesMappingContext;
import io.fd.hc2vpp.lisp.context.util.EidMappingContext;
import io.fd.hc2vpp.lisp.translate.util.EidTranslator;
import io.fd.honeycomb.translate.spi.write.ListWriterCustomizer;
-import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
-import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
-import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
import io.fd.honeycomb.translate.write.WriteContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
import io.fd.vpp.jvpp.VppBaseCallException;
-import io.fd.vpp.jvpp.core.dto.LispAddDelAdjacency;
+import io.fd.vpp.jvpp.core.dto.OneAddDelAdjacency;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import java.util.concurrent.TimeoutException;
import javax.annotation.Nonnull;
@@ -138,7 +138,7 @@ public class AdjacencyCustomizer extends FutureJVppCustomizer
checkArgument(localEidType ==
remoteEidType, "Local[%s] and Remote[%s] eid types must be the same", localEidType, remoteEidType);
- LispAddDelAdjacency request = new LispAddDelAdjacency();
+ OneAddDelAdjacency request = new OneAddDelAdjacency();
request.isAdd = booleanToByte(add);
request.leid = getEidAsByteArray(localEid);
@@ -148,7 +148,7 @@ public class AdjacencyCustomizer extends FutureJVppCustomizer
request.eidType = (byte) localEidType.getValue();
request.vni = vni;
- getReply(getFutureJVpp().lispAddDelAdjacency(request).toCompletableFuture());
+ getReply(getFutureJVpp().oneAddDelAdjacency(request).toCompletableFuture());
}
private LocalEid verifiedLocalEid(final LocalEid localEid, final WriteContext writeContext) {
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/InterfaceCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/InterfaceCustomizer.java
index 93a8267d6..b3b8d8a77 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/InterfaceCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/InterfaceCustomizer.java
@@ -20,13 +20,16 @@ import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkState;
import static java.nio.charset.StandardCharsets.UTF_8;
-import io.fd.honeycomb.translate.spi.write.ListWriterCustomizer;
import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
import io.fd.hc2vpp.common.translate.util.NamingContext;
+import io.fd.honeycomb.translate.spi.write.ListWriterCustomizer;
import io.fd.honeycomb.translate.write.WriteContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
+import io.fd.vpp.jvpp.VppBaseCallException;
+import io.fd.vpp.jvpp.core.dto.OneAddDelLocator;
+import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import java.io.UnsupportedEncodingException;
import java.util.concurrent.TimeoutException;
import javax.annotation.Nonnull;
@@ -34,9 +37,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.locator.sets.grouping.locator.sets.locator.set.Interface;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.locator.sets.grouping.locator.sets.locator.set.InterfaceKey;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import io.fd.vpp.jvpp.VppBaseCallException;
-import io.fd.vpp.jvpp.core.dto.LispAddDelLocator;
-import io.fd.vpp.jvpp.core.future.FutureJVppCore;
/**
@@ -109,7 +109,7 @@ public class InterfaceCustomizer extends FutureJVppCustomizer
private void addDelInterfaceAndReply(boolean add, Interface data, int interfaceIndex, String locatorSetName)
throws VppBaseCallException, TimeoutException, UnsupportedEncodingException {
- LispAddDelLocator request = new LispAddDelLocator();
+ OneAddDelLocator request = new OneAddDelLocator();
request.isAdd = booleanToByte(add);
request.priority = data.getPriority().byteValue();
@@ -117,6 +117,6 @@ public class InterfaceCustomizer extends FutureJVppCustomizer
request.swIfIndex = interfaceIndex;
request.locatorSetName = locatorSetName.getBytes(UTF_8);
- getReply(getFutureJVpp().lispAddDelLocator(request).toCompletableFuture());
+ getReply(getFutureJVpp().oneAddDelLocator(request).toCompletableFuture());
}
}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/ItrRemoteLocatorSetCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/ItrRemoteLocatorSetCustomizer.java
index 71be3c749..90dc0efb6 100644
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/ItrRemoteLocatorSetCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/ItrRemoteLocatorSetCustomizer.java
@@ -25,7 +25,7 @@ import io.fd.honeycomb.translate.spi.write.WriterCustomizer;
import io.fd.honeycomb.translate.write.WriteContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
import io.fd.vpp.jvpp.VppBaseCallException;
-import io.fd.vpp.jvpp.core.dto.LispAddDelMapRequestItrRlocs;
+import io.fd.vpp.jvpp.core.dto.OneAddDelMapRequestItrRlocs;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import java.nio.charset.StandardCharsets;
import java.util.concurrent.TimeoutException;
@@ -77,10 +77,10 @@ public class ItrRemoteLocatorSetCustomizer extends CheckedLispCustomizer impleme
throws TimeoutException, VppBaseCallException {
lispStateCheckService.checkLispEnabled(context);
- LispAddDelMapRequestItrRlocs request = new LispAddDelMapRequestItrRlocs();
+ OneAddDelMapRequestItrRlocs request = new OneAddDelMapRequestItrRlocs();
request.isAdd = booleanToByte(add);
request.locatorSetName = data.getRemoteLocatorSetName().getBytes(StandardCharsets.UTF_8);
- getReply(getFutureJVpp().lispAddDelMapRequestItrRlocs(request).toCompletableFuture());
+ getReply(getFutureJVpp().oneAddDelMapRequestItrRlocs(request).toCompletableFuture());
}
}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/LispCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/LispCustomizer.java
index 8f0ffbf65..671614567 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/LispCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/LispCustomizer.java
@@ -17,21 +17,21 @@
package io.fd.hc2vpp.lisp.translate.write;
import com.google.common.base.Preconditions;
-import io.fd.honeycomb.translate.spi.write.WriterCustomizer;
import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
+import io.fd.honeycomb.translate.spi.write.WriterCustomizer;
import io.fd.honeycomb.translate.write.WriteContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
+import io.fd.vpp.jvpp.VppBaseCallException;
+import io.fd.vpp.jvpp.core.dto.OneEnableDisable;
+import io.fd.vpp.jvpp.core.dto.OneEnableDisableReply;
+import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import java.util.concurrent.CompletionStage;
import java.util.concurrent.TimeoutException;
import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.Lisp;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import io.fd.vpp.jvpp.VppBaseCallException;
-import io.fd.vpp.jvpp.core.dto.LispEnableDisable;
-import io.fd.vpp.jvpp.core.dto.LispEnableDisableReply;
-import io.fd.vpp.jvpp.core.future.FutureJVppCore;
/**
@@ -84,14 +84,14 @@ public class LispCustomizer extends FutureJVppCustomizer
private void enableDisableLisp(final boolean enable) throws VppBaseCallException, TimeoutException {
- final CompletionStage<LispEnableDisableReply> lispEnableDisableReplyCompletionStage =
- getFutureJVpp().lispEnableDisable(getRequest(enable));
- getReply(lispEnableDisableReplyCompletionStage.toCompletableFuture());
+ final CompletionStage<OneEnableDisableReply> oneEnableDisableReplyCompletionStage =
+ getFutureJVpp().oneEnableDisable(getRequest(enable));
+ getReply(oneEnableDisableReplyCompletionStage.toCompletableFuture());
}
- private LispEnableDisable getRequest(final boolean enable) {
- final LispEnableDisable lispEnableDisable = new LispEnableDisable();
- lispEnableDisable.isEn = booleanToByte(enable);
- return lispEnableDisable;
+ private OneEnableDisable getRequest(final boolean enable) {
+ final OneEnableDisable oneEnableDisable = new OneEnableDisable();
+ oneEnableDisable.isEn = booleanToByte(enable);
+ return oneEnableDisable;
}
}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/LocalMappingCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/LocalMappingCustomizer.java
index 494afd3cb..582a37756 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/LocalMappingCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/LocalMappingCustomizer.java
@@ -32,7 +32,7 @@ import io.fd.honeycomb.translate.spi.write.ListWriterCustomizer;
import io.fd.honeycomb.translate.write.WriteContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
import io.fd.vpp.jvpp.VppBaseCallException;
-import io.fd.vpp.jvpp.core.dto.LispAddDelLocalEid;
+import io.fd.vpp.jvpp.core.dto.OneAddDelLocalEid;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
@@ -116,7 +116,7 @@ public class LocalMappingCustomizer extends FutureJVppCustomizer
private void addDelMappingAndReply(boolean add, LocalMapping data, int vni) throws VppBaseCallException,
TimeoutException, UnsupportedEncodingException {
- LispAddDelLocalEid request = new LispAddDelLocalEid();
+ OneAddDelLocalEid request = new OneAddDelLocalEid();
request.isAdd = booleanToByte(add);
request.eid = getEidAsByteArray(data.getEid());
@@ -139,7 +139,7 @@ public class LocalMappingCustomizer extends FutureJVppCustomizer
"HMAC key type not specified").getIntValue();
}
- getReply(getFutureJVpp().lispAddDelLocalEid(request).toCompletableFuture());
+ getReply(getFutureJVpp().oneAddDelLocalEid(request).toCompletableFuture());
}
}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/LocatorSetCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/LocatorSetCustomizer.java
index 5a606bc37..04ca7262e 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/LocatorSetCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/LocatorSetCustomizer.java
@@ -30,7 +30,7 @@ import io.fd.hc2vpp.lisp.translate.util.CheckedLispCustomizer;
import io.fd.honeycomb.translate.spi.write.ListWriterCustomizer;
import io.fd.honeycomb.translate.write.WriteContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
-import io.fd.vpp.jvpp.core.dto.LispAddDelLocatorSet;
+import io.fd.vpp.jvpp.core.dto.OneAddDelLocatorSet;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import java.util.Collection;
import java.util.Collections;
@@ -146,11 +146,11 @@ public class LocatorSetCustomizer extends CheckedLispCustomizer
private int addDelLocatorSetAndReply(final boolean add, final String name, final InstanceIdentifier<LocatorSet> id)
throws WriteFailedException {
- LispAddDelLocatorSet addDelSet = new LispAddDelLocatorSet();
+ OneAddDelLocatorSet addDelSet = new OneAddDelLocatorSet();
addDelSet.isAdd = booleanToByte(add);
addDelSet.locatorSetName = name.getBytes(UTF_8);
- return getReplyForWrite(getFutureJVpp().lispAddDelLocatorSet(addDelSet).toCompletableFuture(), id).lsIndex;
+ return getReplyForWrite(getFutureJVpp().oneAddDelLocatorSet(addDelSet).toCompletableFuture(), id).lsIndex;
}
}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/MapRegisterCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/MapRegisterCustomizer.java
index 298b14358..ff306e51c 100644
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/MapRegisterCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/MapRegisterCustomizer.java
@@ -23,7 +23,7 @@ import io.fd.hc2vpp.lisp.translate.util.CheckedLispCustomizer;
import io.fd.honeycomb.translate.spi.write.WriterCustomizer;
import io.fd.honeycomb.translate.write.WriteContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
-import io.fd.vpp.jvpp.core.dto.LispMapRegisterEnableDisable;
+import io.fd.vpp.jvpp.core.dto.OneMapRegisterEnableDisable;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.map.register.grouping.MapRegister;
@@ -62,8 +62,8 @@ public class MapRegisterCustomizer extends CheckedLispCustomizer
private void enableDisableMapRegister(final boolean enable, @Nonnull final InstanceIdentifier<MapRegister> id,
@Nonnull final WriteContext context) throws WriteFailedException {
lispStateCheckService.checkLispEnabled(context);
- LispMapRegisterEnableDisable request = new LispMapRegisterEnableDisable();
+ OneMapRegisterEnableDisable request = new OneMapRegisterEnableDisable();
request.isEnabled = booleanToByte(enable);
- getReplyForWrite(getFutureJVpp().lispMapRegisterEnableDisable(request).toCompletableFuture(), id);
+ getReplyForWrite(getFutureJVpp().oneMapRegisterEnableDisable(request).toCompletableFuture(), id);
}
}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/MapRequestModeCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/MapRequestModeCustomizer.java
index d61cd0cfb..64e66b2d4 100644
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/MapRequestModeCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/MapRequestModeCustomizer.java
@@ -24,8 +24,8 @@ import io.fd.hc2vpp.lisp.translate.util.CheckedLispCustomizer;
import io.fd.honeycomb.translate.spi.write.WriterCustomizer;
import io.fd.honeycomb.translate.write.WriteContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
-import io.fd.vpp.jvpp.core.dto.LispMapRequestMode;
-import io.fd.vpp.jvpp.core.dto.LispMapRequestModeReply;
+import io.fd.vpp.jvpp.core.dto.OneMapRequestMode;
+import io.fd.vpp.jvpp.core.dto.OneMapRequestModeReply;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import java.util.concurrent.CompletableFuture;
import javax.annotation.Nonnull;
@@ -65,11 +65,11 @@ public class MapRequestModeCustomizer extends CheckedLispCustomizer
throw new UnsupportedOperationException("Map request mode cannot be deleted");
}
- private CompletableFuture<LispMapRequestModeReply> mapRequestModeRequestFuture(
+ private CompletableFuture<OneMapRequestModeReply> mapRequestModeRequestFuture(
@Nonnull final MapRequestMode mapRequestMode) {
- LispMapRequestMode request = new LispMapRequestMode();
+ OneMapRequestMode request = new OneMapRequestMode();
request.mode = (byte) checkNotNull(mapRequestMode.getMode(),
"Mode not specified").getIntValue();
- return getFutureJVpp().lispMapRequestMode(request).toCompletableFuture();
+ return getFutureJVpp().oneMapRequestMode(request).toCompletableFuture();
}
}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/MapResolverCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/MapResolverCustomizer.java
index 94b45ae21..934cc218a 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/MapResolverCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/MapResolverCustomizer.java
@@ -26,7 +26,7 @@ import io.fd.honeycomb.translate.spi.write.ListWriterCustomizer;
import io.fd.honeycomb.translate.write.WriteContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
import io.fd.vpp.jvpp.VppBaseCallException;
-import io.fd.vpp.jvpp.core.dto.LispAddDelMapResolver;
+import io.fd.vpp.jvpp.core.dto.OneAddDelMapResolver;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import java.util.concurrent.TimeoutException;
import javax.annotation.Nonnull;
@@ -87,7 +87,7 @@ public class MapResolverCustomizer extends CheckedLispCustomizer
private void addDelMapResolverAndReply(boolean add, MapResolver data) throws VppBaseCallException,
TimeoutException {
- LispAddDelMapResolver request = new LispAddDelMapResolver();
+ OneAddDelMapResolver request = new OneAddDelMapResolver();
request.isAdd = booleanToByte(add);
@@ -96,6 +96,6 @@ public class MapResolverCustomizer extends CheckedLispCustomizer
request.isIpv6 = booleanToByte(ipv6);
request.ipAddress = ipAddressToArray(ipv6, data.getIpAddress());
- getReply(getFutureJVpp().lispAddDelMapResolver(request).toCompletableFuture());
+ getReply(getFutureJVpp().oneAddDelMapResolver(request).toCompletableFuture());
}
}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/MapServerCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/MapServerCustomizer.java
index ec2b3b37a..6dc201516 100644
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/MapServerCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/MapServerCustomizer.java
@@ -23,7 +23,7 @@ import io.fd.hc2vpp.lisp.translate.util.CheckedLispCustomizer;
import io.fd.honeycomb.translate.spi.write.ListWriterCustomizer;
import io.fd.honeycomb.translate.write.WriteContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
-import io.fd.vpp.jvpp.core.dto.LispAddDelMapServer;
+import io.fd.vpp.jvpp.core.dto.OneAddDelMapServer;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
@@ -66,7 +66,7 @@ public class MapServerCustomizer extends CheckedLispCustomizer
private void addDelMapServer(final boolean add,
@Nonnull final InstanceIdentifier<MapServer> id,
@Nonnull final MapServer data) throws WriteFailedException {
- LispAddDelMapServer request = new LispAddDelMapServer();
+ OneAddDelMapServer request = new OneAddDelMapServer();
final IpAddress ipAddress = data.getIpAddress();
@@ -74,6 +74,6 @@ public class MapServerCustomizer extends CheckedLispCustomizer
request.isIpv6 = booleanToByte(isIpv6(ipAddress));
request.ipAddress = ipAddressToArray(ipAddress);
- getReplyForWrite(getFutureJVpp().lispAddDelMapServer(request).toCompletableFuture(), id);
+ getReplyForWrite(getFutureJVpp().oneAddDelMapServer(request).toCompletableFuture(), id);
}
}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/PetrCfgCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/PetrCfgCustomizer.java
index 728de8fca..6c985ff0e 100644
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/PetrCfgCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/PetrCfgCustomizer.java
@@ -25,7 +25,7 @@ import io.fd.hc2vpp.lisp.translate.util.CheckedLispCustomizer;
import io.fd.honeycomb.translate.spi.write.WriterCustomizer;
import io.fd.honeycomb.translate.write.WriteContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
-import io.fd.vpp.jvpp.core.dto.LispUsePetr;
+import io.fd.vpp.jvpp.core.dto.OneUsePetr;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
@@ -68,18 +68,18 @@ public class PetrCfgCustomizer extends CheckedLispCustomizer
}
private void enablePetrCfg(@Nonnull final InstanceIdentifier<PetrCfg> id, @Nonnull final PetrCfg data) throws WriteFailedException {
- LispUsePetr request = new LispUsePetr();
+ OneUsePetr request = new OneUsePetr();
final IpAddress petrAddress = checkNotNull(data.getPetrAddress(), "PETR address not defined");
request.isAdd = 1;
request.address = ipAddressToArray(petrAddress);
request.isIp4 = booleanToByte(!isIpv6(petrAddress));
- getReplyForWrite(getFutureJVpp().lispUsePetr(request).toCompletableFuture(), id);
+ getReplyForWrite(getFutureJVpp().oneUsePetr(request).toCompletableFuture(), id);
}
private void disablePetrCfg(@Nonnull final InstanceIdentifier<PetrCfg> id) throws WriteFailedException {
- LispUsePetr request = new LispUsePetr();
+ OneUsePetr request = new OneUsePetr();
request.isAdd = 0;
- getReplyForDelete(getFutureJVpp().lispUsePetr(request).toCompletableFuture(), id);
+ getReplyForDelete(getFutureJVpp().oneUsePetr(request).toCompletableFuture(), id);
}
}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/PitrCfgCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/PitrCfgCustomizer.java
index 39986e152..6944940c1 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/PitrCfgCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/PitrCfgCustomizer.java
@@ -27,7 +27,7 @@ import io.fd.honeycomb.translate.spi.write.WriterCustomizer;
import io.fd.honeycomb.translate.write.WriteContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
import io.fd.vpp.jvpp.VppBaseCallException;
-import io.fd.vpp.jvpp.core.dto.LispPitrSetLocatorSet;
+import io.fd.vpp.jvpp.core.dto.OnePitrSetLocatorSet;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import java.util.concurrent.TimeoutException;
import javax.annotation.Nonnull;
@@ -100,11 +100,11 @@ public class PitrCfgCustomizer extends CheckedLispCustomizer
return;
}
- LispPitrSetLocatorSet request = new LispPitrSetLocatorSet();
+ OnePitrSetLocatorSet request = new OnePitrSetLocatorSet();
request.isAdd = booleanToByte(add);
request.lsName = data.getLocatorSet().getBytes(UTF_8);
- getReply(getFutureJVpp().lispPitrSetLocatorSet(request).toCompletableFuture());
+ getReply(getFutureJVpp().onePitrSetLocatorSet(request).toCompletableFuture());
}
}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/RemoteMappingCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/RemoteMappingCustomizer.java
index 423625d97..056dcde1d 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/RemoteMappingCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/RemoteMappingCustomizer.java
@@ -17,6 +17,12 @@
package io.fd.hc2vpp.lisp.translate.write;
+import static com.google.common.base.Preconditions.checkArgument;
+import static com.google.common.base.Preconditions.checkNotNull;
+import static com.google.common.base.Preconditions.checkState;
+import static io.fd.hc2vpp.lisp.translate.write.RemoteMappingCustomizer.LocatorListType.NEGATIVE;
+import static io.fd.hc2vpp.lisp.translate.write.RemoteMappingCustomizer.LocatorListType.POSITIVE;
+
import com.google.common.base.Preconditions;
import io.fd.hc2vpp.common.translate.util.AddressTranslator;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
@@ -28,9 +34,13 @@ import io.fd.honeycomb.translate.spi.write.ListWriterCustomizer;
import io.fd.honeycomb.translate.write.WriteContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
import io.fd.vpp.jvpp.VppBaseCallException;
-import io.fd.vpp.jvpp.core.dto.LispAddDelRemoteMapping;
+import io.fd.vpp.jvpp.core.dto.OneAddDelRemoteMapping;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
-import io.fd.vpp.jvpp.core.types.RemoteLocator;
+import io.fd.vpp.jvpp.core.types.OneRemoteLocator;
+import java.io.IOException;
+import java.util.Optional;
+import java.util.concurrent.TimeoutException;
+import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.MapReplyAction;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.MappingId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.dp.subtable.grouping.remote.mappings.RemoteMapping;
@@ -42,15 +52,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.eid.table.grouping.eid.table.VniTable;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import javax.annotation.Nonnull;
-import java.io.IOException;
-import java.util.Optional;
-import java.util.concurrent.TimeoutException;
-
-import static com.google.common.base.Preconditions.*;
-import static io.fd.hc2vpp.lisp.translate.write.RemoteMappingCustomizer.LocatorListType.NEGATIVE;
-import static io.fd.hc2vpp.lisp.translate.write.RemoteMappingCustomizer.LocatorListType.POSITIVE;
-
/**
* Customizer for {@link RemoteMapping}
@@ -119,7 +120,7 @@ public class RemoteMappingCustomizer extends FutureJVppCustomizer
private void addDelRemoteMappingAndReply(boolean add, RemoteMapping data, int vni)
throws VppBaseCallException, TimeoutException, IOException {
- LispAddDelRemoteMapping request = new LispAddDelRemoteMapping();
+ OneAddDelRemoteMapping request = new OneAddDelRemoteMapping();
request.isAdd = booleanToByte(add);
request.vni = vni;
@@ -133,13 +134,13 @@ public class RemoteMappingCustomizer extends FutureJVppCustomizer
.equals(resolveType(data.getLocatorList()))) {
request.action = (byte) extractAction(data.getLocatorList()).getIntValue();
} else {
- Rlocs rlocs = extractRemoteLocators(data.getLocatorList());
+ Rlocs rlocs = extractOneRemoteLocators(data.getLocatorList());
checkArgument(rlocs != null, "No remote locators set for Positive mapping");
request.rlocs = rlocs.getLocator().stream()
.map(locator -> {
- RemoteLocator remoteLocator = new RemoteLocator();
+ OneRemoteLocator remoteLocator = new OneRemoteLocator();
remoteLocator.addr = ipAddressToArray(locator.getAddress());
remoteLocator.isIp4 = booleanToByte(!isIpv6(locator.getAddress()));
Optional.ofNullable(locator.getPriority())
@@ -148,11 +149,11 @@ public class RemoteMappingCustomizer extends FutureJVppCustomizer
.ifPresent(weight -> remoteLocator.weight = weight.byteValue());
return remoteLocator;
- }).toArray(RemoteLocator[]::new);
+ }).toArray(OneRemoteLocator[]::new);
request.rlocNum = Integer.valueOf(rlocs.getLocator().size()).byteValue();
}
- getReply(getFutureJVpp().lispAddDelRemoteMapping(request).toCompletableFuture());
+ getReply(getFutureJVpp().oneAddDelRemoteMapping(request).toCompletableFuture());
}
private static LocatorListType resolveType(LocatorList locatorList) {
@@ -173,7 +174,7 @@ public class RemoteMappingCustomizer extends FutureJVppCustomizer
return ((NegativeMapping) locatorList).getMapReply().getMapReplyAction();
}
- private static Rlocs extractRemoteLocators(LocatorList locatorList) {
+ private static Rlocs extractOneRemoteLocators(LocatorList locatorList) {
checkNotNull(locatorList, "Locator List cannot be null");
Preconditions.checkArgument(POSITIVE.equals(resolveType(locatorList)),
"RLocs can be extracted only from Positive Mapping");
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/RlocProbeCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/RlocProbeCustomizer.java
index e60563454..e984a16d1 100644
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/RlocProbeCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/RlocProbeCustomizer.java
@@ -23,7 +23,7 @@ import io.fd.hc2vpp.lisp.translate.util.CheckedLispCustomizer;
import io.fd.honeycomb.translate.spi.write.WriterCustomizer;
import io.fd.honeycomb.translate.write.WriteContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
-import io.fd.vpp.jvpp.core.dto.LispRlocProbeEnableDisable;
+import io.fd.vpp.jvpp.core.dto.OneRlocProbeEnableDisable;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.rloc.probing.grouping.RlocProbe;
@@ -63,10 +63,10 @@ public class RlocProbeCustomizer extends CheckedLispCustomizer
}
private void enableDisableRlocProbe(final boolean enable, @Nonnull final InstanceIdentifier<RlocProbe> id) throws WriteFailedException {
- LispRlocProbeEnableDisable request = new LispRlocProbeEnableDisable();
+ OneRlocProbeEnableDisable request = new OneRlocProbeEnableDisable();
request.isEnabled = booleanToByte(enable);
- getReplyForWrite(getFutureJVpp().lispRlocProbeEnableDisable(request).toCompletableFuture(), id);
+ getReplyForWrite(getFutureJVpp().oneRlocProbeEnableDisable(request).toCompletableFuture(), id);
}
}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/VniTableCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/VniTableCustomizer.java
index 05956d998..e6fe3db45 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/VniTableCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/VniTableCustomizer.java
@@ -30,8 +30,6 @@ import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.eid.table.grouping.eid.table.VniTable;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.eid.table.grouping.eid.table.VniTableKey;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
/**
@@ -40,8 +38,6 @@ import org.slf4j.LoggerFactory;
*/
public class VniTableCustomizer extends CheckedLispCustomizer implements ListWriterCustomizer<VniTable, VniTableKey> {
- private static final Logger LOG = LoggerFactory.getLogger(VniTableCustomizer.class);
-
public VniTableCustomizer(@Nonnull final FutureJVppCore futureJvpp,
@Nonnull final LispStateCheckService lispStateCheckService) {
super(futureJvpp, lispStateCheckService);
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/trait/SubtableWriter.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/trait/SubtableWriter.java
index df285f7da..cb6445804 100644
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/trait/SubtableWriter.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/trait/SubtableWriter.java
@@ -21,6 +21,9 @@ import static com.google.common.base.Preconditions.checkNotNull;
import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
+import io.fd.vpp.jvpp.VppBaseCallException;
+import io.fd.vpp.jvpp.core.dto.OneEidTableAddDelMap;
+import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import java.util.concurrent.TimeoutException;
import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.eid.table.grouping.eid.table.VniTable;
@@ -28,9 +31,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.eid.table.grouping.eid.table.vni.table.VrfSubtable;
import org.opendaylight.yangtools.yang.binding.ChildOf;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import io.fd.vpp.jvpp.VppBaseCallException;
-import io.fd.vpp.jvpp.core.dto.LispEidTableAddDelMap;
-import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import org.slf4j.Logger;
/**
@@ -64,14 +64,14 @@ public interface SubtableWriter extends ByteDataTranslator, JvppReplyConsumer {
checkNotNull(vppApi, "VPP Api refference cannot be null");
- LispEidTableAddDelMap request = new LispEidTableAddDelMap();
+ OneEidTableAddDelMap request = new OneEidTableAddDelMap();
request.isAdd = booleanToByte(addDel);
request.vni = vni;
request.dpTable = tableId;
request.isL2 = booleanToByte(isL2);
- getReply(vppApi.lispEidTableAddDelMap(request).toCompletableFuture());
+ getReply(vppApi.oneEidTableAddDelMap(request).toCompletableFuture());
}
default int extractVni(@Nonnull final InstanceIdentifier<? extends ChildOf<VniTable>> id) {