summaryrefslogtreecommitdiffstats
path: root/lisp/lisp2vpp/src/main/java/io/fd
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/lisp2vpp/src/main/java/io/fd')
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/context/util/AdjacenciesMappingContext.java2
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/context/util/ContextsReaderFactory.java4
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/context/util/ContextsReaderFactoryProvider.java2
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/context/util/EidMappingContext.java2
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/gpe/translate/read/GpeForwardEntryCustomizer.java4
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/gpe/translate/read/NativeForwardPathCustomizer.java4
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/gpe/translate/read/NativeForwardPathsTableCustomizer.java4
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/gpe/translate/service/GpeStateCheckServiceImpl.java6
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/AdjacencyCustomizer.java2
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/BridgeDomainSubtableCustomizer.java2
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/InterfaceCustomizer.java2
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/ItrRemoteLocatorSetCustomizer.java2
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LispStateCustomizer.java2
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocalMappingCustomizer.java2
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocatorSetCustomizer.java2
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapResolverCustomizer.java2
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapServerCustomizer.java2
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/RemoteMappingCustomizer.java4
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VniTableCustomizer.java2
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VrfSubtableCustomizer.java2
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/service/LispStateCheckServiceImpl.java6
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/LocatorSetCustomizer.java4
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/VniTableCustomizer.java2
23 files changed, 33 insertions, 33 deletions
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/context/util/AdjacenciesMappingContext.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/context/util/AdjacenciesMappingContext.java
index b21aa2a0f..16131382f 100644
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/context/util/AdjacenciesMappingContext.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/context/util/AdjacenciesMappingContext.java
@@ -19,7 +19,7 @@ package io.fd.hc2vpp.lisp.context.util;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkState;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.honeycomb.translate.MappingContext;
import io.fd.honeycomb.translate.util.RWUtils;
import java.util.stream.Collector;
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/context/util/ContextsReaderFactory.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/context/util/ContextsReaderFactory.java
index b9acc6a3e..947d28b67 100644
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/context/util/ContextsReaderFactory.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/context/util/ContextsReaderFactory.java
@@ -19,8 +19,8 @@ package io.fd.hc2vpp.lisp.context.util;
import io.fd.honeycomb.translate.read.ReaderFactory;
import io.fd.honeycomb.translate.read.registry.ModifiableReaderRegistryBuilder;
import io.fd.honeycomb.translate.util.read.BindingBrokerReader;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
+import org.opendaylight.mdsal.binding.api.DataBroker;
+import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.eid.mapping.context.rev160801.Contexts;
import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.eid.mapping.context.rev160801.ContextsBuilder;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/context/util/ContextsReaderFactoryProvider.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/context/util/ContextsReaderFactoryProvider.java
index e6794ed38..af29824c5 100644
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/context/util/ContextsReaderFactoryProvider.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/context/util/ContextsReaderFactoryProvider.java
@@ -20,7 +20,7 @@ import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.inject.name.Named;
import io.fd.honeycomb.translate.read.ReaderFactory;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.mdsal.binding.api.DataBroker;
public class ContextsReaderFactoryProvider implements Provider<ReaderFactory> {
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/context/util/EidMappingContext.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/context/util/EidMappingContext.java
index c10114036..9f3d91043 100644
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/context/util/EidMappingContext.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/context/util/EidMappingContext.java
@@ -18,7 +18,7 @@ package io.fd.hc2vpp.lisp.context.util;
import static com.google.common.base.Preconditions.checkArgument;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.lisp.translate.util.EidTranslator;
import io.fd.honeycomb.translate.MappingContext;
import io.fd.honeycomb.translate.util.RWUtils;
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/gpe/translate/read/GpeForwardEntryCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/gpe/translate/read/GpeForwardEntryCustomizer.java
index a875cfd2f..803d472f6 100644
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/gpe/translate/read/GpeForwardEntryCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/gpe/translate/read/GpeForwardEntryCustomizer.java
@@ -18,7 +18,6 @@ package io.fd.hc2vpp.lisp.gpe.translate.read;
import static java.lang.String.format;
-import com.google.common.base.Optional;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
import io.fd.hc2vpp.common.translate.util.NamingContext;
@@ -44,6 +43,7 @@ import io.fd.jvpp.core.types.GpeLocator;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
+import java.util.Optional;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.annotation.Nonnull;
@@ -244,7 +244,7 @@ public class GpeForwardEntryCustomizer extends FutureJVppCustomizer
private Stream<Integer> activeVnis(final InstanceIdentifier<GpeEntry> id,
final ModificationCache cache) throws ReadFailedException {
- final int[] vnis = activeVnisDumpManager.getDump(id, cache).or(() -> {
+ final int[] vnis = activeVnisDumpManager.getDump(id, cache).orElseGet(() -> {
final GpeFwdEntryVnisGetReply reply = new GpeFwdEntryVnisGetReply();
reply.vnis = new int[0];
return reply;
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/gpe/translate/read/NativeForwardPathCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/gpe/translate/read/NativeForwardPathCustomizer.java
index 5d06b4c68..70cfa6d38 100644
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/gpe/translate/read/NativeForwardPathCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/gpe/translate/read/NativeForwardPathCustomizer.java
@@ -170,13 +170,13 @@ public class NativeForwardPathCustomizer extends FutureJVppCustomizer
final ModificationCache modificationCache,
final DumpCacheManager<GpeNativeFwdRpathsGetReply, Integer> dumpCacheManager)
throws ReadFailedException {
- return dumpCacheManager.getDump(id, modificationCache, 1).or(DEFAULT_DUMP);
+ return dumpCacheManager.getDump(id, modificationCache, 1).orElse(DEFAULT_DUMP);
}
private static GpeNativeFwdRpathsGetReply v6Dump(final @Nonnull InstanceIdentifier<?> id,
final ModificationCache modificationCache,
final DumpCacheManager<GpeNativeFwdRpathsGetReply, Integer> dumpCacheManager)
throws ReadFailedException {
- return dumpCacheManager.getDump(id, modificationCache, 0).or(DEFAULT_DUMP);
+ return dumpCacheManager.getDump(id, modificationCache, 0).orElse(DEFAULT_DUMP);
}
}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/gpe/translate/read/NativeForwardPathsTableCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/gpe/translate/read/NativeForwardPathsTableCustomizer.java
index 6fb1f4207..d9b7ca69d 100644
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/gpe/translate/read/NativeForwardPathsTableCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/gpe/translate/read/NativeForwardPathsTableCustomizer.java
@@ -143,7 +143,7 @@ public class NativeForwardPathsTableCustomizer extends FutureJVppCustomizer impl
private Stream<Integer> v4FibsStream(final InstanceIdentifier<NativeForwardPathsTable> id,
final ReadContext ctx) throws ReadFailedException {
- return dumpCacheManagerV4.getDump(id, ctx.getModificationCache()).or(DEFAULT_REPLY_V4)
+ return dumpCacheManagerV4.getDump(id, ctx.getModificationCache()).orElse(DEFAULT_REPLY_V4)
.ipFibDetails.stream()
.map(ipFibDetails -> ipFibDetails.tableId);
}
@@ -151,7 +151,7 @@ public class NativeForwardPathsTableCustomizer extends FutureJVppCustomizer impl
private Stream<Integer> v6FibsStream(final InstanceIdentifier<NativeForwardPathsTable> id,
final ReadContext ctx) throws ReadFailedException {
- return dumpCacheManagerV6.getDump(id, ctx.getModificationCache()).or(DEFAULT_REPLY_V6)
+ return dumpCacheManagerV6.getDump(id, ctx.getModificationCache()).orElse(DEFAULT_REPLY_V6)
.ip6FibDetails.stream()
.map(ip6FibDetails -> ip6FibDetails.tableId);
}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/gpe/translate/service/GpeStateCheckServiceImpl.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/gpe/translate/service/GpeStateCheckServiceImpl.java
index 5415e0fd6..d73abbaee 100644
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/gpe/translate/service/GpeStateCheckServiceImpl.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/gpe/translate/service/GpeStateCheckServiceImpl.java
@@ -58,13 +58,13 @@ public final class GpeStateCheckServiceImpl implements GpeStateCheckService, Jvp
@Override
public void checkGpeEnabledBefore(@Nonnull final WriteContext writeContext) {
- checkState(writeContext.readBefore(GPE_FEATURE_CONFIG_ID).or(DISABLED_GPE).isEnable(),
+ checkState(writeContext.readBefore(GPE_FEATURE_CONFIG_ID).orElse(DISABLED_GPE).isEnable(),
"Gpe feature is disabled");
}
@Override
public void checkGpeEnabledAfter(@Nonnull final WriteContext writeContext) {
- checkState(writeContext.readAfter(GPE_FEATURE_CONFIG_ID).or(DISABLED_GPE).isEnable(),
+ checkState(writeContext.readAfter(GPE_FEATURE_CONFIG_ID).orElse(DISABLED_GPE).isEnable(),
"Gpe feature is disabled");
}
@@ -73,7 +73,7 @@ public final class GpeStateCheckServiceImpl implements GpeStateCheckService, Jvp
try {
return byteToBoolean(
dumpCacheManager.getDump(GPE_FEATURE_STATE_ID, readContext.getModificationCache())
- .or(DEFAULT_REPLY).gpeStatus);
+ .orElse(DEFAULT_REPLY).gpeStatus);
} catch (ReadFailedException e) {
throw new IllegalStateException("Unable to read Gpe feature status", e);
}
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 600ae920f..54c54615c 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
@@ -19,7 +19,7 @@ package io.fd.hc2vpp.lisp.translate.read;
import static com.google.common.base.Preconditions.checkNotNull;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
import io.fd.hc2vpp.lisp.context.util.AdjacenciesMappingContext;
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 95de31a07..9c021f864 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
@@ -18,7 +18,7 @@ package io.fd.hc2vpp.lisp.translate.read;
import static com.google.common.base.Preconditions.checkNotNull;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.hc2vpp.lisp.translate.read.dump.executor.params.SubtableDumpParams;
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 3db6d8152..40c13d9ad 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
@@ -20,7 +20,7 @@ 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 java.util.Optional;
import com.google.common.collect.ImmutableSet;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
import io.fd.hc2vpp.common.translate.util.NamingContext;
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 d5f242979..60c569f0a 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
@@ -17,7 +17,7 @@
package io.fd.hc2vpp.lisp.translate.read;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
import io.fd.hc2vpp.lisp.translate.read.init.LispInitPathsMapper;
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 8f07eed55..98561dbb3 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
@@ -17,7 +17,6 @@
package io.fd.hc2vpp.lisp.translate.read;
-import com.google.common.base.Optional;
import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
@@ -33,6 +32,7 @@ import io.fd.jvpp.core.dto.OneLocatorSetDetailsReplyDump;
import io.fd.jvpp.core.dto.ShowOneStatus;
import io.fd.jvpp.core.dto.ShowOneStatusReply;
import io.fd.jvpp.core.future.FutureJVppCore;
+import java.util.Optional;
import java.util.concurrent.TimeoutException;
import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.lisp.rev171013.Lisp;
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 f69d027e1..c91818cd6 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
@@ -23,7 +23,7 @@ import static io.fd.hc2vpp.lisp.translate.read.dump.executor.params.MappingsDump
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 java.util.Optional;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.hc2vpp.lisp.context.util.EidMappingContext;
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 3b7bf1742..e21683e7c 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
@@ -16,7 +16,7 @@
package io.fd.hc2vpp.lisp.translate.read;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
import io.fd.hc2vpp.lisp.translate.read.init.LispInitPathsMapper;
import io.fd.hc2vpp.lisp.translate.read.trait.LocatorSetReader;
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 683570e88..416ad16fe 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
@@ -16,7 +16,7 @@
package io.fd.hc2vpp.lisp.translate.read;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.translate.util.AddressTranslator;
import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
import io.fd.hc2vpp.lisp.translate.read.init.LispInitPathsMapper;
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 eeac659ea..cb21594c7 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
@@ -16,7 +16,7 @@
package io.fd.hc2vpp.lisp.translate.read;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.translate.util.AddressTranslator;
import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
import io.fd.hc2vpp.lisp.translate.service.LispStateCheckService;
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 7f0240990..2ef291307 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
@@ -22,7 +22,6 @@ import static io.fd.hc2vpp.lisp.translate.read.dump.executor.params.MappingsDump
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 com.google.common.base.Optional;
import com.google.common.collect.ImmutableSet;
import io.fd.hc2vpp.common.translate.util.AddressTranslator;
import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
@@ -53,6 +52,7 @@ import io.fd.jvpp.core.dto.OneLocatorDetailsReplyDump;
import io.fd.jvpp.core.future.FutureJVppCore;
import java.util.Collections;
import java.util.List;
+import java.util.Optional;
import java.util.stream.Collectors;
import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.lisp.rev171013.MapReplyAction;
@@ -248,7 +248,7 @@ public class RemoteMappingCustomizer extends FutureJVppCustomizer
reply = locatorsDumpManager.getDump(locatorIfaceIdentifier, cache,
new LocatorDumpParamsBuilder().setLocatorSetIndex(details.locatorSetIndex).build());
- bindPositiveMapping(builder, reply.or(new OneLocatorDetailsReplyDump()));
+ bindPositiveMapping(builder, reply.orElse(new OneLocatorDetailsReplyDump()));
}
}
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 7eb4a3a88..e8cf821e2 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
@@ -18,7 +18,7 @@ package io.fd.hc2vpp.lisp.translate.read;
import static com.google.common.base.Preconditions.checkState;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
import io.fd.hc2vpp.lisp.translate.service.LispStateCheckService;
import io.fd.hc2vpp.lisp.translate.util.CheckedLispCustomizer;
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 ac20f494f..9127343d9 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
@@ -18,7 +18,7 @@ package io.fd.hc2vpp.lisp.translate.read;
import static com.google.common.base.Preconditions.checkNotNull;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
import io.fd.hc2vpp.lisp.translate.read.dump.executor.params.SubtableDumpParams;
import io.fd.hc2vpp.lisp.translate.read.init.LispInitPathsMapper;
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 d6bad6403..6bb5ca56e 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
@@ -55,14 +55,14 @@ public final class LispStateCheckServiceImpl implements LispStateCheckService, J
public void checkLispEnabledBefore(@Nonnull final WriteContext ctx) {
// no need to dump here, can be read directly from context
checkState(ctx.readBefore(InstanceIdentifier.create(Lisp.class))
- .or(STATIC_LISP_INSTANCE).isEnable(), "Lisp feature not enabled");
+ .orElse(STATIC_LISP_INSTANCE).isEnable(), "Lisp feature not enabled");
}
@Override
public void checkLispEnabledAfter(@Nonnull final WriteContext ctx) {
// no need to dump here, can be read directly from context
checkState(ctx.readAfter(InstanceIdentifier.create(Lisp.class))
- .or(STATIC_LISP_INSTANCE).isEnable(), "Lisp feature not enabled");
+ .orElse(STATIC_LISP_INSTANCE).isEnable(), "Lisp feature not enabled");
}
@Override
@@ -70,7 +70,7 @@ public final class LispStateCheckServiceImpl implements LispStateCheckService, J
// in this case it must be dumped
try {
return byteToBoolean(dumpManager.getDump(IDENTIFIER, ctx.getModificationCache())
- .or(DEFAULT_REPLY).featureStatus);
+ .orElse(DEFAULT_REPLY).featureStatus);
} catch (ReadFailedException e) {
throw new IllegalStateException("Unable to read Lisp Feature status", e);
}
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 6b21c1871..73bc7eddd 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
@@ -20,7 +20,6 @@ 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 com.google.common.base.Optional;
import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.hc2vpp.common.translate.util.ReferenceCheck;
@@ -35,6 +34,7 @@ import io.fd.jvpp.core.future.FutureJVppCore;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
+import java.util.Optional;
import java.util.stream.Collectors;
import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.lisp.rev171013.DpSubtableGrouping;
@@ -100,7 +100,7 @@ public class LocatorSetCustomizer extends CheckedLispCustomizer
if (eidTableData.isPresent()) {
// due to non-functional LeafRefValidation, it must be checked like this
final List<VniTable> vniTables =
- Optional.fromNullable(eidTableData.get().getVniTable()).or(Collections.emptyList());
+ Optional.ofNullable(eidTableData.get().getVniTable()).orElse(Collections.emptyList());
checkReferenceExist(id, vrfReferences(vniTables, locatorSetName));
checkReferenceExist(id, bdReferences(vniTables, locatorSetName));
}
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 4a135ae01..e9cca91a3 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
@@ -18,7 +18,7 @@ package io.fd.hc2vpp.lisp.translate.write;
import static com.google.common.base.Preconditions.checkState;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.lisp.translate.service.LispStateCheckService;
import io.fd.hc2vpp.lisp.translate.util.CheckedLispCustomizer;
import io.fd.honeycomb.translate.spi.write.ListWriterCustomizer;