summaryrefslogtreecommitdiffstats
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
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>
-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
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/AdjacencyCustomizerTest.java14
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/BridgeDomainSubtableCustomizerTest.java8
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/InterfaceCustomizerTest.java18
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/ItrRemoteLocatorSetCustomizerTest.java32
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/LispStateCustomizerTest.java22
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/LocalMappingCustomizerTest.java20
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/LocatorSetCustomizerTest.java12
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/MapRegisterCustomizerTest.java6
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/MapRequestModeCustomizerTest.java6
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/MapResolverCustomizerTest.java12
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/MapServerCustomizerTest.java18
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/PetrCfgCustomizerTest.java10
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/PitrCfgCustomizerTest.java6
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/RemoteMappingCustomizerTest.java46
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/RlocProbeCustomizerTest.java6
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/VniTableCustomizerTest.java28
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/VrfSubtableCustomizerTest.java6
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/trait/SubtableReaderTestCase.java41
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/service/LispStateCheckServiceImplTest.java8
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/AdjacencyCustomizerTest.java24
-rwxr-xr-xlisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/InterfaceCustomizerTest.java16
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/ItrRemoteLocatorSetCustomizerTest.java22
-rwxr-xr-xlisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/LispCustomizerTest.java24
-rwxr-xr-xlisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/LocalMappingCustomizerTest.java24
-rwxr-xr-xlisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/LocatorSetCustomizerTest.java42
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/MapRegisterCustomizerTest.java14
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/MapRequestModeCustomizerTest.java12
-rwxr-xr-xlisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/MapResolverCustomizerTest.java26
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/MapServerCustomizerTest.java14
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/PetrCfgCustomizerTest.java16
-rwxr-xr-xlisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/PitrCfgCustomizerTest.java24
-rwxr-xr-xlisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/RemoteMappingCustomizerTest.java63
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/RlocProbeCustomizerTest.java14
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/trait/SubtableWriterTestCase.java16
-rw-r--r--vpp-common/vpp-common-integration/src/main/java/io/fd/hc2vpp/common/integration/VppCommonModule.java5
73 files changed, 661 insertions, 671 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) {
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/AdjacencyCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/AdjacencyCustomizerTest.java
index 264fe6ccb..ad65a7604 100644
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/AdjacencyCustomizerTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/AdjacencyCustomizerTest.java
@@ -37,8 +37,8 @@ import io.fd.hc2vpp.lisp.translate.util.EidMetadataProvider;
import io.fd.hc2vpp.lisp.util.AdjacencyMappingContextTestHelper;
import io.fd.hc2vpp.lisp.util.EidMappingContextHelper;
import io.fd.honeycomb.translate.spi.read.ReaderCustomizer;
-import io.fd.vpp.jvpp.core.dto.LispAdjacenciesGetReply;
-import io.fd.vpp.jvpp.core.types.LispAdjacency;
+import io.fd.vpp.jvpp.core.dto.OneAdjacenciesGetReply;
+import io.fd.vpp.jvpp.core.types.OneAdjacency;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
@@ -122,7 +122,7 @@ public class AdjacencyCustomizerTest
private void mockApi() {
- LispAdjacency adjacencyOne = new LispAdjacency();
+ OneAdjacency adjacencyOne = new OneAdjacency();
adjacencyOne.eidType = 0;
adjacencyOne.leid = new byte[]{-64, -88, 2, 1};
adjacencyOne.leidPrefixLen = 32;
@@ -130,16 +130,16 @@ public class AdjacencyCustomizerTest
adjacencyOne.reidPrefixLen = 32;
- LispAdjacency adjacencyTwo = new LispAdjacency();
+ OneAdjacency adjacencyTwo = new OneAdjacency();
adjacencyTwo.eidType = 0;
adjacencyTwo.leid = new byte[]{-64, -88, 2, 2};
adjacencyTwo.leidPrefixLen = 32;
adjacencyTwo.reid = new byte[]{-64, -88, 2, 4};
adjacencyTwo.reidPrefixLen = 32;
- LispAdjacenciesGetReply reply = new LispAdjacenciesGetReply();
- reply.adjacencies = new LispAdjacency[]{adjacencyOne, adjacencyTwo};
+ OneAdjacenciesGetReply reply = new OneAdjacenciesGetReply();
+ reply.adjacencies = new OneAdjacency[]{adjacencyOne, adjacencyTwo};
- when(api.lispAdjacenciesGet(any())).thenReturn(future(reply));
+ when(api.oneAdjacenciesGet(any())).thenReturn(future(reply));
}
} \ No newline at end of file
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/BridgeDomainSubtableCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/BridgeDomainSubtableCustomizerTest.java
index d0f9f0023..64ef4e392 100644
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/BridgeDomainSubtableCustomizerTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/BridgeDomainSubtableCustomizerTest.java
@@ -24,10 +24,10 @@ import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
+import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.hc2vpp.lisp.translate.read.trait.SubtableReaderTestCase;
import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.honeycomb.translate.spi.read.ReaderCustomizer;
-import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.vpp.jvpp.VppCallbackException;
import org.junit.Test;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.eid.table.grouping.EidTable;
@@ -63,7 +63,7 @@ public class BridgeDomainSubtableCustomizerTest
BridgeDomainSubtableBuilder builder = new BridgeDomainSubtableBuilder();
customizer.readCurrentAttributes(validId, builder, ctx);
- verifyLispEidTableMapDumpCalled(L2);
+ verifyOneEidTableMapDumpCalled(L2);
final BridgeDomainSubtable subtable = builder.build();
assertNotNull(subtable);
@@ -77,7 +77,7 @@ public class BridgeDomainSubtableCustomizerTest
BridgeDomainSubtableBuilder builder = new BridgeDomainSubtableBuilder();
customizer.readCurrentAttributes(validId, builder, ctx);
- verifyLispEidTableMapDumpCalled(L2);
+ verifyOneEidTableMapDumpCalled(L2);
final BridgeDomainSubtable subtable = builder.build();
assertNotNull(subtable);
@@ -93,7 +93,7 @@ public class BridgeDomainSubtableCustomizerTest
} catch (ReadFailedException e) {
assertTrue(e.getCause() instanceof VppCallbackException);
assertNull(builder.getBridgeDomainRef());
- verifyLispEidTableMapDumpNotCalled();
+ verifyOneEidTableMapDumpNotCalled();
return;
}
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/InterfaceCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/InterfaceCustomizerTest.java
index b3e12e684..e4d2da48b 100644
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/InterfaceCustomizerTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/InterfaceCustomizerTest.java
@@ -20,10 +20,12 @@ import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.when;
import com.google.common.collect.ImmutableList;
+import io.fd.hc2vpp.common.test.read.ListReaderCustomizerTest;
+import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.honeycomb.translate.spi.read.ReaderCustomizer;
-import io.fd.hc2vpp.common.translate.util.NamingContext;
-import io.fd.hc2vpp.common.test.read.ListReaderCustomizerTest;
+import io.fd.vpp.jvpp.core.dto.OneLocatorDetails;
+import io.fd.vpp.jvpp.core.dto.OneLocatorDetailsReplyDump;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
@@ -36,8 +38,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.InterfaceBuilder;
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.core.dto.LispLocatorDetails;
-import io.fd.vpp.jvpp.core.dto.LispLocatorDetailsReplyDump;
public class InterfaceCustomizerTest
extends ListReaderCustomizerTest<Interface, InterfaceKey, InterfaceBuilder> {
@@ -60,9 +60,9 @@ public class InterfaceCustomizerTest
}
private void defineDumpData() {
- final LispLocatorDetailsReplyDump dump = new LispLocatorDetailsReplyDump();
+ final OneLocatorDetailsReplyDump dump = new OneLocatorDetailsReplyDump();
- final LispLocatorDetails detail1 = new LispLocatorDetails();
+ final OneLocatorDetails detail1 = new OneLocatorDetails();
detail1.swIfIndex = 1;
detail1.ipAddress = new byte[]{-64, -88, 2, 1};
detail1.isIpv6 = 0;
@@ -70,7 +70,7 @@ public class InterfaceCustomizerTest
detail1.priority = 1;
detail1.weight = 2;
- final LispLocatorDetails detail2 = new LispLocatorDetails();
+ final OneLocatorDetails detail2 = new OneLocatorDetails();
detail2.swIfIndex = 2;
detail2.ipAddress = new byte[]{-64, -88, 2, 2};
detail2.isIpv6 = 0;
@@ -78,9 +78,9 @@ public class InterfaceCustomizerTest
detail2.priority = 2;
detail2.weight = 3;
- dump.lispLocatorDetails = ImmutableList.of(detail1, detail2);
+ dump.oneLocatorDetails = ImmutableList.of(detail1, detail2);
- when(api.lispLocatorDump(Mockito.any())).thenReturn(future(dump));
+ when(api.oneLocatorDump(Mockito.any())).thenReturn(future(dump));
}
private void defineMappings() {
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/ItrRemoteLocatorSetCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/ItrRemoteLocatorSetCustomizerTest.java
index 1ae56ac49..dad3323cb 100644
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/ItrRemoteLocatorSetCustomizerTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/ItrRemoteLocatorSetCustomizerTest.java
@@ -29,8 +29,8 @@ import static org.mockito.Mockito.when;
import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.honeycomb.translate.spi.read.ReaderCustomizer;
import io.fd.vpp.jvpp.VppCallbackException;
-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 java.nio.charset.StandardCharsets;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
@@ -84,7 +84,7 @@ public class ItrRemoteLocatorSetCustomizerTest
assertNotNull(builder);
assertEquals(EXPECTED_LOCATOR_SET_NAME, builder.getRemoteLocatorSetName());
- verifyLispGetMapRequestItrRlocsInvokedOnce();
+ verifyOneGetMapRequestItrRlocsInvokedOnce();
}
@Test
@@ -104,7 +104,7 @@ public class ItrRemoteLocatorSetCustomizerTest
assertNotNull(builder);
assertNull(builder.getRemoteLocatorSetName());
- verifyLispGetMapRequestItrRlocsInvokedOnce();
+ verifyOneGetMapRequestItrRlocsInvokedOnce();
return;
}
@@ -123,42 +123,42 @@ public class ItrRemoteLocatorSetCustomizerTest
private void doReturnValidDataOnDump() {
- LispGetMapRequestItrRlocsReply reply = new LispGetMapRequestItrRlocsReply();
+ OneGetMapRequestItrRlocsReply reply = new OneGetMapRequestItrRlocsReply();
reply.locatorSetName = EXPECTED_LOCATOR_SET_NAME.getBytes(StandardCharsets.UTF_8);
- when(api.lispGetMapRequestItrRlocs(any(LispGetMapRequestItrRlocs.class)))
+ when(api.oneGetMapRequestItrRlocs(any(OneGetMapRequestItrRlocs.class)))
.thenReturn(CompletableFuture.completedFuture(reply));
}
private void doReturnNullDataOnDump() {
- when(api.lispGetMapRequestItrRlocs(any(LispGetMapRequestItrRlocs.class)))
+ when(api.oneGetMapRequestItrRlocs(any(OneGetMapRequestItrRlocs.class)))
.thenReturn(CompletableFuture.completedFuture(null));
}
private void doReturnEmptyDataOnDump() {
- when(api.lispGetMapRequestItrRlocs(any(LispGetMapRequestItrRlocs.class)))
- .thenReturn(CompletableFuture.completedFuture(new LispGetMapRequestItrRlocsReply()));
+ when(api.oneGetMapRequestItrRlocs(any(OneGetMapRequestItrRlocs.class)))
+ .thenReturn(CompletableFuture.completedFuture(new OneGetMapRequestItrRlocsReply()));
}
private void doThrowExceptionOnDump() {
- when(api.lispGetMapRequestItrRlocs(any(LispGetMapRequestItrRlocs.class))).
- thenReturn(new CompletableFuture<LispGetMapRequestItrRlocsReply>() {
+ when(api.oneGetMapRequestItrRlocs(any(OneGetMapRequestItrRlocs.class))).
+ thenReturn(new CompletableFuture<OneGetMapRequestItrRlocsReply>() {
@Override
- public LispGetMapRequestItrRlocsReply get(final long l, final TimeUnit timeUnit)
+ public OneGetMapRequestItrRlocsReply get(final long l, final TimeUnit timeUnit)
throws InterruptedException, ExecutionException, TimeoutException {
- throw new ExecutionException(new VppCallbackException("lispGetMapRequestItrRlocs", 1, -2));
+ throw new ExecutionException(new VppCallbackException("oneGetMapRequestItrRlocs", 1, -2));
}
});
}
- private void verifyLispGetMapRequestItrRlocsInvokedOnce() {
- verify(api, times(1)).lispGetMapRequestItrRlocs(any(LispGetMapRequestItrRlocs.class));
+ private void verifyOneGetMapRequestItrRlocsInvokedOnce() {
+ verify(api, times(1)).oneGetMapRequestItrRlocs(any(OneGetMapRequestItrRlocs.class));
}
private void verifyInvalidDataCase(final ItrRemoteLocatorSetBuilder builder) {
assertNotNull(builder);
assertNull(builder.getRemoteLocatorSetName());
- verifyLispGetMapRequestItrRlocsInvokedOnce();
+ verifyOneGetMapRequestItrRlocsInvokedOnce();
}
} \ No newline at end of file
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/LispStateCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/LispStateCustomizerTest.java
index e253b324a..3ceccc591 100644
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/LispStateCustomizerTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/LispStateCustomizerTest.java
@@ -34,9 +34,9 @@ import io.fd.honeycomb.test.tools.annotations.InjectablesProcessor;
import io.fd.honeycomb.test.tools.annotations.SchemaContextProvider;
import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.honeycomb.translate.spi.read.ReaderCustomizer;
-import io.fd.vpp.jvpp.core.dto.LispLocatorSetDetails;
-import io.fd.vpp.jvpp.core.dto.LispLocatorSetDetailsReplyDump;
-import io.fd.vpp.jvpp.core.dto.ShowLispStatusReply;
+import io.fd.vpp.jvpp.core.dto.OneLocatorSetDetails;
+import io.fd.vpp.jvpp.core.dto.OneLocatorSetDetailsReplyDump;
+import io.fd.vpp.jvpp.core.dto.ShowOneStatusReply;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import org.junit.Before;
@@ -75,10 +75,10 @@ public class LispStateCustomizerTest extends InitializingReaderCustomizerTest<Li
@Before
public void setUp() {
identifier = InstanceIdentifier.create(LispState.class);
- final ShowLispStatusReply reply = new ShowLispStatusReply();
+ final ShowOneStatusReply reply = new ShowOneStatusReply();
reply.featureStatus = 1;
- when(api.showLispStatus(Mockito.any())).thenReturn(future(reply));
+ when(api.showOneStatus(Mockito.any())).thenReturn(future(reply));
locatorSetContext = new NamingContext("loc-set", "locator-set-context");
}
@@ -103,7 +103,7 @@ public class LispStateCustomizerTest extends InitializingReaderCustomizerTest<Li
final InstanceIdentifier<LispState> operationalPath = InstanceIdentifier.create(LispState.class);
final InstanceIdentifier<Lisp> configPath = InstanceIdentifier.create(Lisp.class);
- when(api.lispLocatorSetDump(any())).thenReturn(future(new LispLocatorSetDetailsReplyDump()));
+ when(api.oneLocatorSetDump(any())).thenReturn(future(new OneLocatorSetDetailsReplyDump()));
invokeInitTest(operationalPath, operational, configPath, config);
}
@@ -149,17 +149,17 @@ public class LispStateCustomizerTest extends InitializingReaderCustomizerTest<Li
}
private void mockLocatorSetDump() {
- LispLocatorSetDetailsReplyDump replyDump = new LispLocatorSetDetailsReplyDump();
- LispLocatorSetDetails locator1 = new LispLocatorSetDetails();
+ OneLocatorSetDetailsReplyDump replyDump = new OneLocatorSetDetailsReplyDump();
+ OneLocatorSetDetails locator1 = new OneLocatorSetDetails();
locator1.lsIndex = 0;
locator1.lsName = "loc_1".getBytes(StandardCharsets.UTF_8);
- LispLocatorSetDetails locator2 = new LispLocatorSetDetails();
+ OneLocatorSetDetails locator2 = new OneLocatorSetDetails();
locator2.lsIndex = 1;
locator2.lsName = "loc_2".getBytes(StandardCharsets.UTF_8);
- replyDump.lispLocatorSetDetails = Arrays.asList(locator1, locator2);
+ replyDump.oneLocatorSetDetails = Arrays.asList(locator1, locator2);
- when(api.lispLocatorSetDump(any())).thenReturn(future(replyDump));
+ when(api.oneLocatorSetDump(any())).thenReturn(future(replyDump));
}
@Override
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/LocalMappingCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/LocalMappingCustomizerTest.java
index 43ec43bec..53fbc568b 100644
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/LocalMappingCustomizerTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/LocalMappingCustomizerTest.java
@@ -30,8 +30,8 @@ import io.fd.hc2vpp.lisp.translate.util.EidTranslator;
import io.fd.honeycomb.translate.MappingContext;
import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.honeycomb.translate.spi.read.ReaderCustomizer;
-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 java.nio.charset.StandardCharsets;
import java.util.List;
import org.junit.Test;
@@ -89,8 +89,8 @@ public class LocalMappingCustomizerTest extends
}
private void defineDumpData() {
- LispEidTableDetailsReplyDump replyDump = new LispEidTableDetailsReplyDump();
- LispEidTableDetails detail = new LispEidTableDetails();
+ OneEidTableDetailsReplyDump replyDump = new OneEidTableDetailsReplyDump();
+ OneEidTableDetails detail = new OneEidTableDetails();
detail.action = 0;
detail.authoritative = 1;
detail.context = 4;
@@ -104,13 +104,13 @@ public class LocalMappingCustomizerTest extends
detail.key = "abcdefgh".getBytes(StandardCharsets.UTF_8);
detail.keyId = 1;
- replyDump.lispEidTableDetails = ImmutableList.of(detail);
- when(api.lispEidTableDump(any())).thenReturn(future(replyDump));
+ replyDump.oneEidTableDetails = ImmutableList.of(detail);
+ when(api.oneEidTableDump(any())).thenReturn(future(replyDump));
}
private void defineDumpDataNoHmacKey() {
- LispEidTableDetailsReplyDump replyDump = new LispEidTableDetailsReplyDump();
- LispEidTableDetails detail = new LispEidTableDetails();
+ OneEidTableDetailsReplyDump replyDump = new OneEidTableDetailsReplyDump();
+ OneEidTableDetails detail = new OneEidTableDetails();
detail.action = 0;
detail.authoritative = 1;
detail.context = 4;
@@ -122,8 +122,8 @@ public class LocalMappingCustomizerTest extends
detail.ttl = 7;
detail.vni = 12;
- replyDump.lispEidTableDetails = ImmutableList.of(detail);
- when(api.lispEidTableDump(any())).thenReturn(future(replyDump));
+ replyDump.oneEidTableDetails = ImmutableList.of(detail);
+ when(api.oneEidTableDump(any())).thenReturn(future(replyDump));
}
private void defineMappings() {
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/LocatorSetCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/LocatorSetCustomizerTest.java
index 419173857..8da35d332 100644
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/LocatorSetCustomizerTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/LocatorSetCustomizerTest.java
@@ -25,8 +25,8 @@ import com.google.common.collect.ImmutableList;
import io.fd.honeycomb.test.tools.HoneycombTestRunner;
import io.fd.honeycomb.test.tools.annotations.InjectTestData;
import io.fd.honeycomb.translate.spi.read.ReaderCustomizer;
-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 java.nio.charset.StandardCharsets;
import java.util.List;
import org.junit.Before;
@@ -70,15 +70,15 @@ public class LocatorSetCustomizerTest
}
private void defineDumpData() {
- LispLocatorSetDetailsReplyDump dump = new LispLocatorSetDetailsReplyDump();
- LispLocatorSetDetails detail = new LispLocatorSetDetails();
+ OneLocatorSetDetailsReplyDump dump = new OneLocatorSetDetailsReplyDump();
+ OneLocatorSetDetails detail = new OneLocatorSetDetails();
detail.context = 4;
detail.lsName = "loc-set".getBytes(StandardCharsets.UTF_8);
detail.lsIndex = 1;
- dump.lispLocatorSetDetails = ImmutableList.of(detail);
+ dump.oneLocatorSetDetails = ImmutableList.of(detail);
- when(api.lispLocatorSetDump(any())).thenReturn(future(dump));
+ when(api.oneLocatorSetDump(any())).thenReturn(future(dump));
}
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/MapRegisterCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/MapRegisterCustomizerTest.java
index 1b582cd4d..083ac6345 100644
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/MapRegisterCustomizerTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/MapRegisterCustomizerTest.java
@@ -21,7 +21,7 @@ import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.when;
import io.fd.honeycomb.translate.spi.read.ReaderCustomizer;
-import io.fd.vpp.jvpp.core.dto.ShowLispMapRegisterStateReply;
+import io.fd.vpp.jvpp.core.dto.ShowOneMapRegisterStateReply;
import org.junit.Before;
import org.junit.Test;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.lisp.feature.data.grouping.LispFeatureDataBuilder;
@@ -40,9 +40,9 @@ public class MapRegisterCustomizerTest extends LispInitializingReaderCustomizerT
@Override
@Before
public void setUp() throws Exception {
- final ShowLispMapRegisterStateReply reply = new ShowLispMapRegisterStateReply();
+ final ShowOneMapRegisterStateReply reply = new ShowOneMapRegisterStateReply();
reply.isEnabled = 1;
- when(api.showLispMapRegisterState(any())).thenReturn(future(reply));
+ when(api.showOneMapRegisterState(any())).thenReturn(future(reply));
mockLispEnabled();
}
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/MapRequestModeCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/MapRequestModeCustomizerTest.java
index 6479f992a..d0e938ab3 100644
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/MapRequestModeCustomizerTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/MapRequestModeCustomizerTest.java
@@ -22,7 +22,7 @@ import static org.mockito.Mockito.when;
import static org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.MapRequestMode.DestinationOnly;
import io.fd.honeycomb.translate.spi.read.ReaderCustomizer;
-import io.fd.vpp.jvpp.core.dto.ShowLispMapRequestModeReply;
+import io.fd.vpp.jvpp.core.dto.ShowOneMapRequestModeReply;
import org.junit.Before;
import org.junit.Test;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.lisp.feature.data.grouping.LispFeatureDataBuilder;
@@ -41,9 +41,9 @@ public class MapRequestModeCustomizerTest extends LispInitializingReaderCustomiz
@Override
@Before
public void setUp() throws Exception {
- final ShowLispMapRequestModeReply reply = new ShowLispMapRequestModeReply();
+ final ShowOneMapRequestModeReply reply = new ShowOneMapRequestModeReply();
reply.mode = ((byte) DestinationOnly.getIntValue());
- when(api.showLispMapRequestMode(any())).thenReturn(future(reply));
+ when(api.showOneMapRequestMode(any())).thenReturn(future(reply));
mockLispEnabled();
}
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/MapResolverCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/MapResolverCustomizerTest.java
index e4a0d9990..715fb58ea 100644
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/MapResolverCustomizerTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/MapResolverCustomizerTest.java
@@ -23,8 +23,8 @@ import static org.mockito.Mockito.when;
import com.google.common.collect.ImmutableList;
import io.fd.honeycomb.translate.spi.read.ReaderCustomizer;
-import io.fd.vpp.jvpp.core.dto.LispMapResolverDetails;
-import io.fd.vpp.jvpp.core.dto.LispMapResolverDetailsReplyDump;
+import io.fd.vpp.jvpp.core.dto.OneMapResolverDetails;
+import io.fd.vpp.jvpp.core.dto.OneMapResolverDetailsReplyDump;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
@@ -84,15 +84,15 @@ public class MapResolverCustomizerTest
}
private void defineDumpData() {
- final LispMapResolverDetailsReplyDump replyDump = new LispMapResolverDetailsReplyDump();
- final LispMapResolverDetails detail = new LispMapResolverDetails();
+ final OneMapResolverDetailsReplyDump replyDump = new OneMapResolverDetailsReplyDump();
+ final OneMapResolverDetails detail = new OneMapResolverDetails();
detail.context = 5;
detail.ipAddress = new byte[]{1, 2, -88, -64};
detail.isIpv6 = 0;
- replyDump.lispMapResolverDetails = ImmutableList.of(detail);
+ replyDump.oneMapResolverDetails = ImmutableList.of(detail);
- when(api.lispMapResolverDump(any())).thenReturn(future(replyDump));
+ when(api.oneMapResolverDump(any())).thenReturn(future(replyDump));
}
@Override
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/MapServerCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/MapServerCustomizerTest.java
index ace07e078..49de4d569 100644
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/MapServerCustomizerTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/MapServerCustomizerTest.java
@@ -24,9 +24,9 @@ import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.when;
import io.fd.honeycomb.translate.spi.read.ReaderCustomizer;
-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 java.util.Arrays;
import java.util.List;
import org.junit.Before;
@@ -60,24 +60,24 @@ public class MapServerCustomizerTest
@Override
@Before
public void setUp() throws Exception {
- final LispMapServerDetailsReplyDump reply = new LispMapServerDetailsReplyDump();
- LispMapServerDetails server1 = new LispMapServerDetails();
+ final OneMapServerDetailsReplyDump reply = new OneMapServerDetailsReplyDump();
+ OneMapServerDetails server1 = new OneMapServerDetails();
//192.168.2.2
server1.ipAddress = new byte[]{-64, -88, 2, 1};
server1.isIpv6 = 0;
- LispMapServerDetails server2 = new LispMapServerDetails();
+ OneMapServerDetails server2 = new OneMapServerDetails();
//192.168.2.2
server2.ipAddress = new byte[]{-64, -88, 2, 2};
server2.isIpv6 = 0;
- LispMapServerDetails server3 = new LispMapServerDetails();
+ OneMapServerDetails server3 = new OneMapServerDetails();
//2001:0db8:0a0b:12f0:0000:0000:0000:0001
server3.ipAddress = new byte[]{32, 1, 13, -72, 10, 11, 18, -16, 0, 0, 0, 0, 0, 0, 0, 1};
server3.isIpv6 = 1;
- reply.lispMapServerDetails = Arrays.asList(server1, server2, server3);
- when(api.lispMapServerDump(any(LispMapServerDump.class))).thenReturn(future(reply));
+ reply.oneMapServerDetails = Arrays.asList(server1, server2, server3);
+ when(api.oneMapServerDump(any(OneMapServerDump.class))).thenReturn(future(reply));
mockLispEnabled();
}
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/PetrCfgCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/PetrCfgCustomizerTest.java
index 4052b161f..c3e2c65ef 100644
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/PetrCfgCustomizerTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/PetrCfgCustomizerTest.java
@@ -22,7 +22,7 @@ import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.when;
import io.fd.honeycomb.translate.spi.read.ReaderCustomizer;
-import io.fd.vpp.jvpp.core.dto.ShowLispUsePetrReply;
+import io.fd.vpp.jvpp.core.dto.ShowOneUsePetrReply;
import org.junit.Test;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address;
@@ -40,17 +40,17 @@ public class PetrCfgCustomizerTest extends LispInitializingReaderCustomizerTest
}
private void mockEnabledReply() {
- final ShowLispUsePetrReply reply = new ShowLispUsePetrReply();
+ final ShowOneUsePetrReply reply = new ShowOneUsePetrReply();
reply.address = new byte[]{-64, -88, 2, 1};
reply.status = 1;
reply.isIp4 = 1;
- when(api.showLispUsePetr(any())).thenReturn(future(reply));
+ when(api.showOneUsePetr(any())).thenReturn(future(reply));
}
private void mockDisabledReply() {
- final ShowLispUsePetrReply reply = new ShowLispUsePetrReply();
+ final ShowOneUsePetrReply reply = new ShowOneUsePetrReply();
reply.status = 0;
- when(api.showLispUsePetr(any())).thenReturn(future(reply));
+ when(api.showOneUsePetr(any())).thenReturn(future(reply));
}
@Override
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/PitrCfgCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/PitrCfgCustomizerTest.java
index c61c13b49..898b5a8ec 100644
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/PitrCfgCustomizerTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/PitrCfgCustomizerTest.java
@@ -22,7 +22,7 @@ import static org.mockito.Matchers.any;
import static org.mockito.Mockito.when;
import io.fd.honeycomb.translate.spi.read.ReaderCustomizer;
-import io.fd.vpp.jvpp.core.dto.ShowLispPitrReply;
+import io.fd.vpp.jvpp.core.dto.ShowOnePitrReply;
import java.nio.charset.StandardCharsets;
import org.junit.Before;
import org.junit.Test;
@@ -62,11 +62,11 @@ public class PitrCfgCustomizerTest extends LispInitializingReaderCustomizerTest<
}
private void mockDumpData() {
- ShowLispPitrReply replyDump = new ShowLispPitrReply();
+ ShowOnePitrReply replyDump = new ShowOnePitrReply();
replyDump.locatorSetName = LOC_SET_NAME_BYTES;
replyDump.status = 1;
- when(api.showLispPitr(any())).thenReturn(future(replyDump));
+ when(api.showOnePitr(any())).thenReturn(future(replyDump));
}
@Override
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/RemoteMappingCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/RemoteMappingCustomizerTest.java
index e00ab5095..59caeb03a 100644
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/RemoteMappingCustomizerTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/RemoteMappingCustomizerTest.java
@@ -29,10 +29,10 @@ import io.fd.hc2vpp.lisp.context.util.EidMappingContext;
import io.fd.hc2vpp.lisp.translate.util.EidTranslator;
import io.fd.honeycomb.translate.MappingContext;
import io.fd.honeycomb.translate.spi.read.ReaderCustomizer;
-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 java.util.Collections;
import java.util.List;
import org.junit.Before;
@@ -89,8 +89,8 @@ public class RemoteMappingCustomizerTest
private void mockDumpDataActionZero() {
- LispEidTableDetailsReplyDump replyDump = new LispEidTableDetailsReplyDump();
- LispEidTableDetails detail = new LispEidTableDetails();
+ OneEidTableDetailsReplyDump replyDump = new OneEidTableDetailsReplyDump();
+ OneEidTableDetails detail = new OneEidTableDetails();
detail.action = 0;
detail.authoritative = 1;
detail.context = 4;
@@ -101,18 +101,18 @@ public class RemoteMappingCustomizerTest
detail.ttl = 7;
detail.vni = 12;
- replyDump.lispEidTableDetails = ImmutableList.of(detail);
+ replyDump.oneEidTableDetails = ImmutableList.of(detail);
- when(api.lispEidTableDump(any())).thenReturn(future(replyDump));
+ when(api.oneEidTableDump(any())).thenReturn(future(replyDump));
- LispLocatorDetailsReplyDump rlocs = new LispLocatorDetailsReplyDump();
- rlocs.lispLocatorDetails = Collections.emptyList();
- when(api.lispLocatorDump(any())).thenReturn(future(rlocs));
+ OneLocatorDetailsReplyDump rlocs = new OneLocatorDetailsReplyDump();
+ rlocs.oneLocatorDetails = Collections.emptyList();
+ when(api.oneLocatorDump(any())).thenReturn(future(rlocs));
}
private void mockDumpDataActionOne() {
- LispEidTableDetailsReplyDump replyDump = new LispEidTableDetailsReplyDump();
- LispEidTableDetails detail = new LispEidTableDetails();
+ OneEidTableDetailsReplyDump replyDump = new OneEidTableDetailsReplyDump();
+ OneEidTableDetails detail = new OneEidTableDetails();
detail.action = 1;
detail.authoritative = 1;
detail.context = 4;
@@ -123,14 +123,14 @@ public class RemoteMappingCustomizerTest
detail.ttl = 7;
detail.vni = 12;
- replyDump.lispEidTableDetails = ImmutableList.of(detail);
+ replyDump.oneEidTableDetails = ImmutableList.of(detail);
- when(api.lispEidTableDump(any())).thenReturn(future(replyDump));
+ when(api.oneEidTableDump(any())).thenReturn(future(replyDump));
}
private void mockDumpDataActionZeroWithRemotes() {
- LispEidTableDetailsReplyDump replyDump = new LispEidTableDetailsReplyDump();
- LispEidTableDetails detail = new LispEidTableDetails();
+ OneEidTableDetailsReplyDump replyDump = new OneEidTableDetailsReplyDump();
+ OneEidTableDetails detail = new OneEidTableDetails();
detail.action = 0;
detail.authoritative = 1;
detail.context = 4;
@@ -141,20 +141,20 @@ public class RemoteMappingCustomizerTest
detail.ttl = 7;
detail.vni = 12;
- replyDump.lispEidTableDetails = ImmutableList.of(detail);
+ replyDump.oneEidTableDetails = ImmutableList.of(detail);
- when(api.lispEidTableDump(any())).thenReturn(future(replyDump));
+ when(api.oneEidTableDump(any())).thenReturn(future(replyDump));
- LispLocatorDetailsReplyDump rlocs = new LispLocatorDetailsReplyDump();
- LispLocatorDetails rloc = new LispLocatorDetails();
+ OneLocatorDetailsReplyDump rlocs = new OneLocatorDetailsReplyDump();
+ OneLocatorDetails rloc = new OneLocatorDetails();
rloc.ipAddress = new byte[]{-64, -88, 2, 1};
rloc.isIpv6 = 0;
rloc.priority = 1;
rloc.weight = 2;
- rlocs.lispLocatorDetails = ImmutableList.of(rloc);
+ rlocs.oneLocatorDetails = ImmutableList.of(rloc);
- when(api.lispLocatorDump(any())).thenReturn(future(rlocs));
+ when(api.oneLocatorDump(any())).thenReturn(future(rlocs));
}
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/RlocProbeCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/RlocProbeCustomizerTest.java
index 2afe7120f..42adace42 100644
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/RlocProbeCustomizerTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/RlocProbeCustomizerTest.java
@@ -21,7 +21,7 @@ import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.when;
import io.fd.honeycomb.translate.spi.read.ReaderCustomizer;
-import io.fd.vpp.jvpp.core.dto.ShowLispRlocProbeStateReply;
+import io.fd.vpp.jvpp.core.dto.ShowOneRlocProbeStateReply;
import org.junit.Before;
import org.junit.Test;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.lisp.feature.data.grouping.LispFeatureDataBuilder;
@@ -40,9 +40,9 @@ public class RlocProbeCustomizerTest extends LispInitializingReaderCustomizerTes
@Override
@Before
public void setUp() throws Exception {
- final ShowLispRlocProbeStateReply reply = new ShowLispRlocProbeStateReply();
+ final ShowOneRlocProbeStateReply reply = new ShowOneRlocProbeStateReply();
reply.isEnabled = 1;
- when(api.showLispRlocProbeState(any())).thenReturn(future(reply));
+ when(api.showOneRlocProbeState(any())).thenReturn(future(reply));
mockLispEnabled();
}
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/VniTableCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/VniTableCustomizerTest.java
index f9610a1aa..0e6ab6b24 100644
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/VniTableCustomizerTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/VniTableCustomizerTest.java
@@ -27,8 +27,8 @@ import com.google.common.collect.ImmutableList;
import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.honeycomb.translate.spi.read.ReaderCustomizer;
import io.fd.vpp.jvpp.VppCallbackException;
-import io.fd.vpp.jvpp.core.dto.LispEidTableVniDetails;
-import io.fd.vpp.jvpp.core.dto.LispEidTableVniDetailsReplyDump;
+import io.fd.vpp.jvpp.core.dto.OneEidTableVniDetails;
+import io.fd.vpp.jvpp.core.dto.OneEidTableVniDetailsReplyDump;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import org.junit.Before;
@@ -57,7 +57,7 @@ public class VniTableCustomizerTest extends LispInitializingListReaderCustomizer
@Test
public void testReadAllSuccessfull() throws ReadFailedException {
- whenLispEidTableVniDumpReturnValid();
+ whenOneEidTableVniDumpReturnValid();
final List<VniTableKey> keys = getCustomizer().getAllIds(validId, ctx);
assertNotNull(keys);
@@ -69,7 +69,7 @@ public class VniTableCustomizerTest extends LispInitializingListReaderCustomizer
@Test
public void testReadAllFailed() {
- whenLispEidTableVniDumpThrowException();
+ whenOneEidTableVniDumpThrowException();
try {
getCustomizer().getAllIds(validId, ctx);
} catch (ReadFailedException e) {
@@ -82,7 +82,7 @@ public class VniTableCustomizerTest extends LispInitializingListReaderCustomizer
@Test
public void testReadAttributes() throws ReadFailedException {
- whenLispEidTableVniDumpReturnValid();
+ whenOneEidTableVniDumpReturnValid();
VniTableBuilder builder = new VniTableBuilder();
customizer.readCurrentAttributes(validId, builder, ctx);
@@ -92,25 +92,25 @@ public class VniTableCustomizerTest extends LispInitializingListReaderCustomizer
assertEquals(12L, table.getVirtualNetworkIdentifier().longValue());
}
- private void whenLispEidTableVniDumpReturnValid() {
+ private void whenOneEidTableVniDumpReturnValid() {
- LispEidTableVniDetailsReplyDump dump = new LispEidTableVniDetailsReplyDump();
- LispEidTableVniDetails details1 = new LispEidTableVniDetails();
+ OneEidTableVniDetailsReplyDump dump = new OneEidTableVniDetailsReplyDump();
+ OneEidTableVniDetails details1 = new OneEidTableVniDetails();
details1.vni = 14;
- LispEidTableVniDetails details2 = new LispEidTableVniDetails();
+ OneEidTableVniDetails details2 = new OneEidTableVniDetails();
details2.vni = 12;
- LispEidTableVniDetails details3 = new LispEidTableVniDetails();
+ OneEidTableVniDetails details3 = new OneEidTableVniDetails();
details3.vni = 16;
- dump.lispEidTableVniDetails = ImmutableList.of(details1, details2, details3);
+ dump.oneEidTableVniDetails = ImmutableList.of(details1, details2, details3);
- when(api.lispEidTableVniDump(Mockito.any())).thenReturn(CompletableFuture.completedFuture(dump));
+ when(api.oneEidTableVniDump(Mockito.any())).thenReturn(CompletableFuture.completedFuture(dump));
}
- private void whenLispEidTableVniDumpThrowException() {
- when(api.lispEidTableVniDump(Mockito.any()))
+ private void whenOneEidTableVniDumpThrowException() {
+ when(api.oneEidTableVniDump(Mockito.any()))
.thenReturn(failedFuture());
}
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/VrfSubtableCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/VrfSubtableCustomizerTest.java
index 86a9f3db6..813011b57 100644
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/VrfSubtableCustomizerTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/VrfSubtableCustomizerTest.java
@@ -58,7 +58,7 @@ public class VrfSubtableCustomizerTest extends SubtableReaderTestCase<VrfSubtabl
VrfSubtableBuilder builder = new VrfSubtableBuilder();
customizer.readCurrentAttributes(validId, builder, ctx);
- verifyLispEidTableMapDumpCalled(L3);
+ verifyOneEidTableMapDumpCalled(L3);
final VrfSubtable subtable = builder.build();
assertNotNull(subtable);
@@ -71,7 +71,7 @@ public class VrfSubtableCustomizerTest extends SubtableReaderTestCase<VrfSubtabl
VrfSubtableBuilder builder = new VrfSubtableBuilder();
customizer.readCurrentAttributes(validId, builder, ctx);
- verifyLispEidTableMapDumpCalled(L3);
+ verifyOneEidTableMapDumpCalled(L3);
final VrfSubtable subtable = builder.build();
assertNotNull(subtable);
@@ -87,7 +87,7 @@ public class VrfSubtableCustomizerTest extends SubtableReaderTestCase<VrfSubtabl
} catch (ReadFailedException e) {
assertTrue(e.getCause() instanceof VppCallbackException);
assertTrue(builder.getTableId() == null);
- verifyLispEidTableMapDumpNotCalled();
+ verifyOneEidTableMapDumpNotCalled();
return;
}
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/trait/SubtableReaderTestCase.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/trait/SubtableReaderTestCase.java
index 21ac52257..225b2c39e 100644
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/trait/SubtableReaderTestCase.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/trait/SubtableReaderTestCase.java
@@ -23,21 +23,14 @@ import static org.mockito.Matchers.any;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import static org.mockito.MockitoAnnotations.initMocks;
import com.google.common.collect.ImmutableList;
import io.fd.hc2vpp.common.test.read.ReaderCustomizerTest;
-import io.fd.vpp.jvpp.VppCallbackException;
-import io.fd.vpp.jvpp.core.dto.LispEidTableMapDetails;
-import io.fd.vpp.jvpp.core.dto.LispEidTableMapDetailsReplyDump;
-import io.fd.vpp.jvpp.core.dto.LispEidTableMapDump;
+import io.fd.vpp.jvpp.core.dto.OneEidTableMapDetails;
+import io.fd.vpp.jvpp.core.dto.OneEidTableMapDetailsReplyDump;
+import io.fd.vpp.jvpp.core.dto.OneEidTableMapDump;
import java.util.Collections;
-import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
import javax.annotation.Nonnull;
-import org.junit.Before;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
import org.opendaylight.yangtools.concepts.Builder;
@@ -51,7 +44,7 @@ public abstract class SubtableReaderTestCase<D extends DataObject, B extends Bui
protected final int expectedTableId = 14;
@Captor
- protected ArgumentCaptor<LispEidTableMapDump> requestCaptor;
+ protected ArgumentCaptor<OneEidTableMapDump> requestCaptor;
public SubtableReaderTestCase(final Class<D> dataObjectClass,
final Class<? extends Builder<? extends DataObject>> parentBuilderClass) {
@@ -59,39 +52,39 @@ public abstract class SubtableReaderTestCase<D extends DataObject, B extends Bui
}
protected void doReturnValidNonEmptyDataOnDump() {
- LispEidTableMapDetailsReplyDump reply = new LispEidTableMapDetailsReplyDump();
- LispEidTableMapDetails detailFirst = new LispEidTableMapDetails();
+ OneEidTableMapDetailsReplyDump reply = new OneEidTableMapDetailsReplyDump();
+ OneEidTableMapDetails detailFirst = new OneEidTableMapDetails();
detailFirst.vni = Long.valueOf(expectedVni).intValue();
detailFirst.dpTable = expectedTableId;
- LispEidTableMapDetails detailSecond = new LispEidTableMapDetails();
+ OneEidTableMapDetails detailSecond = new OneEidTableMapDetails();
detailSecond.vni = 13;
detailSecond.dpTable = 15;
- reply.lispEidTableMapDetails = ImmutableList.of(detailFirst, detailSecond);
+ reply.oneEidTableMapDetails = ImmutableList.of(detailFirst, detailSecond);
- when(api.lispEidTableMapDump(any(LispEidTableMapDump.class)))
+ when(api.oneEidTableMapDump(any(OneEidTableMapDump.class)))
.thenReturn(future(reply));
}
protected void doReturnEmptyDataOnDump() {
- LispEidTableMapDetailsReplyDump reply = new LispEidTableMapDetailsReplyDump();
- reply.lispEidTableMapDetails = Collections.emptyList();
- when(api.lispEidTableMapDump(any(LispEidTableMapDump.class)))
+ OneEidTableMapDetailsReplyDump reply = new OneEidTableMapDetailsReplyDump();
+ reply.oneEidTableMapDetails = Collections.emptyList();
+ when(api.oneEidTableMapDump(any(OneEidTableMapDump.class)))
.thenReturn(future(reply));
}
protected void doThrowOnDump() {
- when(api.lispEidTableMapDump(any(LispEidTableMapDump.class)))
+ when(api.oneEidTableMapDump(any(OneEidTableMapDump.class)))
.thenReturn(failedFuture());
}
- protected void verifyLispEidTableMapDumpCalled(@Nonnull final MapLevel expectedLevel) {
- verify(api, times(1)).lispEidTableMapDump(requestCaptor.capture());
+ protected void verifyOneEidTableMapDumpCalled(@Nonnull final MapLevel expectedLevel) {
+ verify(api, times(1)).oneEidTableMapDump(requestCaptor.capture());
assertEquals(expectedLevel.getValue(), requestCaptor.getValue().isL2);
}
- protected void verifyLispEidTableMapDumpNotCalled() {
- verify(api, times(1)).lispEidTableMapDump(any());
+ protected void verifyOneEidTableMapDumpNotCalled() {
+ verify(api, times(1)).oneEidTableMapDump(any());
}
}
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/service/LispStateCheckServiceImplTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/service/LispStateCheckServiceImplTest.java
index d5a351ca8..4aa9335bc 100644
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/service/LispStateCheckServiceImplTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/service/LispStateCheckServiceImplTest.java
@@ -27,7 +27,7 @@ import io.fd.hc2vpp.common.test.util.FutureProducer;
import io.fd.honeycomb.translate.ModificationCache;
import io.fd.honeycomb.translate.read.ReadContext;
import io.fd.honeycomb.translate.write.WriteContext;
-import io.fd.vpp.jvpp.core.dto.ShowLispStatusReply;
+import io.fd.vpp.jvpp.core.dto.ShowOneStatusReply;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import org.junit.Before;
import org.junit.Test;
@@ -79,15 +79,15 @@ public class LispStateCheckServiceImplTest implements FutureProducer {
@Test
public void testLispEnabledDisabledDump() throws Exception {
- when(vppApi.showLispStatus(any())).thenReturn(future(new ShowLispStatusReply()));
+ when(vppApi.showOneStatus(any())).thenReturn(future(new ShowOneStatusReply()));
assertFalse(impl.lispEnabled(readContext));
}
@Test
public void testLispEnabledEnabledDump() throws Exception {
- final ShowLispStatusReply reply = new ShowLispStatusReply();
+ final ShowOneStatusReply reply = new ShowOneStatusReply();
reply.featureStatus = 1;
- when(vppApi.showLispStatus(any())).thenReturn(future(reply));
+ when(vppApi.showOneStatus(any())).thenReturn(future(reply));
assertTrue(impl.lispEnabled(readContext));
}
} \ No newline at end of file
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/AdjacencyCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/AdjacencyCustomizerTest.java
index 91087a879..bf19ae581 100644
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/AdjacencyCustomizerTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/AdjacencyCustomizerTest.java
@@ -34,8 +34,8 @@ import io.fd.hc2vpp.common.test.write.WriterCustomizerTest;
import io.fd.hc2vpp.lisp.context.util.AdjacenciesMappingContext;
import io.fd.hc2vpp.lisp.context.util.EidMappingContext;
import io.fd.hc2vpp.lisp.util.EidMappingContextHelper;
-import io.fd.vpp.jvpp.core.dto.LispAddDelAdjacency;
-import io.fd.vpp.jvpp.core.dto.LispAddDelAdjacencyReply;
+import io.fd.vpp.jvpp.core.dto.OneAddDelAdjacency;
+import io.fd.vpp.jvpp.core.dto.OneAddDelAdjacencyReply;
import org.junit.Before;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
@@ -67,7 +67,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
public class AdjacencyCustomizerTest extends WriterCustomizerTest implements EidMappingContextHelper {
@Captor
- private ArgumentCaptor<LispAddDelAdjacency> requestCaptor;
+ private ArgumentCaptor<OneAddDelAdjacency> requestCaptor;
private EidMappingContext localMappingContext;
@@ -126,7 +126,7 @@ public class AdjacencyCustomizerTest extends WriterCustomizerTest implements Eid
.setAddressType(Ipv4Afi.class)
.setAddress(new Ipv4Builder().setIpv4(ADDRESS_THREE).build()).build()).build();
- when(api.lispAddDelAdjacency(any())).thenReturn(future(new LispAddDelAdjacencyReply()));
+ when(api.oneAddDelAdjacency(any())).thenReturn(future(new OneAddDelAdjacencyReply()));
}
@Test
@@ -134,7 +134,7 @@ public class AdjacencyCustomizerTest extends WriterCustomizerTest implements Eid
try {
customizer.writeCurrentAttributes(emptyId, emptyData, writeContext);
} catch (NullPointerException e) {
- verify(api, times(0)).lispAddDelAdjacency(any());
+ verify(api, times(0)).oneAddDelAdjacency(any());
return;
}
@@ -146,7 +146,7 @@ public class AdjacencyCustomizerTest extends WriterCustomizerTest implements Eid
try {
customizer.writeCurrentAttributes(emptyId, invalidData, writeContext);
} catch (NullPointerException e) {
- verify(api, times(0)).lispAddDelAdjacency(any());
+ verify(api, times(0)).oneAddDelAdjacency(any());
return;
}
@@ -159,7 +159,7 @@ public class AdjacencyCustomizerTest extends WriterCustomizerTest implements Eid
defineEidMapping(mappingContext, LOCAL_EID_ONE, new MappingId("local-eid-one"), "local-mapping-context");
defineEidMapping(mappingContext, REMOTE_EID_ONE, new MappingId("remote-eid-one"), "remote-mapping-context");
customizer.writeCurrentAttributes(validId, validData, writeContext);
- verify(api, times(1)).lispAddDelAdjacency(requestCaptor.capture());
+ verify(api, times(1)).oneAddDelAdjacency(requestCaptor.capture());
verifyRequest(requestCaptor.getValue(), 1, new byte[]{-64, -88, 2, 1}, 32, new byte[]{-64, -88, 2, 3},
32, IPV4.getValue(), 2);
verify(adjacenciesMappingContext, times(1))
@@ -173,7 +173,7 @@ public class AdjacencyCustomizerTest extends WriterCustomizerTest implements Eid
try {
customizer.writeCurrentAttributes(validId, validData, writeContext);
} catch (IllegalStateException e) {
- verify(api, times(0)).lispAddDelAdjacency(any());
+ verify(api, times(0)).oneAddDelAdjacency(any());
return;
}
@@ -188,7 +188,7 @@ public class AdjacencyCustomizerTest extends WriterCustomizerTest implements Eid
try {
customizer.writeCurrentAttributes(validId, validData, writeContext);
} catch (IllegalStateException e) {
- verify(api, times(0)).lispAddDelAdjacency(any());
+ verify(api, times(0)).oneAddDelAdjacency(any());
return;
}
@@ -205,7 +205,7 @@ public class AdjacencyCustomizerTest extends WriterCustomizerTest implements Eid
try {
customizer.deleteCurrentAttributes(emptyId, emptyData, writeContext);
} catch (NullPointerException e) {
- verify(api, times(0)).lispAddDelAdjacency(any());
+ verify(api, times(0)).oneAddDelAdjacency(any());
return;
}
@@ -220,13 +220,13 @@ public class AdjacencyCustomizerTest extends WriterCustomizerTest implements Eid
@Test
public void deleteCurrentAttributes() throws Exception {
customizer.deleteCurrentAttributes(validId, validData, writeContext);
- verify(api, times(1)).lispAddDelAdjacency(requestCaptor.capture());
+ verify(api, times(1)).oneAddDelAdjacency(requestCaptor.capture());
verifyRequest(requestCaptor.getValue(), 0, new byte[]{-64, -88, 2, 1}, 32, new byte[]{-64, -88, 2, 3},
32, IPV4.getValue(), 2);
verify(adjacenciesMappingContext, times(1)).removeForIndex("adj-one", mappingContext);
}
- private static void verifyRequest(final LispAddDelAdjacency request, final int isAdd, final byte[] leid,
+ private static void verifyRequest(final OneAddDelAdjacency request, final int isAdd, final byte[] leid,
final int leidLen, final byte[] reid, final int reidLen, final int eidType,
final int vni) {
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/InterfaceCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/InterfaceCustomizerTest.java
index cc76905ea..1fa689f60 100755
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/InterfaceCustomizerTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/InterfaceCustomizerTest.java
@@ -28,8 +28,8 @@ import io.fd.hc2vpp.common.test.write.WriterCustomizerTest;
import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
-import io.fd.vpp.jvpp.core.dto.LispAddDelLocator;
-import io.fd.vpp.jvpp.core.dto.LispAddDelLocatorReply;
+import io.fd.vpp.jvpp.core.dto.OneAddDelLocator;
+import io.fd.vpp.jvpp.core.dto.OneAddDelLocatorReply;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
@@ -46,7 +46,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
public class InterfaceCustomizerTest extends WriterCustomizerTest implements ByteDataTranslator {
@Captor
- private ArgumentCaptor<LispAddDelLocator> intfCaptor;
+ private ArgumentCaptor<OneAddDelLocator> intfCaptor;
private InstanceIdentifier<Interface> id;
private Interface intf;
@@ -72,7 +72,7 @@ public class InterfaceCustomizerTest extends WriterCustomizerTest implements Byt
customizer = new InterfaceCustomizer(api, new NamingContext("PREFIX", ifcCtxName));
- when(api.lispAddDelLocator(any(LispAddDelLocator.class))).thenReturn(future(new LispAddDelLocatorReply()));
+ when(api.oneAddDelLocator(any(OneAddDelLocator.class))).thenReturn(future(new OneAddDelLocatorReply()));
}
@Test(expected = NullPointerException.class)
@@ -102,9 +102,9 @@ public class InterfaceCustomizerTest extends WriterCustomizerTest implements Byt
public void testWriteCurrentAttributes() throws WriteFailedException {
customizer.writeCurrentAttributes(id, intf, writeContext);
- verify(api, times(1)).lispAddDelLocator(intfCaptor.capture());
+ verify(api, times(1)).oneAddDelLocator(intfCaptor.capture());
- LispAddDelLocator request = intfCaptor.getValue();
+ OneAddDelLocator request = intfCaptor.getValue();
assertNotNull(request);
assertEquals(1, request.isAdd);
@@ -146,9 +146,9 @@ public class InterfaceCustomizerTest extends WriterCustomizerTest implements Byt
public void testDeleteCurrentAttributes() throws WriteFailedException {
customizer.deleteCurrentAttributes(id, intf, writeContext);
- verify(api, times(1)).lispAddDelLocator(intfCaptor.capture());
+ verify(api, times(1)).oneAddDelLocator(intfCaptor.capture());
- LispAddDelLocator request = intfCaptor.getValue();
+ OneAddDelLocator request = intfCaptor.getValue();
assertNotNull(request);
assertEquals(0, request.isAdd);
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/ItrRemoteLocatorSetCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/ItrRemoteLocatorSetCustomizerTest.java
index e11ec4262..7fc691b6e 100644
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/ItrRemoteLocatorSetCustomizerTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/ItrRemoteLocatorSetCustomizerTest.java
@@ -29,8 +29,8 @@ import static org.mockito.MockitoAnnotations.initMocks;
import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
import io.fd.honeycomb.translate.write.WriteFailedException;
import io.fd.vpp.jvpp.VppCallbackException;
-import io.fd.vpp.jvpp.core.dto.LispAddDelMapRequestItrRlocs;
-import io.fd.vpp.jvpp.core.dto.LispAddDelMapRequestItrRlocsReply;
+import io.fd.vpp.jvpp.core.dto.OneAddDelMapRequestItrRlocs;
+import io.fd.vpp.jvpp.core.dto.OneAddDelMapRequestItrRlocsReply;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
@@ -48,7 +48,7 @@ public class ItrRemoteLocatorSetCustomizerTest extends LispWriterCustomizerTest
private static final String VALID_NAME = "loc-set";
@Captor
- private ArgumentCaptor<LispAddDelMapRequestItrRlocs> requestCaptor;
+ private ArgumentCaptor<OneAddDelMapRequestItrRlocs> requestCaptor;
private ItrRemoteLocatorSetCustomizer customizer;
private InstanceIdentifier<ItrRemoteLocatorSet> validId;
@@ -119,25 +119,25 @@ public class ItrRemoteLocatorSetCustomizerTest extends LispWriterCustomizerTest
}
private void onWriteSuccess() {
- when(api.lispAddDelMapRequestItrRlocs(any(LispAddDelMapRequestItrRlocs.class)))
- .thenReturn(CompletableFuture.completedFuture(new LispAddDelMapRequestItrRlocsReply()));
+ when(api.oneAddDelMapRequestItrRlocs(any(OneAddDelMapRequestItrRlocs.class)))
+ .thenReturn(CompletableFuture.completedFuture(new OneAddDelMapRequestItrRlocsReply()));
}
private void onWriteThrow() {
- when(api.lispAddDelMapRequestItrRlocs(any(LispAddDelMapRequestItrRlocs.class)))
- .thenReturn(new CompletableFuture<LispAddDelMapRequestItrRlocsReply>() {
+ when(api.oneAddDelMapRequestItrRlocs(any(OneAddDelMapRequestItrRlocs.class)))
+ .thenReturn(new CompletableFuture<OneAddDelMapRequestItrRlocsReply>() {
@Override
- public LispAddDelMapRequestItrRlocsReply get(final long l, final TimeUnit timeUnit)
+ public OneAddDelMapRequestItrRlocsReply get(final long l, final TimeUnit timeUnit)
throws InterruptedException, ExecutionException, TimeoutException {
- throw new ExecutionException(new VppCallbackException("lispAddDelMapRequestItrRlocs", 1, -2));
+ throw new ExecutionException(new VppCallbackException("oneAddDelMapRequestItrRlocs", 1, -2));
}
});
}
private void verifyWriteInvoked(final boolean add, final String name) {
- verify(api, times(1)).lispAddDelMapRequestItrRlocs(requestCaptor.capture());
+ verify(api, times(1)).oneAddDelMapRequestItrRlocs(requestCaptor.capture());
- final LispAddDelMapRequestItrRlocs request = requestCaptor.getValue();
+ final OneAddDelMapRequestItrRlocs request = requestCaptor.getValue();
assertNotNull(request);
assertEquals(booleanToByte(add), request.isAdd);
assertEquals(name, toString(request.locatorSetName));
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/LispCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/LispCustomizerTest.java
index 733d1cd5b..b04029d0d 100755
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/LispCustomizerTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/LispCustomizerTest.java
@@ -25,8 +25,8 @@ import static org.mockito.Mockito.when;
import io.fd.hc2vpp.common.test.write.WriterCustomizerTest;
import io.fd.honeycomb.translate.write.WriteFailedException;
-import io.fd.vpp.jvpp.core.dto.LispEnableDisable;
-import io.fd.vpp.jvpp.core.dto.LispEnableDisableReply;
+import io.fd.vpp.jvpp.core.dto.OneEnableDisable;
+import io.fd.vpp.jvpp.core.dto.OneEnableDisableReply;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.Lisp;
@@ -42,7 +42,7 @@ public class LispCustomizerTest extends WriterCustomizerTest {
}
private void whenlispEnableDisableThenSuccess() {
- when(api.lispEnableDisable(any(LispEnableDisable.class))).thenReturn(future(new LispEnableDisableReply()));
+ when(api.oneEnableDisable(any(OneEnableDisable.class))).thenReturn(future(new OneEnableDisableReply()));
}
@Test(expected = NullPointerException.class)
@@ -57,10 +57,10 @@ public class LispCustomizerTest extends WriterCustomizerTest {
whenlispEnableDisableThenSuccess();
customizer.writeCurrentAttributes(null, intf, null);
- ArgumentCaptor<LispEnableDisable> mappingCaptor = ArgumentCaptor.forClass(LispEnableDisable.class);
- verify(api, times(1)).lispEnableDisable(mappingCaptor.capture());
+ ArgumentCaptor<OneEnableDisable> mappingCaptor = ArgumentCaptor.forClass(OneEnableDisable.class);
+ verify(api, times(1)).oneEnableDisable(mappingCaptor.capture());
- LispEnableDisable request = mappingCaptor.getValue();
+ OneEnableDisable request = mappingCaptor.getValue();
assertNotNull(request);
assertEquals(1, request.isEn);
@@ -78,10 +78,10 @@ public class LispCustomizerTest extends WriterCustomizerTest {
whenlispEnableDisableThenSuccess();
customizer.updateCurrentAttributes(null, null, lisp, null);
- ArgumentCaptor<LispEnableDisable> lispCaptor = ArgumentCaptor.forClass(LispEnableDisable.class);
- verify(api, times(1)).lispEnableDisable(lispCaptor.capture());
+ ArgumentCaptor<OneEnableDisable> lispCaptor = ArgumentCaptor.forClass(OneEnableDisable.class);
+ verify(api, times(1)).oneEnableDisable(lispCaptor.capture());
- LispEnableDisable request = lispCaptor.getValue();
+ OneEnableDisable request = lispCaptor.getValue();
assertNotNull(request);
assertEquals(1, request.isEn);
@@ -99,10 +99,10 @@ public class LispCustomizerTest extends WriterCustomizerTest {
whenlispEnableDisableThenSuccess();
customizer.deleteCurrentAttributes(null, lisp, null);
- ArgumentCaptor<LispEnableDisable> lispCaptor = ArgumentCaptor.forClass(LispEnableDisable.class);
- verify(api, times(1)).lispEnableDisable(lispCaptor.capture());
+ ArgumentCaptor<OneEnableDisable> lispCaptor = ArgumentCaptor.forClass(OneEnableDisable.class);
+ verify(api, times(1)).oneEnableDisable(lispCaptor.capture());
- LispEnableDisable request = lispCaptor.getValue();
+ OneEnableDisable request = lispCaptor.getValue();
assertNotNull(request);
assertEquals(0, request.isEn);
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/LocalMappingCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/LocalMappingCustomizerTest.java
index 8855f0564..f945415a1 100755
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/LocalMappingCustomizerTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/LocalMappingCustomizerTest.java
@@ -31,8 +31,8 @@ import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
import io.fd.hc2vpp.common.translate.util.Ipv4Translator;
import io.fd.hc2vpp.lisp.context.util.EidMappingContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
-import io.fd.vpp.jvpp.core.dto.LispAddDelLocalEid;
-import io.fd.vpp.jvpp.core.dto.LispAddDelLocalEidReply;
+import io.fd.vpp.jvpp.core.dto.OneAddDelLocalEid;
+import io.fd.vpp.jvpp.core.dto.OneAddDelLocalEidReply;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.concurrent.ExecutionException;
@@ -65,7 +65,7 @@ public class LocalMappingCustomizerTest extends WriterCustomizerTest implements
@Mock
private EidMappingContext eidMappingContext;
@Captor
- private ArgumentCaptor<LispAddDelLocalEid> mappingCaptor;
+ private ArgumentCaptor<OneAddDelLocalEid> mappingCaptor;
private InstanceIdentifier<LocalMapping> id;
private LocalMapping mapping;
@@ -106,7 +106,7 @@ public class LocalMappingCustomizerTest extends WriterCustomizerTest implements
customizer = new LocalMappingCustomizer(api, eidMappingContext);
- when(api.lispAddDelLocalEid(any(LispAddDelLocalEid.class))).thenReturn(future(new LispAddDelLocalEidReply()));
+ when(api.oneAddDelLocalEid(any(OneAddDelLocalEid.class))).thenReturn(future(new OneAddDelLocalEidReply()));
}
@@ -138,9 +138,9 @@ public class LocalMappingCustomizerTest extends WriterCustomizerTest implements
public void testWriteCurrentAttributes() throws WriteFailedException {
customizer.writeCurrentAttributes(id, mapping, writeContext);
- verify(api, times(1)).lispAddDelLocalEid(mappingCaptor.capture());
+ verify(api, times(1)).oneAddDelLocalEid(mappingCaptor.capture());
- LispAddDelLocalEid request = mappingCaptor.getValue();
+ OneAddDelLocalEid request = mappingCaptor.getValue();
assertNotNull(request);
assertEquals("Locator", new String(request.locatorSetName));
@@ -155,9 +155,9 @@ public class LocalMappingCustomizerTest extends WriterCustomizerTest implements
public void testWriteCurrentAttributesWithHmacKey() throws WriteFailedException {
customizer.writeCurrentAttributes(id, mappingWithHmacKey, writeContext);
- verify(api, times(1)).lispAddDelLocalEid(mappingCaptor.capture());
+ verify(api, times(1)).oneAddDelLocalEid(mappingCaptor.capture());
- LispAddDelLocalEid request = mappingCaptor.getValue();
+ OneAddDelLocalEid request = mappingCaptor.getValue();
assertNotNull(request);
assertEquals("Locator", new String(request.locatorSetName));
@@ -180,9 +180,9 @@ public class LocalMappingCustomizerTest extends WriterCustomizerTest implements
when(eidMappingContext.containsEid(any(), eq(mappingContext))).thenReturn(true);
customizer.deleteCurrentAttributes(id, mapping, writeContext);
- verify(api, times(1)).lispAddDelLocalEid(mappingCaptor.capture());
+ verify(api, times(1)).oneAddDelLocalEid(mappingCaptor.capture());
- LispAddDelLocalEid request = mappingCaptor.getValue();
+ OneAddDelLocalEid request = mappingCaptor.getValue();
assertNotNull(request);
assertEquals("Locator", new String(request.locatorSetName));
@@ -198,9 +198,9 @@ public class LocalMappingCustomizerTest extends WriterCustomizerTest implements
when(eidMappingContext.containsEid(any(), eq(mappingContext))).thenReturn(true);
customizer.deleteCurrentAttributes(id, mappingWithHmacKey, writeContext);
- verify(api, times(1)).lispAddDelLocalEid(mappingCaptor.capture());
+ verify(api, times(1)).oneAddDelLocalEid(mappingCaptor.capture());
- LispAddDelLocalEid request = mappingCaptor.getValue();
+ OneAddDelLocalEid request = mappingCaptor.getValue();
assertNotNull(request);
assertEquals("Locator", new String(request.locatorSetName));
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/LocatorSetCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/LocatorSetCustomizerTest.java
index 50cba9dd5..00c9f3eff 100755
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/LocatorSetCustomizerTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/LocatorSetCustomizerTest.java
@@ -31,10 +31,10 @@ import com.google.common.base.Optional;
import com.google.common.collect.ImmutableList;
import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
-import io.fd.vpp.jvpp.core.dto.LispAddDelLocatorSet;
-import io.fd.vpp.jvpp.core.dto.LispAddDelLocatorSetReply;
-import io.fd.vpp.jvpp.core.dto.LispLocatorSetDetails;
-import io.fd.vpp.jvpp.core.dto.LispLocatorSetDetailsReplyDump;
+import io.fd.vpp.jvpp.core.dto.OneAddDelLocatorSet;
+import io.fd.vpp.jvpp.core.dto.OneAddDelLocatorSetReply;
+import io.fd.vpp.jvpp.core.dto.OneLocatorSetDetails;
+import io.fd.vpp.jvpp.core.dto.OneLocatorSetDetailsReplyDump;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.concurrent.ExecutionException;
@@ -99,22 +99,22 @@ public class LocatorSetCustomizerTest extends LispWriterCustomizerTest {
InstanceIdentifier.create(LocatorSets.class).child(LocatorSet.class, new LocatorSetKey("Locator"));
- ArgumentCaptor<LispAddDelLocatorSet> locatorSetCaptor = ArgumentCaptor.forClass(LispAddDelLocatorSet.class);
+ ArgumentCaptor<OneAddDelLocatorSet> locatorSetCaptor = ArgumentCaptor.forClass(OneAddDelLocatorSet.class);
- when(api.lispAddDelLocatorSet(any(LispAddDelLocatorSet.class)))
- .thenReturn(future(new LispAddDelLocatorSetReply()));
+ when(api.oneAddDelLocatorSet(any(OneAddDelLocatorSet.class)))
+ .thenReturn(future(new OneAddDelLocatorSetReply()));
when(writeContext.readAfter(validId)).thenReturn(Optional.of(locatorSet));
- final LispLocatorSetDetailsReplyDump reply = new LispLocatorSetDetailsReplyDump();
- LispLocatorSetDetails details = new LispLocatorSetDetails();
+ final OneLocatorSetDetailsReplyDump reply = new OneLocatorSetDetailsReplyDump();
+ OneLocatorSetDetails details = new OneLocatorSetDetails();
details.lsName = "Locator".getBytes(StandardCharsets.UTF_8);
- reply.lispLocatorSetDetails = ImmutableList.of(details);
+ reply.oneLocatorSetDetails = ImmutableList.of(details);
customizer.writeCurrentAttributes(validId, locatorSet, writeContext);
- verify(api, times(1)).lispAddDelLocatorSet(locatorSetCaptor.capture());
+ verify(api, times(1)).oneAddDelLocatorSet(locatorSetCaptor.capture());
- LispAddDelLocatorSet request = locatorSetCaptor.getValue();
+ OneAddDelLocatorSet request = locatorSetCaptor.getValue();
assertNotNull(request);
assertEquals("Locator", new String(request.locatorSetName));
@@ -166,16 +166,16 @@ public class LocatorSetCustomizerTest extends LispWriterCustomizerTest {
}
private void verifySuccessfullDelete(final LocatorSet locatorSet) throws WriteFailedException {
- ArgumentCaptor<LispAddDelLocatorSet> locatorSetCaptor = ArgumentCaptor.forClass(LispAddDelLocatorSet.class);
+ ArgumentCaptor<OneAddDelLocatorSet> locatorSetCaptor = ArgumentCaptor.forClass(OneAddDelLocatorSet.class);
- when(api.lispAddDelLocatorSet(any(LispAddDelLocatorSet.class)))
- .thenReturn(future(new LispAddDelLocatorSetReply()));
+ when(api.oneAddDelLocatorSet(any(OneAddDelLocatorSet.class)))
+ .thenReturn(future(new OneAddDelLocatorSetReply()));
customizer.deleteCurrentAttributes(null, locatorSet, writeContext);
- verify(api, times(1)).lispAddDelLocatorSet(locatorSetCaptor.capture());
+ verify(api, times(1)).oneAddDelLocatorSet(locatorSetCaptor.capture());
- LispAddDelLocatorSet request = locatorSetCaptor.getValue();
+ OneAddDelLocatorSet request = locatorSetCaptor.getValue();
assertNotNull(request);
assertEquals("Locator", new String(request.locatorSetName));
@@ -187,15 +187,15 @@ public class LocatorSetCustomizerTest extends LispWriterCustomizerTest {
when(writeContext.readAfter(EID_TABLE_ID))
.thenReturn(eidTableData());
- ArgumentCaptor<LispAddDelLocatorSet> locatorSetCaptor = ArgumentCaptor.forClass(LispAddDelLocatorSet.class);
+ ArgumentCaptor<OneAddDelLocatorSet> locatorSetCaptor = ArgumentCaptor.forClass(OneAddDelLocatorSet.class);
- when(api.lispAddDelLocatorSet(any(LispAddDelLocatorSet.class)))
- .thenReturn(future(new LispAddDelLocatorSetReply()));
+ when(api.oneAddDelLocatorSet(any(OneAddDelLocatorSet.class)))
+ .thenReturn(future(new OneAddDelLocatorSetReply()));
try {
customizer.deleteCurrentAttributes(null, LOCATOR_SET_TO_DELETE, writeContext);
} catch (IllegalStateException e) {
- verify(api, times(0)).lispAddDelLocatorSet(locatorSetCaptor.capture());
+ verify(api, times(0)).oneAddDelLocatorSet(locatorSetCaptor.capture());
return;
}
fail("testDeleteReferenced should have failed");
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/MapRegisterCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/MapRegisterCustomizerTest.java
index 30ab07cb8..f4f3d2fb6 100644
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/MapRegisterCustomizerTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/MapRegisterCustomizerTest.java
@@ -26,8 +26,8 @@ import static org.mockito.Mockito.when;
import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
import io.fd.honeycomb.translate.write.WriteFailedException;
-import io.fd.vpp.jvpp.core.dto.LispMapRegisterEnableDisable;
-import io.fd.vpp.jvpp.core.dto.LispMapRegisterEnableDisableReply;
+import io.fd.vpp.jvpp.core.dto.OneMapRegisterEnableDisable;
+import io.fd.vpp.jvpp.core.dto.OneMapRegisterEnableDisableReply;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
@@ -43,7 +43,7 @@ public class MapRegisterCustomizerTest extends LispWriterCustomizerTest implemen
private MapRegister disabledRegister;
@Captor
- private ArgumentCaptor<LispMapRegisterEnableDisable> requestCaptor;
+ private ArgumentCaptor<OneMapRegisterEnableDisable> requestCaptor;
private InstanceIdentifier<MapRegister> EMPTY_ID = InstanceIdentifier.create(MapRegister.class);
private MapRegister EMPTY_DATA = new MapRegisterBuilder().setEnabled(false).build();
@@ -60,8 +60,8 @@ public class MapRegisterCustomizerTest extends LispWriterCustomizerTest implemen
.setEnabled(false)
.build();
- when(api.lispMapRegisterEnableDisable(any(LispMapRegisterEnableDisable.class)))
- .thenReturn(future(new LispMapRegisterEnableDisableReply()));
+ when(api.oneMapRegisterEnableDisable(any(OneMapRegisterEnableDisable.class)))
+ .thenReturn(future(new OneMapRegisterEnableDisableReply()));
}
@Test
@@ -125,9 +125,9 @@ public class MapRegisterCustomizerTest extends LispWriterCustomizerTest implemen
}
private void verifyRequest(final boolean enabled) {
- verify(api, times(1)).lispMapRegisterEnableDisable(requestCaptor.capture());
+ verify(api, times(1)).oneMapRegisterEnableDisable(requestCaptor.capture());
- final LispMapRegisterEnableDisable request = requestCaptor.getValue();
+ final OneMapRegisterEnableDisable request = requestCaptor.getValue();
assertEquals(booleanToByte(enabled), request.isEnabled);
}
} \ No newline at end of file
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/MapRequestModeCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/MapRequestModeCustomizerTest.java
index 66384a495..c43960e20 100644
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/MapRequestModeCustomizerTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/MapRequestModeCustomizerTest.java
@@ -27,8 +27,8 @@ import static org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.l
import static org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.MapRequestMode.SourceDestination;
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 org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
@@ -44,7 +44,7 @@ public class MapRequestModeCustomizerTest extends LispWriterCustomizerTest {
private MapRequestMode destinationOnlyMode;
@Captor
- private ArgumentCaptor<LispMapRequestMode> requestCaptor;
+ private ArgumentCaptor<OneMapRequestMode> requestCaptor;
private InstanceIdentifier<MapRequestMode> EMPTY_ID = InstanceIdentifier.create(MapRequestMode.class);
private MapRequestMode EMPTY_DATA = new MapRequestModeBuilder().build();
@@ -57,7 +57,7 @@ public class MapRequestModeCustomizerTest extends LispWriterCustomizerTest {
destinationOnlyMode = new MapRequestModeBuilder()
.setMode(DestinationOnly)
.build();
- when(api.lispMapRequestMode(any(LispMapRequestMode.class))).thenReturn(future(new LispMapRequestModeReply()));
+ when(api.oneMapRequestMode(any(OneMapRequestMode.class))).thenReturn(future(new OneMapRequestModeReply()));
}
@Test
@@ -103,9 +103,9 @@ public class MapRequestModeCustomizerTest extends LispWriterCustomizerTest {
private void verifyModeRequest(
final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.MapRequestMode mode) {
- verify(api, times(1)).lispMapRequestMode(requestCaptor.capture());
+ verify(api, times(1)).oneMapRequestMode(requestCaptor.capture());
- final LispMapRequestMode request = requestCaptor.getValue();
+ final OneMapRequestMode request = requestCaptor.getValue();
assertEquals(mode.getIntValue(), request.mode);
}
} \ No newline at end of file
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/MapResolverCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/MapResolverCustomizerTest.java
index 76017a439..bc7703b20 100755
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/MapResolverCustomizerTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/MapResolverCustomizerTest.java
@@ -26,8 +26,8 @@ import static org.mockito.Mockito.when;
import io.fd.hc2vpp.common.translate.util.Ipv4Translator;
import io.fd.honeycomb.translate.write.WriteFailedException;
-import io.fd.vpp.jvpp.core.dto.LispAddDelMapResolver;
-import io.fd.vpp.jvpp.core.dto.LispAddDelMapResolverReply;
+import io.fd.vpp.jvpp.core.dto.OneAddDelMapResolver;
+import io.fd.vpp.jvpp.core.dto.OneAddDelMapResolverReply;
import java.util.concurrent.ExecutionException;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
@@ -49,9 +49,9 @@ public class MapResolverCustomizerTest extends LispWriterCustomizerTest implemen
customizer = new MapResolverCustomizer(api, lispStateCheckService);
}
- private void whenLispAddDelMapResolverThenSuccess() {
- when(api.lispAddDelMapResolver(any(LispAddDelMapResolver.class)))
- .thenReturn(future(new LispAddDelMapResolverReply()));
+ private void whenOneAddDelMapResolverThenSuccess() {
+ when(api.oneAddDelMapResolver(any(OneAddDelMapResolver.class)))
+ .thenReturn(future(new OneAddDelMapResolverReply()));
}
@Test(expected = NullPointerException.class)
@@ -69,14 +69,14 @@ public class MapResolverCustomizerTest extends LispWriterCustomizerTest implemen
Ipv4Address address = new Ipv4Address("192.168.2.1");
MapResolver resolver = new MapResolverBuilder().setIpAddress(new IpAddress(address)).build();
- whenLispAddDelMapResolverThenSuccess();
+ whenOneAddDelMapResolverThenSuccess();
customizer.writeCurrentAttributes(null, resolver, null);
- ArgumentCaptor<LispAddDelMapResolver> resolverCaptor = ArgumentCaptor.forClass(LispAddDelMapResolver.class);
- verify(api, times(1)).lispAddDelMapResolver(resolverCaptor.capture());
+ ArgumentCaptor<OneAddDelMapResolver> resolverCaptor = ArgumentCaptor.forClass(OneAddDelMapResolver.class);
+ verify(api, times(1)).oneAddDelMapResolver(resolverCaptor.capture());
- LispAddDelMapResolver request = resolverCaptor.getValue();
+ OneAddDelMapResolver request = resolverCaptor.getValue();
assertEquals(1, request.isAdd);
assertEquals("192.168.2.1", arrayToIpv4AddressNoZone(request.ipAddress).getValue());
}
@@ -92,14 +92,14 @@ public class MapResolverCustomizerTest extends LispWriterCustomizerTest implemen
Ipv4Address address = new Ipv4Address("192.168.2.1");
MapResolver resolver = new MapResolverBuilder().setIpAddress(new IpAddress(address)).build();
- whenLispAddDelMapResolverThenSuccess();
+ whenOneAddDelMapResolverThenSuccess();
customizer.deleteCurrentAttributes(null, resolver, null);
- ArgumentCaptor<LispAddDelMapResolver> resolverCaptor = ArgumentCaptor.forClass(LispAddDelMapResolver.class);
- verify(api, times(1)).lispAddDelMapResolver(resolverCaptor.capture());
+ ArgumentCaptor<OneAddDelMapResolver> resolverCaptor = ArgumentCaptor.forClass(OneAddDelMapResolver.class);
+ verify(api, times(1)).oneAddDelMapResolver(resolverCaptor.capture());
- LispAddDelMapResolver request = resolverCaptor.getValue();
+ OneAddDelMapResolver request = resolverCaptor.getValue();
assertEquals(0, request.isAdd);
assertEquals("192.168.2.1", arrayToIpv4AddressNoZone(request.ipAddress).getValue());
}
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/MapServerCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/MapServerCustomizerTest.java
index a13905847..14ff2c58c 100644
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/MapServerCustomizerTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/MapServerCustomizerTest.java
@@ -27,8 +27,8 @@ import static org.mockito.Mockito.when;
import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
import io.fd.honeycomb.translate.write.WriteFailedException;
-import io.fd.vpp.jvpp.core.dto.LispAddDelMapServer;
-import io.fd.vpp.jvpp.core.dto.LispAddDelMapServerReply;
+import io.fd.vpp.jvpp.core.dto.OneAddDelMapServer;
+import io.fd.vpp.jvpp.core.dto.OneAddDelMapServerReply;
import java.util.Arrays;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
@@ -54,7 +54,7 @@ public class MapServerCustomizerTest extends LispWriterCustomizerTest implements
private MapServer EMPTY_DATA = new MapServerBuilder().build();
@Captor
- private ArgumentCaptor<LispAddDelMapServer> requestCaptor;
+ private ArgumentCaptor<OneAddDelMapServer> requestCaptor;
@Override
protected void setUpTest() throws Exception {
@@ -62,7 +62,7 @@ public class MapServerCustomizerTest extends LispWriterCustomizerTest implements
data = new MapServerBuilder()
.setIpAddress(MAP_SERVER_KEY.getIpAddress())
.build();
- when(api.lispAddDelMapServer(any())).thenReturn(future(new LispAddDelMapServerReply()));
+ when(api.oneAddDelMapServer(any())).thenReturn(future(new OneAddDelMapServerReply()));
}
@Test
@@ -79,7 +79,7 @@ public class MapServerCustomizerTest extends LispWriterCustomizerTest implements
} catch (WriteFailedException e) {
assertTrue(e instanceof WriteFailedException.UpdateFailedException);
assertTrue(e.getCause() instanceof UnsupportedOperationException);
- verify(api, times(0)).lispAddDelMapServer(any());
+ verify(api, times(0)).oneAddDelMapServer(any());
}
}
@@ -114,9 +114,9 @@ public class MapServerCustomizerTest extends LispWriterCustomizerTest implements
}
private void verifyRequest(final boolean add) {
- verify(api, times(1)).lispAddDelMapServer(requestCaptor.capture());
+ verify(api, times(1)).oneAddDelMapServer(requestCaptor.capture());
- final LispAddDelMapServer request = requestCaptor.getValue();
+ final OneAddDelMapServer request = requestCaptor.getValue();
assertEquals(booleanToByte(add), request.isAdd);
assertEquals(0, request.isIpv6);
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/PetrCfgCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/PetrCfgCustomizerTest.java
index 40660a727..f46d79547 100644
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/PetrCfgCustomizerTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/PetrCfgCustomizerTest.java
@@ -27,8 +27,8 @@ import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.when;
import io.fd.honeycomb.translate.write.WriteFailedException;
-import io.fd.vpp.jvpp.core.dto.LispUsePetr;
-import io.fd.vpp.jvpp.core.dto.LispUsePetrReply;
+import io.fd.vpp.jvpp.core.dto.OneUsePetr;
+import io.fd.vpp.jvpp.core.dto.OneUsePetrReply;
import java.util.Arrays;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
@@ -48,7 +48,7 @@ public class PetrCfgCustomizerTest extends LispWriterCustomizerTest {
private PetrCfg disabledCfg;
@Captor
- private ArgumentCaptor<LispUsePetr> requestCaptor;
+ private ArgumentCaptor<OneUsePetr> requestCaptor;
private InstanceIdentifier<PetrCfg> EMPTY_ID = InstanceIdentifier.create(PetrCfg.class);
private PetrCfg EMPTY_DATA = new PetrCfgBuilder().build();
@@ -57,7 +57,7 @@ public class PetrCfgCustomizerTest extends LispWriterCustomizerTest {
customizer = new PetrCfgCustomizer(api, lispStateCheckService);
enabledCfg = new PetrCfgBuilder().setPetrAddress(new IpAddress(new Ipv4Address("192.168.2.1"))).build();
disabledCfg = new PetrCfgBuilder().build();
- when(api.lispUsePetr(any(LispUsePetr.class))).thenReturn(future(new LispUsePetrReply()));
+ when(api.oneUsePetr(any(OneUsePetr.class))).thenReturn(future(new OneUsePetrReply()));
}
@Test
@@ -121,18 +121,18 @@ public class PetrCfgCustomizerTest extends LispWriterCustomizerTest {
}
private void verifyEnabledInvoked() {
- verify(api, times(1)).lispUsePetr(requestCaptor.capture());
+ verify(api, times(1)).oneUsePetr(requestCaptor.capture());
- final LispUsePetr cfg = requestCaptor.getValue();
+ final OneUsePetr cfg = requestCaptor.getValue();
assertEquals(1, cfg.isIp4);
assertTrue(Arrays.equals(new byte[]{-64, -88, 2, 1}, cfg.address));
assertEquals(1, cfg.isAdd);
}
private void verifyDisabledInvoked() {
- verify(api, times(1)).lispUsePetr(requestCaptor.capture());
+ verify(api, times(1)).oneUsePetr(requestCaptor.capture());
- final LispUsePetr cfg = requestCaptor.getValue();
+ final OneUsePetr cfg = requestCaptor.getValue();
assertNull(cfg.address);
assertEquals(0, cfg.isAdd);
}
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/PitrCfgCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/PitrCfgCustomizerTest.java
index ae1b145da..520b5ee72 100755
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/PitrCfgCustomizerTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/PitrCfgCustomizerTest.java
@@ -26,8 +26,8 @@ import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.when;
import io.fd.honeycomb.translate.write.WriteFailedException;
-import io.fd.vpp.jvpp.core.dto.LispPitrSetLocatorSet;
-import io.fd.vpp.jvpp.core.dto.LispPitrSetLocatorSetReply;
+import io.fd.vpp.jvpp.core.dto.OnePitrSetLocatorSet;
+import io.fd.vpp.jvpp.core.dto.OnePitrSetLocatorSetReply;
import java.util.concurrent.ExecutionException;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
@@ -48,7 +48,7 @@ public class PitrCfgCustomizerTest extends LispWriterCustomizerTest {
}
private void whenLispPitrSetLocatorSetThenSuccess() {
- when(api.lispPitrSetLocatorSet(any(LispPitrSetLocatorSet.class))).thenReturn(future(new LispPitrSetLocatorSetReply()));
+ when(api.onePitrSetLocatorSet(any(OnePitrSetLocatorSet.class))).thenReturn(future(new OnePitrSetLocatorSetReply()));
}
@Test(expected = NullPointerException.class)
@@ -68,10 +68,10 @@ public class PitrCfgCustomizerTest extends LispWriterCustomizerTest {
whenLispPitrSetLocatorSetThenSuccess();
customizer.writeCurrentAttributes(null, cfg, null);
- ArgumentCaptor<LispPitrSetLocatorSet> cfgCaptor = ArgumentCaptor.forClass(LispPitrSetLocatorSet.class);
- verify(api, times(1)).lispPitrSetLocatorSet(cfgCaptor.capture());
+ ArgumentCaptor<OnePitrSetLocatorSet> cfgCaptor = ArgumentCaptor.forClass(OnePitrSetLocatorSet.class);
+ verify(api, times(1)).onePitrSetLocatorSet(cfgCaptor.capture());
- LispPitrSetLocatorSet request = cfgCaptor.getValue();
+ OnePitrSetLocatorSet request = cfgCaptor.getValue();
assertEquals(1, request.isAdd);
assertEquals("Locator", new String(request.lsName));
}
@@ -84,10 +84,10 @@ public class PitrCfgCustomizerTest extends LispWriterCustomizerTest {
customizer.writeCurrentAttributes(null, cfg, null);
- ArgumentCaptor<LispPitrSetLocatorSet> cfgCaptor = ArgumentCaptor.forClass(LispPitrSetLocatorSet.class);
- verify(api, times(1)).lispPitrSetLocatorSet(cfgCaptor.capture());
+ ArgumentCaptor<OnePitrSetLocatorSet> cfgCaptor = ArgumentCaptor.forClass(OnePitrSetLocatorSet.class);
+ verify(api, times(1)).onePitrSetLocatorSet(cfgCaptor.capture());
- LispPitrSetLocatorSet request = cfgCaptor.getValue();
+ OnePitrSetLocatorSet request = cfgCaptor.getValue();
assertEquals(1, request.isAdd);
assertEquals("Locator", new String(request.lsName));
}
@@ -110,10 +110,10 @@ public class PitrCfgCustomizerTest extends LispWriterCustomizerTest {
customizer.deleteCurrentAttributes(null, cfg, null);
- ArgumentCaptor<LispPitrSetLocatorSet> cfgCaptor = ArgumentCaptor.forClass(LispPitrSetLocatorSet.class);
- verify(api, times(1)).lispPitrSetLocatorSet(cfgCaptor.capture());
+ ArgumentCaptor<OnePitrSetLocatorSet> cfgCaptor = ArgumentCaptor.forClass(OnePitrSetLocatorSet.class);
+ verify(api, times(1)).onePitrSetLocatorSet(cfgCaptor.capture());
- LispPitrSetLocatorSet request = cfgCaptor.getValue();
+ OnePitrSetLocatorSet request = cfgCaptor.getValue();
assertEquals(0, request.isAdd);
assertEquals("Locator", new String(request.lsName));
}
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/RemoteMappingCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/RemoteMappingCustomizerTest.java
index 5130881ed..35cc87689 100755
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/RemoteMappingCustomizerTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/RemoteMappingCustomizerTest.java
@@ -16,13 +16,28 @@
package io.fd.hc2vpp.lisp.translate.write;
+import static org.hamcrest.Matchers.hasSize;
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertThat;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
import io.fd.hc2vpp.common.test.write.WriterCustomizerTest;
import io.fd.hc2vpp.common.translate.util.Ipv4Translator;
import io.fd.hc2vpp.lisp.context.util.EidMappingContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
-import io.fd.vpp.jvpp.core.dto.LispAddDelRemoteMapping;
-import io.fd.vpp.jvpp.core.dto.LispAddDelRemoteMappingReply;
-import io.fd.vpp.jvpp.core.types.RemoteLocator;
+import io.fd.vpp.jvpp.core.dto.OneAddDelRemoteMapping;
+import io.fd.vpp.jvpp.core.dto.OneAddDelRemoteMappingReply;
+import io.fd.vpp.jvpp.core.types.OneRemoteLocator;
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
@@ -52,20 +67,10 @@ 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.lisp.feature.data.grouping.LispFeatureData;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import java.util.Arrays;
-import java.util.List;
-import java.util.stream.Collectors;
-
-import static org.hamcrest.Matchers.hasSize;
-import static org.junit.Assert.*;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.*;
-
public class RemoteMappingCustomizerTest extends WriterCustomizerTest implements Ipv4Translator {
@Captor
- private ArgumentCaptor<LispAddDelRemoteMapping> mappingCaptor;
+ private ArgumentCaptor<OneAddDelRemoteMapping> mappingCaptor;
private MappingId mappingId;
private RemoteMappingCustomizer customizer;
@@ -130,24 +135,24 @@ public class RemoteMappingCustomizerTest extends WriterCustomizerTest implements
customizer = new RemoteMappingCustomizer(api, remoteMappingContext);
- when(api.lispAddDelRemoteMapping(any())).thenReturn(future(new LispAddDelRemoteMappingReply()));
+ when(api.oneAddDelRemoteMapping(any())).thenReturn(future(new OneAddDelRemoteMappingReply()));
}
@Test
public void testWritePositiveMappingNoPrioNoWeight() throws WriteFailedException {
customizer.writeCurrentAttributes(id, positiveMappingNoPrioNoWeight, writeContext);
- verify(api, times(1)).lispAddDelRemoteMapping(mappingCaptor.capture());
+ verify(api, times(1)).oneAddDelRemoteMapping(mappingCaptor.capture());
- final LispAddDelRemoteMapping request = mappingCaptor.getValue();
+ final OneAddDelRemoteMapping request = mappingCaptor.getValue();
assertNotNull(request);
assertEquals(1, request.isAdd);
assertEquals("192.168.2.1", arrayToIpv4AddressNoZone(request.eid).getValue());
assertEquals(25, request.vni);
- final List<RemoteLocator> remoteLocators = Arrays.stream(request.rlocs).collect(Collectors.toList());
- assertThat(remoteLocators, hasSize(1));
+ final List<OneRemoteLocator> oneRemoteLocators = Arrays.stream(request.rlocs).collect(Collectors.toList());
+ assertThat(oneRemoteLocators, hasSize(1));
- final RemoteLocator locator = remoteLocators.get(0);
+ final OneRemoteLocator locator = oneRemoteLocators.get(0);
assertArrayEquals(new byte[]{-64, -88, 2, 2}, locator.addr);
assertEquals(1, locator.isIp4);
assertEquals(0, locator.priority);
@@ -157,18 +162,18 @@ public class RemoteMappingCustomizerTest extends WriterCustomizerTest implements
@Test
public void testWritePositiveMappingPrioWeight() throws WriteFailedException {
customizer.writeCurrentAttributes(id, positiveMappingPrioWeight, writeContext);
- verify(api, times(1)).lispAddDelRemoteMapping(mappingCaptor.capture());
+ verify(api, times(1)).oneAddDelRemoteMapping(mappingCaptor.capture());
- final LispAddDelRemoteMapping request = mappingCaptor.getValue();
+ final OneAddDelRemoteMapping request = mappingCaptor.getValue();
assertNotNull(request);
assertEquals(1, request.isAdd);
assertEquals("192.168.2.1", arrayToIpv4AddressNoZone(request.eid).getValue());
assertEquals(25, request.vni);
- final List<RemoteLocator> remoteLocators = Arrays.stream(request.rlocs).collect(Collectors.toList());
- assertThat(remoteLocators, hasSize(1));
+ final List<OneRemoteLocator> oneRemoteLocators = Arrays.stream(request.rlocs).collect(Collectors.toList());
+ assertThat(oneRemoteLocators, hasSize(1));
- final RemoteLocator locator = remoteLocators.get(0);
+ final OneRemoteLocator locator = oneRemoteLocators.get(0);
assertArrayEquals(new byte[]{-64, -88, 2, 3}, locator.addr);
assertEquals(1, locator.isIp4);
assertEquals(2, locator.priority);
@@ -189,9 +194,9 @@ public class RemoteMappingCustomizerTest extends WriterCustomizerTest implements
public void testWriteCurrentAttributes() throws WriteFailedException {
customizer.writeCurrentAttributes(id, negativeMapping, writeContext);
- verify(api, times(1)).lispAddDelRemoteMapping(mappingCaptor.capture());
+ verify(api, times(1)).oneAddDelRemoteMapping(mappingCaptor.capture());
- LispAddDelRemoteMapping request = mappingCaptor.getValue();
+ OneAddDelRemoteMapping request = mappingCaptor.getValue();
assertNotNull(request);
assertEquals(1, request.isAdd);
@@ -214,9 +219,9 @@ public class RemoteMappingCustomizerTest extends WriterCustomizerTest implements
when(remoteMappingContext.containsEid(any(), eq(mappingContext))).thenReturn(true);
customizer.deleteCurrentAttributes(id, negativeMapping, writeContext);
- verify(api, times(1)).lispAddDelRemoteMapping(mappingCaptor.capture());
+ verify(api, times(1)).oneAddDelRemoteMapping(mappingCaptor.capture());
- LispAddDelRemoteMapping request = mappingCaptor.getValue();
+ OneAddDelRemoteMapping request = mappingCaptor.getValue();
assertNotNull(request);
assertEquals(0, request.isAdd);
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/RlocProbeCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/RlocProbeCustomizerTest.java
index e2a6b3e9f..6ae8277e4 100644
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/RlocProbeCustomizerTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/RlocProbeCustomizerTest.java
@@ -26,8 +26,8 @@ import static org.mockito.Mockito.when;
import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
import io.fd.honeycomb.translate.write.WriteFailedException;
-import io.fd.vpp.jvpp.core.dto.LispRlocProbeEnableDisable;
-import io.fd.vpp.jvpp.core.dto.LispRlocProbeEnableDisableReply;
+import io.fd.vpp.jvpp.core.dto.OneRlocProbeEnableDisable;
+import io.fd.vpp.jvpp.core.dto.OneRlocProbeEnableDisableReply;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
@@ -43,7 +43,7 @@ public class RlocProbeCustomizerTest extends LispWriterCustomizerTest implements
private RlocProbe disabledProbe;
@Captor
- private ArgumentCaptor<LispRlocProbeEnableDisable> requestCaptor;
+ private ArgumentCaptor<OneRlocProbeEnableDisable> requestCaptor;
private InstanceIdentifier<RlocProbe> EMPTY_ID = InstanceIdentifier.create(RlocProbe.class);
private RlocProbe EMPTY_DATA = new RlocProbeBuilder().build();
@@ -52,8 +52,8 @@ public class RlocProbeCustomizerTest extends LispWriterCustomizerTest implements
customizer = new RlocProbeCustomizer(api, lispStateCheckService);
enabledProbe = rlocProbe(true);
disabledProbe = rlocProbe(false);
- when(api.lispRlocProbeEnableDisable(any(LispRlocProbeEnableDisable.class)))
- .thenReturn(future(new LispRlocProbeEnableDisableReply()));
+ when(api.oneRlocProbeEnableDisable(any(OneRlocProbeEnableDisable.class)))
+ .thenReturn(future(new OneRlocProbeEnableDisableReply()));
}
@Test
@@ -121,8 +121,8 @@ public class RlocProbeCustomizerTest extends LispWriterCustomizerTest implements
}
private void verifyRequest(final boolean enabled) {
- verify(api, times(1)).lispRlocProbeEnableDisable(requestCaptor.capture());
- final LispRlocProbeEnableDisable request = requestCaptor.getValue();
+ verify(api, times(1)).oneRlocProbeEnableDisable(requestCaptor.capture());
+ final OneRlocProbeEnableDisable request = requestCaptor.getValue();
assertEquals(booleanToByte(enabled), request.isEnabled);
}
} \ No newline at end of file
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/trait/SubtableWriterTestCase.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/trait/SubtableWriterTestCase.java
index 50186cd2b..64fd742e0 100644
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/trait/SubtableWriterTestCase.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/trait/SubtableWriterTestCase.java
@@ -24,22 +24,22 @@ import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import io.fd.hc2vpp.common.test.write.WriterCustomizerTest;
-import io.fd.vpp.jvpp.core.dto.LispEidTableAddDelMap;
-import io.fd.vpp.jvpp.core.dto.LispEidTableAddDelMapReply;
+import io.fd.vpp.jvpp.core.dto.OneEidTableAddDelMap;
+import io.fd.vpp.jvpp.core.dto.OneEidTableAddDelMapReply;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
import org.mockito.Mockito;
public class SubtableWriterTestCase extends WriterCustomizerTest implements SubtableWriter {
@Captor
- protected ArgumentCaptor<LispEidTableAddDelMap> requestCaptor;
+ protected ArgumentCaptor<OneEidTableAddDelMap> requestCaptor;
protected void verifyAddDelEidTableAddDelMapInvokedCorrectly(final int addDel, final int vni, final int tableId,
final int isL2) {
- verify(api, times(1)).lispEidTableAddDelMap(requestCaptor.capture());
+ verify(api, times(1)).oneEidTableAddDelMap(requestCaptor.capture());
- final LispEidTableAddDelMap request = requestCaptor.getValue();
+ final OneEidTableAddDelMap request = requestCaptor.getValue();
assertNotNull(request);
assertEquals(addDel, request.isAdd);
assertEquals(vni, request.vni);
@@ -48,12 +48,12 @@ public class SubtableWriterTestCase extends WriterCustomizerTest implements Subt
}
protected void whenAddDelEidTableAddDelMapSuccess() {
- when(api.lispEidTableAddDelMap(Mockito.any(LispEidTableAddDelMap.class)))
- .thenReturn(future(new LispEidTableAddDelMapReply()));
+ when(api.oneEidTableAddDelMap(Mockito.any(OneEidTableAddDelMap.class)))
+ .thenReturn(future(new OneEidTableAddDelMapReply()));
}
protected void whenAddDelEidTableAddDelMapFail() {
- when(api.lispEidTableAddDelMap(Mockito.any(LispEidTableAddDelMap.class)))
+ when(api.oneEidTableAddDelMap(Mockito.any(OneEidTableAddDelMap.class)))
.thenReturn(failedFuture());
}
}
diff --git a/vpp-common/vpp-common-integration/src/main/java/io/fd/hc2vpp/common/integration/VppCommonModule.java b/vpp-common/vpp-common-integration/src/main/java/io/fd/hc2vpp/common/integration/VppCommonModule.java
index 4da2d9a13..7e6a0f7a4 100644
--- a/vpp-common/vpp-common-integration/src/main/java/io/fd/hc2vpp/common/integration/VppCommonModule.java
+++ b/vpp-common/vpp-common-integration/src/main/java/io/fd/hc2vpp/common/integration/VppCommonModule.java
@@ -19,11 +19,11 @@ package io.fd.hc2vpp.common.integration;
import com.google.inject.AbstractModule;
import com.google.inject.Singleton;
import com.google.inject.multibindings.Multibinder;
-import io.fd.honeycomb.translate.read.ReaderFactory;
import io.fd.hc2vpp.common.translate.util.VppStatusListener;
-import net.jmob.guice.conf.core.ConfigurationModule;
+import io.fd.honeycomb.translate.read.ReaderFactory;
import io.fd.vpp.jvpp.JVppRegistry;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
+import net.jmob.guice.conf.core.ConfigurationModule;
public final class VppCommonModule extends AbstractModule {
protected void configure() {
@@ -41,5 +41,4 @@ public final class VppCommonModule extends AbstractModule {
final Multibinder<ReaderFactory> readerBinder = Multibinder.newSetBinder(binder(), ReaderFactory.class);
readerBinder.addBinding().toProvider(ContextsReaderFactoryProvider.class).in(Singleton.class);
}
-
}