summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/AbstractAclCustomizer.java2
-rw-r--r--acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/AclCustomizer.java2
-rw-r--r--acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/EgressAclCustomizer.java2
-rw-r--r--acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/IngressAclCustomizer.java2
-rw-r--r--acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/InterfaceAclCustomizer.java9
-rw-r--r--acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/util/AclContextManagerImpl.java2
-rw-r--r--acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/write/AclValidator.java2
-rw-r--r--acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/AclModuleTest.java2
-rw-r--r--acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/write/AclCustomizerTest.java10
-rw-r--r--acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/write/AclValidatorTest.java2
-rw-r--r--dhcp/dhcp-impl/src/main/java/io/fd/hc2vpp/dhcp/read/DhcpRelayCustomizer.java2
-rw-r--r--dhcp/dhcp-impl/src/test/java/io/fd/hc2vpp/dhcp/DhcpModuleTest.java2
-rw-r--r--fib-management/fib-management-impl/src/main/java/io/fd/hc2vpp/fib/management/read/FibTableCustomizer.java8
-rw-r--r--fib-management/fib-management-impl/src/test/java/io/fd/hc2vpp/fib/management/FibManagementModuleTest.java2
-rw-r--r--ioam/impl/src/test/java/io/fd/hc2vpp/vppioam/impl/VppIoamModuleTest.java2
-rw-r--r--ipsec/ipsec-impl/src/main/java/io/fd/hc2vpp/ipsec/read/IpsecStateCustomizer.java2
-rw-r--r--ipsec/ipsec-impl/src/main/java/io/fd/hc2vpp/ipsec/read/IpsecStateSpdCustomizer.java2
-rw-r--r--it/api-test/pom.xml6
-rw-r--r--l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/Ipv4AddressCustomizer.java2
-rw-r--r--l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/Ipv4NeighbourCustomizer.java2
-rw-r--r--l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/subinterface/SubInterfaceIpv4AddressCustomizer.java2
-rw-r--r--l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/subinterface/SubInterfaceIpv4NeighbourCustomizer.java2
-rw-r--r--l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/Ipv6AddressCustomizer.java2
-rw-r--r--l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/Ipv6NeighbourCustomizer.java2
-rw-r--r--l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/nd/NdProxyCustomizer.java2
-rw-r--r--l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/subinterface/SubInterfaceIpv6AddressCustomizer.java2
-rw-r--r--l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/subinterface/SubInterfaceIpv6NeighbourCustomizer.java2
-rw-r--r--l3/utils/src/main/java/io/fd/hc2vpp/l3/utils/ip/read/IpAddressReader.java6
-rw-r--r--l3/utils/src/main/java/io/fd/hc2vpp/l3/utils/ip/read/IpNeighbourReader.java2
-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
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/LispModuleTest.java2
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/context/util/AdjacenciesMappingContextTest.java2
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/LispStateCustomizerTest.java6
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/service/LispStateCheckServiceImplTest.java6
-rwxr-xr-xlisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/LocatorSetCustomizerTest.java9
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/VniTableCustomizerTest.java6
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/util/AdjacencyMappingContextTestHelper.java4
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/util/EidMappingContextHelper.java4
-rw-r--r--nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ExternalIpPoolCustomizer.java20
-rw-r--r--nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/MappingEntryCustomizer.java8
-rw-r--r--nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/NatInstanceCustomizer.java4
-rw-r--r--nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/AbstractInterfaceNatCustomizer.java8
-rw-r--r--nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/util/MappingEntryContext.java25
-rw-r--r--nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/write/MappingEntryCustomizer.java2
-rw-r--r--nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/NatModuleTest.java2
-rw-r--r--nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/util/MappingEntryContextTest.java8
-rw-r--r--nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/VppNshModuleTest.java2
-rw-r--r--release-notes/src/main/asciidoc/devel_guide/devel_plugin_vpp_tutorial.adoc2
-rw-r--r--routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/ControlPlaneProtocolCustomizer.java2
-rw-r--r--routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/Ipv4RouteCustomizer.java2
-rw-r--r--routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/Ipv6RouteCustomizer.java2
-rw-r--r--routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/Ipv4RouteCustomizer.java2
-rw-r--r--routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/Ipv6RouteCustomizer.java2
-rw-r--r--routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/trait/RouteRequestProducer.java4
-rw-r--r--routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/RoutingModuleTest.java2
-rw-r--r--routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/ControlPlaneProtocolCustomizerTest.java6
-rw-r--r--routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv4RouteCustomizerTest.java2
-rw-r--r--routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv6RouteCustomizerTest.java2
-rw-r--r--routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/RouteCustomizerTest.java6
-rw-r--r--samples/samples-impl/src/main/java/io/fd/hc2vpp/samples/read/VxlanReadCustomizer.java2
-rw-r--r--srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/policy/request/PolicyReadRequest.java8
-rw-r--r--srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/sid/request/LocalSidReadRequest.java4
-rw-r--r--srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/sid/request/LocatorReadRequest.java4
-rw-r--r--srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/steering/request/L2SteeringRequest.java4
-rw-r--r--srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/steering/request/L3SteeringRequest.java6
-rw-r--r--srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/CandidatePathContextManagerImpl.java2
-rw-r--r--srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/LocatorContextManagerImpl.java2
-rw-r--r--srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/PolicyContextManagerImpl.java2
-rw-r--r--srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/Srv6Util.java2
-rw-r--r--srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/write/policy/PolicyCustomizer.java2
-rw-r--r--srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/write/sid/SidCustomizer.java2
-rw-r--r--srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/Srv6ModuleTest.java2
-rw-r--r--srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/sid/SidCustomizerTest.java2
-rw-r--r--srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/util/LocatorContextManagerImplTest.java2
-rw-r--r--srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/util/Srv6UtilTest.java2
-rw-r--r--srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/util/function/LocalSidFunctionBindingRegistryTest.java2
-rw-r--r--srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/write/policy/PolicyCustomizerTest.java2
-rw-r--r--srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/write/sid/SidCustomizerTest.java2
-rw-r--r--srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/write/steering/InterfacesConfigCustomizerTest.java2
-rw-r--r--srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/write/steering/PrefixCustomizerTest.java2
-rw-r--r--srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/write/steering/PrefixesConfigCustomizerTest.java2
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/DisabledInterfacesManager.java6
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/InterfaceRoutingCustomizer.java2
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/SubInterfaceRoutingCustomizer.java2
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/AfPacketCustomizer.java2
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/InterconnectionReadUtils.java2
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/TapV2Customizer.java2
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/VhostUserCustomizer.java2
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/cache/InterfaceCacheDumpManagerImpl.java4
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/BridgeDomainCustomizer.java2
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducer.java2
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/DisabledInterfacesManagerTest.java4
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/V3poModuleTest.java2
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/InterfaceRoutingCustomizerTest.java12
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/InterfaceTypeTestUtils.java2
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/SubInterfaceRoutingCustomizerTest.java14
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2/BridgeDomainCustomizerTest.java8
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2state/L2StateTest.java2
-rw-r--r--vpp-classifier/impl/src/main/java/io/fd/hc2vpp/policer/read/InterfacePolicerCustomizer.java2
-rw-r--r--vpp-classifier/impl/src/main/java/io/fd/hc2vpp/policer/read/PolicerCustomizer.java2
-rw-r--r--vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/context/VppClassifierContextManager.java2
-rw-r--r--vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/context/VppClassifierContextManagerImpl.java16
-rw-r--r--vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifySessionReader.java6
-rw-r--r--vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifyTableReader.java2
-rw-r--r--vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/VppNodeReader.java4
-rw-r--r--vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/write/ClassifySessionWriter.java2
-rw-r--r--vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/VppClassifierModuleTest.java2
-rw-r--r--vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/context/VppClassifierContextManagerImplTest.java6
-rw-r--r--vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/read/ClassifyTableReaderTest.java4
-rw-r--r--vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/write/ClassifySessionWriterTest.java4
-rw-r--r--vpp-common/naming-context-impl/src/main/java/io/fd/hc2vpp/common/context/ContextsReaderFactory.java4
-rw-r--r--vpp-common/vpp-common-integration/src/main/java/io/fd/hc2vpp/common/integration/ContextsReaderFactoryProvider.java2
-rw-r--r--vpp-common/vpp-common-integration/src/test/java/io/fd/hc2vpp/common/integration/VppCommonModuleTest.java2
-rw-r--r--vpp-common/vpp-translate-test/src/main/java/io/fd/hc2vpp/common/test/util/NamingContextHelper.java4
-rw-r--r--vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/AbstractInterfaceTypeCustomizer.java2
-rw-r--r--vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/MultiNamingContext.java2
-rw-r--r--vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/NamingContext.java6
-rw-r--r--vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/MultiNamingContextTest.java4
-rw-r--r--vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/NamingContextTest.java8
-rw-r--r--vpp-integration/api-docs/scripts/src/main/java/io/fd/hc2vpp/docs/core/mock/binding/MockBindingModule.java2
-rw-r--r--vpp-management/impl/src/test/java/io/fd/hc2vpp/management/state/VppStateTest.java2
143 files changed, 267 insertions, 258 deletions
diff --git a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/AbstractAclCustomizer.java b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/AbstractAclCustomizer.java
index 9cc7e7d76..f5c1a27c9 100644
--- a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/AbstractAclCustomizer.java
+++ b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/AbstractAclCustomizer.java
@@ -16,7 +16,7 @@
package io.fd.hc2vpp.acl.read;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.collect.ImmutableSet;
import io.fd.hc2vpp.acl.util.AclContextManager;
import io.fd.hc2vpp.acl.util.FutureJVppAclCustomizer;
diff --git a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/AclCustomizer.java b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/AclCustomizer.java
index 3d1516fd2..ebaf8b828 100644
--- a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/AclCustomizer.java
+++ b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/AclCustomizer.java
@@ -16,7 +16,7 @@
package io.fd.hc2vpp.acl.read;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.acl.util.AclContextManager;
import io.fd.hc2vpp.acl.util.FutureJVppAclCustomizer;
import io.fd.hc2vpp.acl.util.ace.AceConverter;
diff --git a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/EgressAclCustomizer.java b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/EgressAclCustomizer.java
index 14fdad2df..31b359c07 100644
--- a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/EgressAclCustomizer.java
+++ b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/EgressAclCustomizer.java
@@ -17,7 +17,7 @@
package io.fd.hc2vpp.acl.read;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.acl.util.AclContextManager;
import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
import io.fd.hc2vpp.common.translate.util.NamingContext;
diff --git a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/IngressAclCustomizer.java b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/IngressAclCustomizer.java
index 02f2e18f2..59b0cc0ae 100644
--- a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/IngressAclCustomizer.java
+++ b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/IngressAclCustomizer.java
@@ -18,7 +18,7 @@
package io.fd.hc2vpp.acl.read;
import com.google.common.annotations.VisibleForTesting;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Streams;
import io.fd.hc2vpp.acl.util.AclContextManager;
diff --git a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/InterfaceAclCustomizer.java b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/InterfaceAclCustomizer.java
index 2cd1bdd87..be4da8a86 100644
--- a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/InterfaceAclCustomizer.java
+++ b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/InterfaceAclCustomizer.java
@@ -17,7 +17,6 @@
package io.fd.hc2vpp.acl.read;
-import com.google.common.base.Optional;
import com.google.common.collect.Streams;
import io.fd.hc2vpp.acl.util.FutureJVppAclCustomizer;
import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
@@ -33,7 +32,9 @@ import io.fd.jvpp.acl.dto.MacipAclInterfaceListDetailsReplyDump;
import io.fd.jvpp.acl.dto.MacipAclInterfaceListDump;
import io.fd.jvpp.acl.future.FutureJVppAclFacade;
import java.util.Collection;
+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;
@@ -98,13 +99,15 @@ public class InterfaceAclCustomizer extends FutureJVppAclCustomizer implements
final Optional<MacipAclInterfaceListDetailsReplyDump> macIpIfcDumpReply =
macipAclInterfaceListDumpManager.getDump(instanceIdentifier, readContext.getModificationCache());
- Stream<InterfaceKey> stdAclIfcKeys = stdIfcDumpReply.asSet().stream()
+ Stream<InterfaceKey> stdAclIfcKeys =
+ stdIfcDumpReply.map(Collections::singleton).orElse(Collections.emptySet()).stream()
.map(dump -> dump.aclInterfaceListDetails)
.flatMap(Collection::stream)
.filter(aclInterfaceListDetails -> aclInterfaceListDetails.acls.length != 0)
.map(details -> getInterfaceKey(readContext, details.swIfIndex));
- Stream<InterfaceKey> macIpAclIfcKeys = macIpIfcDumpReply.asSet().stream()
+ Stream<InterfaceKey> macIpAclIfcKeys =
+ macIpIfcDumpReply.map(Collections::singleton).orElse(Collections.emptySet()).stream()
.map(dump -> dump.macipAclInterfaceListDetails)
.flatMap(Collection::stream)
.map(details -> getInterfaceKey(readContext, details.swIfIndex));
diff --git a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/util/AclContextManagerImpl.java b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/util/AclContextManagerImpl.java
index 898777478..be8a0d963 100644
--- a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/util/AclContextManagerImpl.java
+++ b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/util/AclContextManagerImpl.java
@@ -20,7 +20,7 @@ import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkState;
import static java.util.Objects.requireNonNull;
-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.ArrayList;
diff --git a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/write/AclValidator.java b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/write/AclValidator.java
index b7aaebcff..cfdb34b4c 100644
--- a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/write/AclValidator.java
+++ b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/write/AclValidator.java
@@ -20,7 +20,7 @@ import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkState;
import com.google.common.annotations.VisibleForTesting;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableSet;
import io.fd.hc2vpp.acl.AclIIds;
diff --git a/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/AclModuleTest.java b/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/AclModuleTest.java
index 288305baa..d01e3b9f3 100644
--- a/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/AclModuleTest.java
+++ b/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/AclModuleTest.java
@@ -46,7 +46,7 @@ import java.util.Set;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.mdsal.binding.api.DataBroker;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesState;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesStateBuilder;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
diff --git a/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/write/AclCustomizerTest.java b/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/write/AclCustomizerTest.java
index 5dd76d519..207489090 100644
--- a/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/write/AclCustomizerTest.java
+++ b/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/write/AclCustomizerTest.java
@@ -23,7 +23,7 @@ import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.acl.AclIIds;
import io.fd.hc2vpp.acl.AclTestSchemaContext;
import io.fd.hc2vpp.acl.util.AclContextManager;
@@ -224,7 +224,7 @@ public class AclCustomizerTest extends WriterCustomizerTest implements AclTestSc
@Test
public void deleteCurrentAttributesIcmpIpv4(@InjectTestData(resourcePath = "/acl/standard/standard-acl-icmp.json")
Acls standardAcls) throws Exception {
- when(writeContext.readAfter(InstanceIdentifier.create(Interfaces.class))).thenReturn(Optional.absent());
+ when(writeContext.readAfter(InstanceIdentifier.create(Interfaces.class))).thenReturn(Optional.empty());
final int aclIndex = 4;
when(standardAclContext.getAclIndex("standard-acl", mappingContext)).thenReturn(aclIndex);
aclCustomizer.deleteCurrentAttributes(validId, standardAcls.getAcl().get(0), writeContext);
@@ -237,7 +237,7 @@ public class AclCustomizerTest extends WriterCustomizerTest implements AclTestSc
public void deleteCurrentAttributesIcmpIpv6(
@InjectTestData(resourcePath = "/acl/standard/standard-acl-icmp-v6.json")
Acls standardAcls) throws Exception {
- when(writeContext.readAfter(InstanceIdentifier.create(Interfaces.class))).thenReturn(Optional.absent());
+ when(writeContext.readAfter(InstanceIdentifier.create(Interfaces.class))).thenReturn(Optional.empty());
final int aclIndex = 4;
when(standardAclContext.getAclIndex("standard-acl", mappingContext)).thenReturn(aclIndex);
aclCustomizer.deleteCurrentAttributes(validId, standardAcls.getAcl().get(0), writeContext);
@@ -249,7 +249,7 @@ public class AclCustomizerTest extends WriterCustomizerTest implements AclTestSc
@Test
public void deleteCurrentAttributesTcp(@InjectTestData(resourcePath = "/acl/standard/standard-acl-tcp.json")
Acls standardAcls) throws Exception {
- when(writeContext.readAfter(InstanceIdentifier.create(Interfaces.class))).thenReturn(Optional.absent());
+ when(writeContext.readAfter(InstanceIdentifier.create(Interfaces.class))).thenReturn(Optional.empty());
final int aclIndex = 4;
when(standardAclContext.getAclIndex("standard-acl", mappingContext)).thenReturn(aclIndex);
aclCustomizer.deleteCurrentAttributes(validId, standardAcls.getAcl().get(0), writeContext);
@@ -261,7 +261,7 @@ public class AclCustomizerTest extends WriterCustomizerTest implements AclTestSc
@Test
public void deleteCurrentAttributesUdp(@InjectTestData(resourcePath = "/acl/standard/standard-acl-udp.json")
Acls standardAcls) throws Exception {
- when(writeContext.readAfter(InstanceIdentifier.create(Interfaces.class))).thenReturn(Optional.absent());
+ when(writeContext.readAfter(InstanceIdentifier.create(Interfaces.class))).thenReturn(Optional.empty());
final int aclIndex = 4;
when(standardAclContext.getAclIndex("standard-acl", mappingContext)).thenReturn(aclIndex);
aclCustomizer.deleteCurrentAttributes(validId, standardAcls.getAcl().get(0), writeContext);
diff --git a/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/write/AclValidatorTest.java b/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/write/AclValidatorTest.java
index 6f4d8556f..426b22e3f 100644
--- a/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/write/AclValidatorTest.java
+++ b/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/write/AclValidatorTest.java
@@ -23,7 +23,7 @@ import static org.hamcrest.Matchers.hasSize;
import static org.mockito.Mockito.when;
import static org.mockito.MockitoAnnotations.initMocks;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.acl.AclIIds;
import io.fd.hc2vpp.acl.AclTestSchemaContext;
import io.fd.honeycomb.test.tools.HoneycombTestRunner;
diff --git a/dhcp/dhcp-impl/src/main/java/io/fd/hc2vpp/dhcp/read/DhcpRelayCustomizer.java b/dhcp/dhcp-impl/src/main/java/io/fd/hc2vpp/dhcp/read/DhcpRelayCustomizer.java
index ec85ed369..e995d7073 100644
--- a/dhcp/dhcp-impl/src/main/java/io/fd/hc2vpp/dhcp/read/DhcpRelayCustomizer.java
+++ b/dhcp/dhcp-impl/src/main/java/io/fd/hc2vpp/dhcp/read/DhcpRelayCustomizer.java
@@ -16,7 +16,7 @@
package io.fd.hc2vpp.dhcp.read;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.primitives.UnsignedInts;
import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
diff --git a/dhcp/dhcp-impl/src/test/java/io/fd/hc2vpp/dhcp/DhcpModuleTest.java b/dhcp/dhcp-impl/src/test/java/io/fd/hc2vpp/dhcp/DhcpModuleTest.java
index eae20336c..5f403be20 100644
--- a/dhcp/dhcp-impl/src/test/java/io/fd/hc2vpp/dhcp/DhcpModuleTest.java
+++ b/dhcp/dhcp-impl/src/test/java/io/fd/hc2vpp/dhcp/DhcpModuleTest.java
@@ -43,7 +43,7 @@ import java.util.Set;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.mdsal.binding.api.DataBroker;
public class DhcpModuleTest {
diff --git a/fib-management/fib-management-impl/src/main/java/io/fd/hc2vpp/fib/management/read/FibTableCustomizer.java b/fib-management/fib-management-impl/src/main/java/io/fd/hc2vpp/fib/management/read/FibTableCustomizer.java
index bd610f994..32a868138 100644
--- a/fib-management/fib-management-impl/src/main/java/io/fd/hc2vpp/fib/management/read/FibTableCustomizer.java
+++ b/fib-management/fib-management-impl/src/main/java/io/fd/hc2vpp/fib/management/read/FibTableCustomizer.java
@@ -57,13 +57,13 @@ class FibTableCustomizer implements InitializingListReaderCustomizer<Table, Tabl
public List<TableKey> getAllIds(@Nonnull final InstanceIdentifier<Table> instanceIdentifier,
@Nonnull final ReadContext readContext) throws ReadFailedException {
return Stream.concat(ipv4DumpManager.getDump(instanceIdentifier, readContext.getModificationCache())
- .or(new IpFibDetailsReplyDump())
+ .orElse(new IpFibDetailsReplyDump())
.ipFibDetails.stream()
.filter(ipFibDetails -> ipFibDetails.tableId >= 0)
.map(ipFibDetails -> new TableKey(Ipv4.class, new VniReference((long) ipFibDetails.tableId)))
.distinct(),
ipv6DumpManager.getDump(instanceIdentifier, readContext.getModificationCache())
- .or(new Ip6FibDetailsReplyDump())
+ .orElse(new Ip6FibDetailsReplyDump())
.ip6FibDetails.stream()
.filter(ip6FibDetails -> ip6FibDetails.tableId >= 0)
.map(ipFibDetails -> new TableKey(Ipv6.class, new VniReference((long) ipFibDetails.tableId))))
@@ -90,7 +90,7 @@ class FibTableCustomizer implements InitializingListReaderCustomizer<Table, Tabl
if (tableKey.getAddressFamily().equals(Ipv4.class)) {
ipv4DumpManager.getDump(instanceIdentifier, readContext.getModificationCache())
- .or(new IpFibDetailsReplyDump())
+ .orElse(new IpFibDetailsReplyDump())
.ipFibDetails.stream()
.filter(ipFibDetails -> ipFibDetails.tableId == tableKey.getTableId().getValue().intValue())
.findFirst().ifPresent(
@@ -98,7 +98,7 @@ class FibTableCustomizer implements InitializingListReaderCustomizer<Table, Tabl
} else {
ipv6DumpManager.getDump(instanceIdentifier, readContext.getModificationCache())
- .or(new Ip6FibDetailsReplyDump())
+ .orElse(new Ip6FibDetailsReplyDump())
.ip6FibDetails.stream()
.filter(ipFibDetails -> ipFibDetails.tableId == tableKey.getTableId().getValue().intValue())
.findFirst().ifPresent(
diff --git a/fib-management/fib-management-impl/src/test/java/io/fd/hc2vpp/fib/management/FibManagementModuleTest.java b/fib-management/fib-management-impl/src/test/java/io/fd/hc2vpp/fib/management/FibManagementModuleTest.java
index b1d1c5cde..8389ce57a 100644
--- a/fib-management/fib-management-impl/src/test/java/io/fd/hc2vpp/fib/management/FibManagementModuleTest.java
+++ b/fib-management/fib-management-impl/src/test/java/io/fd/hc2vpp/fib/management/FibManagementModuleTest.java
@@ -43,7 +43,7 @@ import java.util.Set;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.mdsal.binding.api.DataBroker;
public class FibManagementModuleTest {
diff --git a/ioam/impl/src/test/java/io/fd/hc2vpp/vppioam/impl/VppIoamModuleTest.java b/ioam/impl/src/test/java/io/fd/hc2vpp/vppioam/impl/VppIoamModuleTest.java
index 4ff8d0dbd..41cf0d19b 100644
--- a/ioam/impl/src/test/java/io/fd/hc2vpp/vppioam/impl/VppIoamModuleTest.java
+++ b/ioam/impl/src/test/java/io/fd/hc2vpp/vppioam/impl/VppIoamModuleTest.java
@@ -44,7 +44,7 @@ import java.util.Set;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.mdsal.binding.api.DataBroker;
public class VppIoamModuleTest {
diff --git a/ipsec/ipsec-impl/src/main/java/io/fd/hc2vpp/ipsec/read/IpsecStateCustomizer.java b/ipsec/ipsec-impl/src/main/java/io/fd/hc2vpp/ipsec/read/IpsecStateCustomizer.java
index b63a7d24c..3148d144b 100644
--- a/ipsec/ipsec-impl/src/main/java/io/fd/hc2vpp/ipsec/read/IpsecStateCustomizer.java
+++ b/ipsec/ipsec-impl/src/main/java/io/fd/hc2vpp/ipsec/read/IpsecStateCustomizer.java
@@ -16,7 +16,7 @@
package io.fd.hc2vpp.ipsec.read;
-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.Ipv4Translator;
import io.fd.hc2vpp.common.translate.util.Ipv6Translator;
diff --git a/ipsec/ipsec-impl/src/main/java/io/fd/hc2vpp/ipsec/read/IpsecStateSpdCustomizer.java b/ipsec/ipsec-impl/src/main/java/io/fd/hc2vpp/ipsec/read/IpsecStateSpdCustomizer.java
index 42f495b5d..c764afe58 100644
--- a/ipsec/ipsec-impl/src/main/java/io/fd/hc2vpp/ipsec/read/IpsecStateSpdCustomizer.java
+++ b/ipsec/ipsec-impl/src/main/java/io/fd/hc2vpp/ipsec/read/IpsecStateSpdCustomizer.java
@@ -16,7 +16,7 @@
package io.fd.hc2vpp.ipsec.read;
-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.Ipv4Translator;
import io.fd.hc2vpp.common.translate.util.Ipv6Translator;
diff --git a/it/api-test/pom.xml b/it/api-test/pom.xml
index 6b1981a8d..ba6a1eb86 100644
--- a/it/api-test/pom.xml
+++ b/it/api-test/pom.xml
@@ -119,5 +119,11 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-data-impl</artifactId>
+ <version>${odl.yangtools.version}</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project> \ No newline at end of file
diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/Ipv4AddressCustomizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/Ipv4AddressCustomizer.java
index e8742e703..e4ee8f969 100644
--- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/Ipv4AddressCustomizer.java
+++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/Ipv4AddressCustomizer.java
@@ -16,7 +16,7 @@
package io.fd.hc2vpp.l3.read.ipv4;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.base.Preconditions;
import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.hc2vpp.l3.utils.ip.read.IfaceDumpFilter;
diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/Ipv4NeighbourCustomizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/Ipv4NeighbourCustomizer.java
index 610304fee..240cfd026 100644
--- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/Ipv4NeighbourCustomizer.java
+++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/Ipv4NeighbourCustomizer.java
@@ -19,7 +19,7 @@ package io.fd.hc2vpp.l3.read.ipv4;
import static org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.NeighborOrigin.Dynamic;
import static org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.NeighborOrigin.Static;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.hc2vpp.l3.utils.ip.read.IfaceDumpFilter;
import io.fd.hc2vpp.l3.utils.ip.read.IpNeighbourReader;
diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/subinterface/SubInterfaceIpv4AddressCustomizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/subinterface/SubInterfaceIpv4AddressCustomizer.java
index ccb29286b..6fcc2dc7e 100644
--- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/subinterface/SubInterfaceIpv4AddressCustomizer.java
+++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/subinterface/SubInterfaceIpv4AddressCustomizer.java
@@ -16,7 +16,7 @@
package io.fd.hc2vpp.l3.read.ipv4.subinterface;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.hc2vpp.l3.utils.ip.read.IfaceDumpFilter;
import io.fd.hc2vpp.l3.utils.ip.read.IpAddressReader;
diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/subinterface/SubInterfaceIpv4NeighbourCustomizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/subinterface/SubInterfaceIpv4NeighbourCustomizer.java
index 87ebd19c0..120c6ad2d 100644
--- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/subinterface/SubInterfaceIpv4NeighbourCustomizer.java
+++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/subinterface/SubInterfaceIpv4NeighbourCustomizer.java
@@ -16,7 +16,7 @@
package io.fd.hc2vpp.l3.read.ipv4.subinterface;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.hc2vpp.l3.utils.ip.read.IfaceDumpFilter;
import io.fd.hc2vpp.l3.utils.ip.read.IpNeighbourReader;
diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/Ipv6AddressCustomizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/Ipv6AddressCustomizer.java
index b901698b2..88a69de3c 100644
--- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/Ipv6AddressCustomizer.java
+++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/Ipv6AddressCustomizer.java
@@ -17,7 +17,7 @@
package io.fd.hc2vpp.l3.read.ipv6;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.hc2vpp.l3.utils.ip.read.IfaceDumpFilter;
import io.fd.hc2vpp.l3.utils.ip.read.IpAddressReader;
diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/Ipv6NeighbourCustomizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/Ipv6NeighbourCustomizer.java
index 9cab95795..0bccd9cb8 100644
--- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/Ipv6NeighbourCustomizer.java
+++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/Ipv6NeighbourCustomizer.java
@@ -20,7 +20,7 @@ package io.fd.hc2vpp.l3.read.ipv6;
import static org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.NeighborOrigin.Dynamic;
import static org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.NeighborOrigin.Static;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.hc2vpp.l3.utils.ip.read.IfaceDumpFilter;
import io.fd.hc2vpp.l3.utils.ip.read.IpNeighbourReader;
diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/nd/NdProxyCustomizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/nd/NdProxyCustomizer.java
index e1c417d6e..e83b0cb9c 100644
--- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/nd/NdProxyCustomizer.java
+++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/nd/NdProxyCustomizer.java
@@ -19,7 +19,7 @@ package io.fd.hc2vpp.l3.read.ipv6.nd;
import static com.google.common.base.Preconditions.checkNotNull;
import com.google.common.annotations.VisibleForTesting;
-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.Ipv6Translator;
import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/subinterface/SubInterfaceIpv6AddressCustomizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/subinterface/SubInterfaceIpv6AddressCustomizer.java
index bff668eee..344471083 100644
--- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/subinterface/SubInterfaceIpv6AddressCustomizer.java
+++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/subinterface/SubInterfaceIpv6AddressCustomizer.java
@@ -17,7 +17,7 @@
package io.fd.hc2vpp.l3.read.ipv6.subinterface;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.hc2vpp.l3.utils.ip.read.IfaceDumpFilter;
import io.fd.hc2vpp.l3.utils.ip.read.IpAddressReader;
diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/subinterface/SubInterfaceIpv6NeighbourCustomizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/subinterface/SubInterfaceIpv6NeighbourCustomizer.java
index 481b9b84d..fca496baf 100644
--- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/subinterface/SubInterfaceIpv6NeighbourCustomizer.java
+++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/subinterface/SubInterfaceIpv6NeighbourCustomizer.java
@@ -16,7 +16,7 @@
package io.fd.hc2vpp.l3.read.ipv6.subinterface;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.hc2vpp.l3.utils.ip.read.IfaceDumpFilter;
import io.fd.hc2vpp.l3.utils.ip.read.IpNeighbourReader;
diff --git a/l3/utils/src/main/java/io/fd/hc2vpp/l3/utils/ip/read/IpAddressReader.java b/l3/utils/src/main/java/io/fd/hc2vpp/l3/utils/ip/read/IpAddressReader.java
index 181baf6fc..3247b6918 100644
--- a/l3/utils/src/main/java/io/fd/hc2vpp/l3/utils/ip/read/IpAddressReader.java
+++ b/l3/utils/src/main/java/io/fd/hc2vpp/l3/utils/ip/read/IpAddressReader.java
@@ -18,7 +18,7 @@ package io.fd.hc2vpp.l3.utils.ip.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.ByteDataTranslator;
import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
import io.fd.hc2vpp.common.translate.util.NamingContext;
@@ -112,7 +112,7 @@ public abstract class IpAddressReader extends IpReader {
.filter(singleDetail -> ip.equals(arrayToIpv4AddressNoZone(singleDetail.ip)))
.collect(RWUtils.singleItemCollector()));
}
- return Optional.absent();
+ return Optional.empty();
}
@Nonnull
@@ -128,7 +128,7 @@ public abstract class IpAddressReader extends IpReader {
.filter(singleDetail -> ip.equals(arrayToIpv6AddressNoZone(singleDetail.ip)))
.collect(RWUtils.singleItemCollector()));
}
- return Optional.absent();
+ return Optional.empty();
}
@Nonnull
diff --git a/l3/utils/src/main/java/io/fd/hc2vpp/l3/utils/ip/read/IpNeighbourReader.java b/l3/utils/src/main/java/io/fd/hc2vpp/l3/utils/ip/read/IpNeighbourReader.java
index 6eb5fd1b8..05048a427 100644
--- a/l3/utils/src/main/java/io/fd/hc2vpp/l3/utils/ip/read/IpNeighbourReader.java
+++ b/l3/utils/src/main/java/io/fd/hc2vpp/l3/utils/ip/read/IpNeighbourReader.java
@@ -18,7 +18,7 @@ package io.fd.hc2vpp.l3.utils.ip.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.ByteDataTranslator;
import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
import io.fd.hc2vpp.common.translate.util.NamingContext;
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;
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/LispModuleTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/LispModuleTest.java
index ffaf3206b..b9f0bf837 100644
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/LispModuleTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/LispModuleTest.java
@@ -40,7 +40,7 @@ import java.util.Set;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.mdsal.binding.api.DataBroker;
public class LispModuleTest {
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/context/util/AdjacenciesMappingContextTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/context/util/AdjacenciesMappingContextTest.java
index 61ebcfbe3..4c8cfa262 100644
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/context/util/AdjacenciesMappingContextTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/context/util/AdjacenciesMappingContextTest.java
@@ -22,7 +22,7 @@ import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.collect.ImmutableSet;
import io.fd.honeycomb.test.tools.HoneycombTestRunner;
import io.fd.honeycomb.test.tools.annotations.InjectTestData;
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 4ac7a241a..b64b862a3 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
@@ -23,7 +23,7 @@ import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.when;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.collect.ImmutableSet;
import io.fd.hc2vpp.common.test.read.InitializingReaderCustomizerTest;
import io.fd.hc2vpp.common.test.util.NamingContextHelper;
@@ -131,9 +131,9 @@ public class LispStateCustomizerTest extends InitializingReaderCustomizerTest<Li
when(mappingContext.read(namingContextId.child(Mappings.class)))
.thenReturn(Optional.of(new MappingsBuilder().setMapping(Arrays.asList(loc1Data, loc2Data)).build()));
- when(mappingContext.read(loc1Key)).thenReturn(Optional.absent())
+ when(mappingContext.read(loc1Key)).thenReturn(Optional.empty())
.thenReturn(Optional.of(loc1Data)).thenReturn(Optional.of(loc1Data));
- when(mappingContext.read(loc2Key)).thenReturn(Optional.absent())
+ when(mappingContext.read(loc2Key)).thenReturn(Optional.empty())
.thenReturn(Optional.of(loc2Data)).thenReturn(Optional.of(loc2Data));
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 294bd5466..4352c9b06 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
@@ -22,7 +22,7 @@ import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.when;
import static org.mockito.MockitoAnnotations.initMocks;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.test.util.FutureProducer;
import io.fd.honeycomb.translate.ModificationCache;
import io.fd.honeycomb.translate.read.ReadContext;
@@ -58,7 +58,7 @@ public class LispStateCheckServiceImplTest implements FutureProducer {
@Test(expected = IllegalStateException.class)
public void testCheckLispEnabledBeforeNoConfig() throws Exception {
- when(writeContext.readBefore(InstanceIdentifier.create(Lisp.class))).thenReturn(Optional.absent());
+ when(writeContext.readBefore(InstanceIdentifier.create(Lisp.class))).thenReturn(Optional.empty());
impl.checkLispEnabledBefore(writeContext);
}
@@ -79,7 +79,7 @@ public class LispStateCheckServiceImplTest implements FutureProducer {
@Test(expected = IllegalStateException.class)
public void testCheckLispEnabledAfterNoConfig() throws Exception {
- when(writeContext.readAfter(InstanceIdentifier.create(Lisp.class))).thenReturn(Optional.absent());
+ when(writeContext.readAfter(InstanceIdentifier.create(Lisp.class))).thenReturn(Optional.empty());
impl.checkLispEnabledAfter(writeContext);
}
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 b8ad46b6f..74b22e41a 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
@@ -26,7 +26,6 @@ import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.when;
-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;
@@ -36,6 +35,8 @@ import io.fd.jvpp.core.dto.OneLocatorSetDetails;
import io.fd.jvpp.core.dto.OneLocatorSetDetailsReplyDump;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
+import java.util.NoSuchElementException;
+import java.util.Optional;
import java.util.concurrent.ExecutionException;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
@@ -76,12 +77,12 @@ public class LocatorSetCustomizerTest extends LispWriterCustomizerTest {
lispStateCheckService);
}
- @Test(expected = NullPointerException.class)
+ @Test(expected = NoSuchElementException.class)
public void testWriteCurrentAttributesNullData() throws WriteFailedException {
customizer.writeCurrentAttributes(null, null, writeContext);
}
- @Test(expected = NullPointerException.class)
+ @Test(expected = NoSuchElementException.class)
public void testWriteCurrentAttributesBadData() throws WriteFailedException {
customizer.writeCurrentAttributes(null, mock(LocatorSet.class), writeContext);
}
@@ -138,7 +139,7 @@ public class LocatorSetCustomizerTest extends LispWriterCustomizerTest {
@Test
public void testDeleteCurrentAttributes() throws InterruptedException, ExecutionException, WriteFailedException {
- when(writeContext.readAfter(EID_TABLE_ID)).thenReturn(Optional.absent());
+ when(writeContext.readAfter(EID_TABLE_ID)).thenReturn(Optional.empty());
verifySuccessfullDelete(LOCATOR_SET_TO_DELETE);
}
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/VniTableCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/VniTableCustomizerTest.java
index 19ff5cbba..ee5f1b092 100644
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/VniTableCustomizerTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/VniTableCustomizerTest.java
@@ -22,7 +22,7 @@ import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.when;
import static org.mockito.MockitoAnnotations.initMocks;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.honeycomb.translate.write.WriteFailedException;
import org.junit.Before;
import org.junit.Test;
@@ -116,7 +116,7 @@ public class VniTableCustomizerTest extends LispWriterCustomizerTest {
}
private void whenReadBeforeReturnInvalid() {
- when(writeContext.readBefore(validId)).thenReturn(Optional.absent());
+ when(writeContext.readBefore(validId)).thenReturn(Optional.empty());
}
private void whenReadAfterReturnValid() {
@@ -124,6 +124,6 @@ public class VniTableCustomizerTest extends LispWriterCustomizerTest {
}
private void whenReadAfterReturnInvalid() {
- when(writeContext.readAfter(validId)).thenReturn(Optional.absent());
+ when(writeContext.readAfter(validId)).thenReturn(Optional.empty());
}
}
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/util/AdjacencyMappingContextTestHelper.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/util/AdjacencyMappingContextTestHelper.java
index 76dd34ff5..52ae27570 100644
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/util/AdjacencyMappingContextTestHelper.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/util/AdjacencyMappingContextTestHelper.java
@@ -19,7 +19,7 @@ package io.fd.hc2vpp.lisp.util;
import static com.google.common.base.Preconditions.checkNotNull;
import static org.mockito.Mockito.doReturn;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.collect.Lists;
import io.fd.honeycomb.translate.MappingContext;
import java.util.List;
@@ -109,7 +109,7 @@ public interface AdjacencyMappingContextTestHelper {
final List<Mapping> list = Common.getMappingList(mappingContext, iid);
doReturn(Optional.of(new MappingsBuilder().setMapping(list).build())).when(mappingContext).read(iid);
- doReturn(Optional.absent()).when(mappingContext).read(mappingIid(name, namingContextName));
+ doReturn(Optional.empty()).when(mappingContext).read(mappingIid(name, namingContextName));
}
final class Common {
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/util/EidMappingContextHelper.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/util/EidMappingContextHelper.java
index bd2be3013..728bc7ea0 100644
--- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/util/EidMappingContextHelper.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/util/EidMappingContextHelper.java
@@ -19,7 +19,7 @@ package io.fd.hc2vpp.lisp.util;
import static org.mockito.Mockito.doReturn;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.collect.Lists;
import io.fd.honeycomb.translate.MappingContext;
import java.util.List;
@@ -96,7 +96,7 @@ public interface EidMappingContextHelper {
final List<Mapping> list = Common.getMappingList(mappingContext, iid);
doReturn(Optional.of(new MappingsBuilder().setMapping(list).build())).when(mappingContext).read(iid);
- doReturn(Optional.absent()).when(mappingContext).read(mappingIid(new MappingId(name), namingContextName));
+ doReturn(Optional.empty()).when(mappingContext).read(mappingIid(new MappingId(name), namingContextName));
}
final class Common {
diff --git a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ExternalIpPoolCustomizer.java b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ExternalIpPoolCustomizer.java
index 7592db69b..7a97a68d1 100644
--- a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ExternalIpPoolCustomizer.java
+++ b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ExternalIpPoolCustomizer.java
@@ -65,11 +65,13 @@ final class ExternalIpPoolCustomizer implements
ExternalIpPoolCustomizer(@Nonnull final FutureJVppNatFacade jvppNat) {
checkNotNull(jvppNat, "jvppNat should not be null");
this.nat44DumpMgr = new DumpCacheManager.DumpCacheManagerBuilder<Nat44AddressDetailsReplyDump, Void>()
- .withExecutor((id, params) -> getReplyForRead(jvppNat.nat44AddressDump(new Nat44AddressDump()).toCompletableFuture(), id))
+ .withExecutor((id, params) -> getReplyForRead(
+ jvppNat.nat44AddressDump(new Nat44AddressDump()).toCompletableFuture(), id))
.acceptOnly(Nat44AddressDetailsReplyDump.class)
.build();
this.nat64DumpMgr = new DumpCacheManager.DumpCacheManagerBuilder<Nat64PoolAddrDetailsReplyDump, Void>()
- .withExecutor((id, params) -> getReplyForRead(jvppNat.nat64PoolAddrDump(new Nat64PoolAddrDump()).toCompletableFuture(), id))
+ .withExecutor((id, params) -> getReplyForRead(
+ jvppNat.nat64PoolAddrDump(new Nat64PoolAddrDump()).toCompletableFuture(), id))
.acceptOnly(Nat64PoolAddrDetailsReplyDump.class)
.build();
}
@@ -94,7 +96,7 @@ final class ExternalIpPoolCustomizer implements
final Long poolId = id.firstKeyOf(ExternalIpAddressPool.class).getPoolId();
final List<Nat44AddressDetails> nat44Details =
nat44DumpMgr.getDump(id, ctx.getModificationCache())
- .or(new Nat44AddressDetailsReplyDump()).nat44AddressDetails;
+ .orElse(new Nat44AddressDetailsReplyDump()).nat44AddressDetails;
final int nat44PoolCount = nat44Details.size();
// Uses ID<->address mapping as defined by getAllIds (nat44 mappings go before nat64):
@@ -104,7 +106,7 @@ final class ExternalIpPoolCustomizer implements
setPoolType(builder, NatPoolType.Nat44);
} else {
final List<Nat64PoolAddrDetails> nat64Details = nat64DumpMgr.getDump(id, ctx.getModificationCache())
- .or(new Nat64PoolAddrDetailsReplyDump()).nat64PoolAddrDetails;
+ .orElse(new Nat64PoolAddrDetailsReplyDump()).nat64PoolAddrDetails;
final int nat64PoolCount = nat64Details.size();
final int nat64PoolPosition = Math.toIntExact(poolId) - nat44PoolCount;
if (nat64PoolPosition < nat64PoolCount) {
@@ -146,16 +148,14 @@ final class ExternalIpPoolCustomizer implements
// That's why the write and read is not symmetrical in terms of data structure, instead,
// this customizer also returns every single address as a 32 prefix and assigns an artificial key to them
- long addressCount = nat44DumpMgr.getDump(id, ctx.getModificationCache())
- .or(new Nat44AddressDetailsReplyDump()).nat44AddressDetails.stream()
- .count();
+ long addressCount = (long) nat44DumpMgr.getDump(id, ctx.getModificationCache())
+ .orElse(new Nat44AddressDetailsReplyDump()).nat44AddressDetails.size();
// The ietf-nat model groups address pools for Nat44 and Nat64 under the same list,
// but VPP uses different APIs, so we need an other dump:
- addressCount += nat64DumpMgr.getDump(id, ctx.getModificationCache())
- .or(new Nat64PoolAddrDetailsReplyDump()).nat64PoolAddrDetails.stream()
- .count();
+ addressCount += (long) nat64DumpMgr.getDump(id, ctx.getModificationCache())
+ .orElse(new Nat64PoolAddrDetailsReplyDump()).nat64PoolAddrDetails.size();
final List<ExternalIpAddressPoolKey> ids = LongStream.range(0, addressCount)
.mapToObj(ExternalIpAddressPoolKey::new)
diff --git a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/MappingEntryCustomizer.java b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/MappingEntryCustomizer.java
index 2be7392d7..1ae452183 100644
--- a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/MappingEntryCustomizer.java
+++ b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/MappingEntryCustomizer.java
@@ -86,7 +86,7 @@ final class MappingEntryCustomizer implements Ipv4Translator, Ipv6Translator,
final int natInstanceId = id.firstKeyOf(Instance.class).getId().intValue();
final List<Nat44StaticMappingDetails> nat44Details =
nat44DumpManager.getDump(id, ctx.getModificationCache())
- .or(new Nat44StaticMappingDetailsReplyDump()).nat44StaticMappingDetails;
+ .orElse(new Nat44StaticMappingDetailsReplyDump()).nat44StaticMappingDetails;
final Optional<Nat44StaticMappingDetails> nat44StaticMappingDetails =
mappingEntryContext.findDetailsNat44(nat44Details, natInstanceId, idx, ctx.getMappingContext());
@@ -95,7 +95,7 @@ final class MappingEntryCustomizer implements Ipv4Translator, Ipv6Translator,
} else {
final List<Nat64BibDetails> nat64Details =
nat64DumpManager.getDump(id, ctx.getModificationCache())
- .or(new Nat64BibDetailsReplyDump()).nat64BibDetails;
+ .orElse(new Nat64BibDetailsReplyDump()).nat64BibDetails;
final Optional<Nat64BibDetails> nat64StaticMappingDetails =
mappingEntryContext.findDetailsNat64(nat64Details, natInstanceId, idx, ctx.getMappingContext());
@@ -153,7 +153,7 @@ final class MappingEntryCustomizer implements Ipv4Translator, Ipv6Translator,
final List<MappingEntryKey> entryKeys =
nat44DumpManager.getDump(id, context.getModificationCache())
- .or(new Nat44StaticMappingDetailsReplyDump()).nat44StaticMappingDetails.stream()
+ .orElse(new Nat44StaticMappingDetailsReplyDump()).nat44StaticMappingDetails.stream()
.filter(detail -> natInstanceId == detail.vrfId)
.map(detail -> mappingEntryContext
.getStoredOrArtificialIndex(natInstanceId, detail, context.getMappingContext()))
@@ -163,7 +163,7 @@ final class MappingEntryCustomizer implements Ipv4Translator, Ipv6Translator,
final List<MappingEntryKey> nat64Keys =
nat64DumpManager.getDump(id, context.getModificationCache())
- .or(new Nat64BibDetailsReplyDump()).nat64BibDetails.stream()
+ .orElse(new Nat64BibDetailsReplyDump()).nat64BibDetails.stream()
.filter(detail -> natInstanceId == detail.vrfId)
.map(detail -> mappingEntryContext
.getStoredOrArtificialIndex(natInstanceId, detail, context.getMappingContext()))
diff --git a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/NatInstanceCustomizer.java b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/NatInstanceCustomizer.java
index 81a978559..6d1cf812c 100644
--- a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/NatInstanceCustomizer.java
+++ b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/NatInstanceCustomizer.java
@@ -79,10 +79,10 @@ final class NatInstanceCustomizer
// Find the nat instance IDs (vrf-ids) by listing all static mappings and their VRF assignment
final List<InstanceKey> vrfIds = Stream.concat(
nat44DumpManager.getDump(id, context.getModificationCache())
- .or(new Nat44StaticMappingDetailsReplyDump()).nat44StaticMappingDetails.stream()
+ .orElse(new Nat44StaticMappingDetailsReplyDump()).nat44StaticMappingDetails.stream()
.map(detail -> detail.vrfId),
nat64DumpManager.getDump(id, context.getModificationCache())
- .or(new Nat64BibDetailsReplyDump()).nat64BibDetails.stream()
+ .orElse(new Nat64BibDetailsReplyDump()).nat64BibDetails.stream()
.map(detail -> detail.vrfId))
// V4 (nat44) and V6 (nat64) VRFs in VPP can have the same id. We store them under single nat instance,
// because the ietf-nat model does not require separate instances for nat44 and nat64 features.
diff --git a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/AbstractInterfaceNatCustomizer.java b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/AbstractInterfaceNatCustomizer.java
index 91e2a8bb7..2d8e4cce5 100644
--- a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/AbstractInterfaceNatCustomizer.java
+++ b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/AbstractInterfaceNatCustomizer.java
@@ -18,7 +18,6 @@ package io.fd.hc2vpp.nat.read.ifc;
import static java.util.Objects.requireNonNull;
-import com.google.common.base.Optional;
import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.honeycomb.translate.read.ReadContext;
@@ -32,6 +31,7 @@ import io.fd.jvpp.nat.dto.Nat44InterfaceOutputFeatureDump;
import io.fd.jvpp.nat.dto.Nat64InterfaceDetailsReplyDump;
import io.fd.jvpp.nat.dto.Nat64InterfaceDump;
import io.fd.jvpp.nat.future.FutureJVppNatFacade;
+import java.util.Optional;
import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
import org.opendaylight.yangtools.concepts.Builder;
@@ -95,7 +95,7 @@ abstract class AbstractInterfaceNatCustomizer<C extends DataObject, B extends Bu
final Optional<Nat44InterfaceDetailsReplyDump> dump =
preRoutingNat44DumpMgr.getDump(id, ctx.getModificationCache());
- dump.or(new Nat44InterfaceDetailsReplyDump()).nat44InterfaceDetails.stream()
+ dump.orElse(new Nat44InterfaceDetailsReplyDump()).nat44InterfaceDetails.stream()
.filter(natIfcDetail -> natIfcDetail.swIfIndex == index)
.filter(natIfcDetail -> isExpectedNatType(natIfcDetail.isInside))
.findAny()
@@ -108,7 +108,7 @@ abstract class AbstractInterfaceNatCustomizer<C extends DataObject, B extends Bu
final Optional<Nat64InterfaceDetailsReplyDump> dump =
preRoutingNat64DumpMgr.getDump(id, ctx.getModificationCache());
- dump.or(new Nat64InterfaceDetailsReplyDump()).nat64InterfaceDetails.stream()
+ dump.orElse(new Nat64InterfaceDetailsReplyDump()).nat64InterfaceDetails.stream()
.filter(natIfcDetail -> natIfcDetail.swIfIndex == index)
.filter(natIfcDetail -> isExpectedNatType(natIfcDetail.isInside))
.findAny()
@@ -121,7 +121,7 @@ abstract class AbstractInterfaceNatCustomizer<C extends DataObject, B extends Bu
final Optional<Nat44InterfaceOutputFeatureDetailsReplyDump> dump =
postRoutingNat44DumpMgr.getDump(id, ctx.getModificationCache());
- dump.or(new Nat44InterfaceOutputFeatureDetailsReplyDump()).nat44InterfaceOutputFeatureDetails
+ dump.orElse(new Nat44InterfaceOutputFeatureDetailsReplyDump()).nat44InterfaceOutputFeatureDetails
.stream()
.filter(natIfcDetail -> natIfcDetail.swIfIndex == index)
.filter(natIfcDetail -> isExpectedNatType(natIfcDetail.isInside))
diff --git a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/util/MappingEntryContext.java b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/util/MappingEntryContext.java
index 14bf3f0a3..aed383b10 100644
--- a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/util/MappingEntryContext.java
+++ b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/util/MappingEntryContext.java
@@ -19,7 +19,7 @@ package io.fd.hc2vpp.nat.util;
import static com.google.common.base.Preconditions.checkArgument;
import com.google.common.annotations.VisibleForTesting;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.translate.util.Ipv4Translator;
import io.fd.hc2vpp.common.translate.util.Ipv6Translator;
import io.fd.honeycomb.translate.MappingContext;
@@ -179,8 +179,8 @@ public class MappingEntryContext implements Ipv4Translator, Ipv6Translator {
@Nonnull final MappingContext mappingContext) {
// Find mapping entry for Index
final MappingEntry ctxMappingEntry = mappingContext.read(getTableId(natInstanceId))
- .transform(MappingTable::getMappingEntry)
- .or(Collections.emptyList())
+ .map(MappingTable::getMappingEntry)
+ .orElse(Collections.emptyList())
.stream()
.filter(entry -> entry.getIndex() == idx)
.findFirst()
@@ -201,8 +201,8 @@ public class MappingEntryContext implements Ipv4Translator, Ipv6Translator {
@Nonnull final MappingContext mappingContext) {
// Find mapping entry for Index
final MappingEntry ctxMappingEntry = mappingContext.read(getTableId(natInstanceId))
- .transform(MappingTable::getMappingEntry)
- .or(Collections.emptyList())
+ .map(MappingTable::getMappingEntry)
+ .orElse(Collections.emptyList())
.stream()
.filter(entry -> entry.getIndex() == idx)
.findFirst()
@@ -222,8 +222,8 @@ public class MappingEntryContext implements Ipv4Translator, Ipv6Translator {
@Nonnull final Nat44StaticMappingDetails details,
@Nonnull final MappingContext mappingContext) {
return mappingContext.read(getId(natInstanceId, entryToKey(details)))
- .transform(MappingEntry::getIndex)
- .or(() -> getArtificialId(details, natInstanceId, mappingContext));
+ .map(MappingEntry::getIndex)
+ .orElseGet(() -> getArtificialId(details, natInstanceId, mappingContext));
}
/**
@@ -233,8 +233,8 @@ public class MappingEntryContext implements Ipv4Translator, Ipv6Translator {
@Nonnull final Nat64BibDetails details,
@Nonnull final MappingContext mappingContext) {
return mappingContext.read(getId(natInstanceId, entryToKey(details)))
- .transform(MappingEntry::getIndex)
- .or(() -> getArtificialId(details, natInstanceId, mappingContext));
+ .map(MappingEntry::getIndex)
+ .orElseGet(() -> getArtificialId(details, natInstanceId, mappingContext));
}
/**
@@ -243,8 +243,7 @@ public class MappingEntryContext implements Ipv4Translator, Ipv6Translator {
public synchronized Optional<Long> getStoredIndex(final long natInstanceId,
@Nonnull final org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.nat.rev180628.nat.instances.instance.mapping.table.MappingEntry entry,
@Nonnull final MappingContext mappingContext) {
- return mappingContext.read(getId(natInstanceId, entryToKey(entry)))
- .transform(MappingEntry::getIndex);
+ return mappingContext.read(getId(natInstanceId, entryToKey(entry))).map(MappingEntry::getIndex);
}
private long getArtificialId(final Nat44StaticMappingDetails details, final Long natInstanceId,
@@ -267,8 +266,8 @@ public class MappingEntryContext implements Ipv4Translator, Ipv6Translator {
private long findFreeIndex(final long natInstanceId, final MappingContext mappingContext) {
return mappingContext.read(getTableId(natInstanceId))
- .transform(MappingTable::getMappingEntry)
- .or(Collections.emptyList())
+ .map(MappingTable::getMappingEntry)
+ .orElse(Collections.emptyList())
.stream()
.map(MappingEntry::getIndex)
.max(Comparator.naturalOrder())
diff --git a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/write/MappingEntryCustomizer.java b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/write/MappingEntryCustomizer.java
index 924f6a6a1..9c8da8c84 100644
--- a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/write/MappingEntryCustomizer.java
+++ b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/write/MappingEntryCustomizer.java
@@ -16,7 +16,7 @@
package io.fd.hc2vpp.nat.write;
-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.Ipv4Translator;
import io.fd.hc2vpp.common.translate.util.Ipv6Translator;
diff --git a/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/NatModuleTest.java b/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/NatModuleTest.java
index c997e5c37..00986f43a 100644
--- a/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/NatModuleTest.java
+++ b/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/NatModuleTest.java
@@ -45,7 +45,7 @@ import java.util.Set;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.mdsal.binding.api.DataBroker;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesState;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesStateBuilder;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
diff --git a/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/util/MappingEntryContextTest.java b/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/util/MappingEntryContextTest.java
index 871225a29..86abf0e27 100644
--- a/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/util/MappingEntryContextTest.java
+++ b/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/util/MappingEntryContextTest.java
@@ -24,7 +24,7 @@ import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.mockito.MockitoAnnotations.initMocks;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.collect.Lists;
import io.fd.hc2vpp.common.translate.util.Ipv4Translator;
import io.fd.honeycomb.translate.MappingContext;
@@ -56,7 +56,7 @@ public class MappingEntryContextTest implements Ipv4Translator {
@Test
public void testAdd() throws Exception {
- when(mappingCtx.read(any(InstanceIdentifier.class))).thenReturn(Optional.absent());
+ when(mappingCtx.read(any(InstanceIdentifier.class))).thenReturn(Optional.empty());
final long natId = 7;
final long entryId = 99;
final MappingEntry entry = getEntry(natId, "192.168.1.5/32", "17.14.4.6/32");
@@ -116,7 +116,7 @@ public class MappingEntryContextTest implements Ipv4Translator {
final long entryId = 12;
final Nat44StaticMappingDetails details = getDetails(entryId, "192.168.1.5", "17.14.4.6");
final List<Nat44StaticMappingDetails> someDetails = Lists.newArrayList(details);
- when(mappingCtx.read(MappingEntryContext.getTableId(natId))).thenReturn(Optional.absent());
+ when(mappingCtx.read(MappingEntryContext.getTableId(natId))).thenReturn(Optional.empty());
ctx.findDetailsNat44(someDetails, natId, entryId, mappingCtx);
}
@@ -150,7 +150,7 @@ public class MappingEntryContextTest implements Ipv4Translator {
final MappingEntry newEntry = getEntry(newEntryId, "192.168.1.99/32", "17.14.4.99/32");
final Nat44StaticMappingDetails newDetails = getDetails(newEntryId, "192.168.1.99", "17.14.4.99");
when(mappingCtx.read(MappingEntryContext.getId(natId, MappingEntryContext.entryToKey(newEntry))))
- .thenReturn(Optional.absent());
+ .thenReturn(Optional.empty());
when(mappingCtx.read(MappingEntryContext.getTableId(natId)))
.thenReturn(Optional.of(new MappingTableBuilder()
diff --git a/nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/VppNshModuleTest.java b/nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/VppNshModuleTest.java
index f2e10ad88..de71e22b3 100644
--- a/nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/VppNshModuleTest.java
+++ b/nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/VppNshModuleTest.java
@@ -43,7 +43,7 @@ import java.util.Set;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.mdsal.binding.api.DataBroker;
public class VppNshModuleTest {
diff --git a/release-notes/src/main/asciidoc/devel_guide/devel_plugin_vpp_tutorial.adoc b/release-notes/src/main/asciidoc/devel_guide/devel_plugin_vpp_tutorial.adoc
index 01a2e3a83..7e7ac6990 100644
--- a/release-notes/src/main/asciidoc/devel_guide/devel_plugin_vpp_tutorial.adoc
+++ b/release-notes/src/main/asciidoc/devel_guide/devel_plugin_vpp_tutorial.adoc
@@ -105,7 +105,7 @@ Rename it to VxlanReadCustomzier. Update the code to:
package io.fd.hc2vpp.samples.read;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.base.Preconditions;
import io.fd.hc2vpp.common.translate.util.AddressTranslator;
import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
diff --git a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/ControlPlaneProtocolCustomizer.java b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/ControlPlaneProtocolCustomizer.java
index 3fde2da4c..166537bce 100644
--- a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/ControlPlaneProtocolCustomizer.java
+++ b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/ControlPlaneProtocolCustomizer.java
@@ -16,7 +16,7 @@
package io.fd.hc2vpp.routing.read;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.hc2vpp.routing.trait.RouteMapper;
import io.fd.honeycomb.translate.ModificationCache;
diff --git a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/Ipv4RouteCustomizer.java b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/Ipv4RouteCustomizer.java
index a78668d3d..55c33555a 100644
--- a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/Ipv4RouteCustomizer.java
+++ b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/Ipv4RouteCustomizer.java
@@ -16,7 +16,7 @@
package io.fd.hc2vpp.routing.read;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.translate.util.MultiNamingContext;
import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.hc2vpp.routing.RoutingConfiguration;
diff --git a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/Ipv6RouteCustomizer.java b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/Ipv6RouteCustomizer.java
index 3ff34abbd..c0d405bd9 100644
--- a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/Ipv6RouteCustomizer.java
+++ b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/Ipv6RouteCustomizer.java
@@ -16,7 +16,7 @@
package io.fd.hc2vpp.routing.read;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.translate.util.MultiNamingContext;
import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.hc2vpp.routing.RoutingConfiguration;
diff --git a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/Ipv4RouteCustomizer.java b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/Ipv4RouteCustomizer.java
index 77e0d1a3c..f3a4b7b0c 100644
--- a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/Ipv4RouteCustomizer.java
+++ b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/Ipv4RouteCustomizer.java
@@ -16,7 +16,7 @@
package io.fd.hc2vpp.routing.write;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.base.Preconditions;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
diff --git a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/Ipv6RouteCustomizer.java b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/Ipv6RouteCustomizer.java
index d6fc3e6c6..a06078174 100644
--- a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/Ipv6RouteCustomizer.java
+++ b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/Ipv6RouteCustomizer.java
@@ -17,7 +17,7 @@
package io.fd.hc2vpp.routing.write;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.base.Preconditions;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
diff --git a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/trait/RouteRequestProducer.java b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/trait/RouteRequestProducer.java
index d9cd5d1ee..391e6194f 100644
--- a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/trait/RouteRequestProducer.java
+++ b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/trait/RouteRequestProducer.java
@@ -17,7 +17,6 @@
package io.fd.hc2vpp.routing.write.trait;
import static com.google.common.base.Preconditions.checkArgument;
-import static org.apache.commons.lang3.StringUtils.isNotEmpty;
import com.google.common.collect.ImmutableSet.Builder;
import io.fd.hc2vpp.common.translate.util.AddressTranslator;
@@ -56,7 +55,8 @@ public interface RouteRequestProducer extends ByteDataTranslator, AddressTransla
default boolean classifyTablePresent(final String classifyTableName,
final VppClassifierContextManager classifierContextManager,
final MappingContext mappingContext) {
- return isNotEmpty(classifyTableName) &&
+
+ return classifyTableName != null && !classifyTableName.isEmpty() &&
classifierContextManager.containsTable(classifyTableName, mappingContext);
}
diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/RoutingModuleTest.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/RoutingModuleTest.java
index 103044fbe..350aa9688 100644
--- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/RoutingModuleTest.java
+++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/RoutingModuleTest.java
@@ -45,7 +45,7 @@ import java.util.Set;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.mdsal.binding.api.DataBroker;
public class RoutingModuleTest {
diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/ControlPlaneProtocolCustomizerTest.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/ControlPlaneProtocolCustomizerTest.java
index 6f45d9210..feaf85e63 100644
--- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/ControlPlaneProtocolCustomizerTest.java
+++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/ControlPlaneProtocolCustomizerTest.java
@@ -22,7 +22,7 @@ import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.when;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.test.write.WriterCustomizerTest;
import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.hc2vpp.fib.management.FibManagementIIds;
@@ -118,8 +118,8 @@ public class ControlPlaneProtocolCustomizerTest extends WriterCustomizerTest {
when(writeContext.readAfter(vrfIidV6)).thenReturn(Optional.of(
new TableBuilder().withKey(keyV6).setAddressFamily(keyV6.getAddressFamily())
.setTableId(keyV6.getTableId()).setName("VRF-IPV6-1").build()));
- when(writeContext.readAfter(invalidVrfIidV4)).thenReturn(Optional.absent());
- when(writeContext.readAfter(invalidVrfIidV6)).thenReturn(Optional.absent());
+ when(writeContext.readAfter(invalidVrfIidV4)).thenReturn(Optional.empty());
+ when(writeContext.readAfter(invalidVrfIidV6)).thenReturn(Optional.empty());
}
@Test(expected = WriteFailedException.class)
diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv4RouteCustomizerTest.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv4RouteCustomizerTest.java
index 2220a042e..b241c0ba6 100644
--- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv4RouteCustomizerTest.java
+++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv4RouteCustomizerTest.java
@@ -25,7 +25,7 @@ import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.collect.ImmutableList;
import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.hc2vpp.fib.management.FibManagementIIds;
diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv6RouteCustomizerTest.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv6RouteCustomizerTest.java
index ec748e59f..f1804fe89 100644
--- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv6RouteCustomizerTest.java
+++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv6RouteCustomizerTest.java
@@ -19,7 +19,7 @@ package io.fd.hc2vpp.routing.write;
import static io.fd.hc2vpp.routing.helpers.InterfaceTestHelper.INTERFACE_INDEX;
import static org.mockito.Mockito.when;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.collect.ImmutableList;
import io.fd.hc2vpp.fib.management.FibManagementIIds;
import io.fd.hc2vpp.routing.Ipv6RouteData;
diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/RouteCustomizerTest.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/RouteCustomizerTest.java
index 883e52fea..d135fe316 100644
--- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/RouteCustomizerTest.java
+++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/RouteCustomizerTest.java
@@ -21,7 +21,7 @@ import static io.fd.hc2vpp.routing.helpers.InterfaceTestHelper.INTERFACE_INDEX;
import static io.fd.hc2vpp.routing.helpers.InterfaceTestHelper.INTERFACE_NAME;
import static org.mockito.Mockito.when;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.test.write.WriterCustomizerTest;
import io.fd.hc2vpp.common.translate.util.MultiNamingContext;
import io.fd.hc2vpp.common.translate.util.NamingContext;
@@ -120,8 +120,8 @@ abstract class RouteCustomizerTest extends WriterCustomizerTest implements Routi
when(writeContext.readAfter(TABLE_V6_IID)).thenReturn(Optional.of(
new TableBuilder().withKey(IPV6_TABLE_KEY).setAddressFamily(Ipv6.class)
.setTableId(IPV6_TABLE_KEY.getTableId()).build()));
- when(writeContext.readAfter(INVALID_TABLE_V4_IID)).thenReturn(Optional.absent());
- when(writeContext.readAfter(INVALID_TABLE_V6_IID)).thenReturn(Optional.absent());
+ when(writeContext.readAfter(INVALID_TABLE_V4_IID)).thenReturn(Optional.empty());
+ when(writeContext.readAfter(INVALID_TABLE_V6_IID)).thenReturn(Optional.empty());
}
}
diff --git a/samples/samples-impl/src/main/java/io/fd/hc2vpp/samples/read/VxlanReadCustomizer.java b/samples/samples-impl/src/main/java/io/fd/hc2vpp/samples/read/VxlanReadCustomizer.java
index 8a67942bd..6fcf50351 100644
--- a/samples/samples-impl/src/main/java/io/fd/hc2vpp/samples/read/VxlanReadCustomizer.java
+++ b/samples/samples-impl/src/main/java/io/fd/hc2vpp/samples/read/VxlanReadCustomizer.java
@@ -16,7 +16,7 @@
package io.fd.hc2vpp.samples.read;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.base.Preconditions;
import io.fd.hc2vpp.common.translate.util.AddressTranslator;
import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
diff --git a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/policy/request/PolicyReadRequest.java b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/policy/request/PolicyReadRequest.java
index 680216522..7e1a94c3a 100644
--- a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/policy/request/PolicyReadRequest.java
+++ b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/policy/request/PolicyReadRequest.java
@@ -104,7 +104,7 @@ public class PolicyReadRequest extends JVppRequest
@Nonnull
public List<PolicyKey> readAllKeys(@Nonnull InstanceIdentifier<Policy> id, @Nonnull ReadContext ctx)
throws ReadFailedException {
- return dumpManager.getDump(id, ctx.getModificationCache()).or(STATIC_EMPTY_REPLY).srPoliciesDetails.stream()
+ return dumpManager.getDump(id, ctx.getModificationCache()).orElse(STATIC_EMPTY_REPLY).srPoliciesDetails.stream()
.map(srPoliciesDetails -> arrayToIpv6AddressNoZone(srPoliciesDetails.bsid.addr))
.map(bsid -> parsePolicyKey(ctx, bsid))
.collect(Collectors.toList());
@@ -122,7 +122,7 @@ public class PolicyReadRequest extends JVppRequest
Ipv6Address bsid =
policyCtx.getPolicyBsid(key.getColor(), key.getEndpoint().getIpv6Address(), ctx.getMappingContext());
- dumpManager.getDump(id, ctx.getModificationCache()).or(STATIC_EMPTY_REPLY).srPoliciesDetails.stream()
+ dumpManager.getDump(id, ctx.getModificationCache()).orElse(STATIC_EMPTY_REPLY).srPoliciesDetails.stream()
.filter(srPoliciesDetails -> arrayToIpv6AddressNoZone(srPoliciesDetails.bsid.addr).getValue()
.equals(bsid.getValue()))
.findFirst()
@@ -212,7 +212,7 @@ public class PolicyReadRequest extends JVppRequest
public List<NamedSegmentListKey> readNamedSegmentListKeys(final InstanceIdentifier<NamedSegmentList> id,
final ReadContext ctx) throws ReadFailedException {
- return dumpManager.getDump(id, ctx.getModificationCache()).or(STATIC_EMPTY_REPLY).srPoliciesDetails.stream()
+ return dumpManager.getDump(id, ctx.getModificationCache()).orElse(STATIC_EMPTY_REPLY).srPoliciesDetails.stream()
.map(srPoliciesDetails -> {
String bsid = arrayToIpv6AddressNoZone(srPoliciesDetails.bsid.addr).getValue();
return Arrays.stream(srPoliciesDetails.sidLists).map(srv6SidList -> srv6SidList.weight)
@@ -237,7 +237,7 @@ public class PolicyReadRequest extends JVppRequest
Preconditions.checkNotNull(bsid, "Weight/Bsid not resolved for Iid: {}", id);
builder.setSegments(new SegmentsBuilder().build());
- dumpManager.getDump(id, ctx.getModificationCache()).or(STATIC_EMPTY_REPLY).srPoliciesDetails.stream()
+ dumpManager.getDump(id, ctx.getModificationCache()).orElse(STATIC_EMPTY_REPLY).srPoliciesDetails.stream()
.filter(srPoliciesDetails -> arrayToIpv6AddressNoZone(srPoliciesDetails.bsid.addr).getValue()
.equals(bsid))
.forEach(srPoliciesDetails -> Arrays.stream(srPoliciesDetails.sidLists)
diff --git a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/sid/request/LocalSidReadRequest.java b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/sid/request/LocalSidReadRequest.java
index 418e5d52d..73dd021f5 100644
--- a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/sid/request/LocalSidReadRequest.java
+++ b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/sid/request/LocalSidReadRequest.java
@@ -125,7 +125,7 @@ public class LocalSidReadRequest extends JVppRequest implements ReadRequest<Sid,
"Identifier does not have %s ", LocatorKey.class);
String locator = key.getName();
- return dumpManager.getDump(identifier, ctx.getModificationCache()).or(STATIC_EMPTY_REPLY).srLocalsidsDetails
+ return dumpManager.getDump(identifier, ctx.getModificationCache()).orElse(STATIC_EMPTY_REPLY).srLocalsidsDetails
.stream()
.filter(detail -> arrayToIpv6AddressNoZone(detail.addr.addr).getValue().contains(locator))
.map(srLocalsidsDetails -> extractOpCode(arrayToIpv6AddressNoZone(srLocalsidsDetails.addr.addr),
@@ -156,7 +156,7 @@ public class LocalSidReadRequest extends JVppRequest implements ReadRequest<Sid,
Ipv6Address sidAddress =
parseSrv6SidAddress(locator.getValue(), locLength.toString(), sidKey.getOpcode().getValue());
- dumpManager.getDump(identifier, ctx.getModificationCache()).or(STATIC_EMPTY_REPLY).srLocalsidsDetails
+ dumpManager.getDump(identifier, ctx.getModificationCache()).orElse(STATIC_EMPTY_REPLY).srLocalsidsDetails
.stream()
.filter(detail -> Arrays.equals(detail.addr.addr, ipv6AddressNoZoneToArray(sidAddress)))
.findFirst()
diff --git a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/sid/request/LocatorReadRequest.java b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/sid/request/LocatorReadRequest.java
index cadc348d1..2c211aaa3 100644
--- a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/sid/request/LocatorReadRequest.java
+++ b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/sid/request/LocatorReadRequest.java
@@ -86,7 +86,7 @@ public class LocatorReadRequest extends JVppRequest implements ReadRequest<Locat
public List<LocatorKey> readAllKeys(@Nonnull final InstanceIdentifier<Locator> identifier,
@Nonnull final ReadContext ctx)
throws ReadFailedException {
- return dumpManager.getDump(identifier, ctx.getModificationCache()).or(STATIC_EMPTY_REPLY).srLocalsidsDetails
+ return dumpManager.getDump(identifier, ctx.getModificationCache()).orElse(STATIC_EMPTY_REPLY).srLocalsidsDetails
.stream()
.map(srLocalsidsDetails -> extractLocator(arrayToIpv6AddressNoZone(srLocalsidsDetails.addr.addr),
ctx.getMappingContext(), null).getValue())
@@ -102,7 +102,7 @@ public class LocatorReadRequest extends JVppRequest implements ReadRequest<Locat
"Identifier does not have %s ", LocatorKey.class);
String locator = key.getName();
- dumpManager.getDump(identifier, ctx.getModificationCache()).or(STATIC_EMPTY_REPLY).srLocalsidsDetails
+ dumpManager.getDump(identifier, ctx.getModificationCache()).orElse(STATIC_EMPTY_REPLY).srLocalsidsDetails
.stream()
.filter(detail -> arrayToIpv6AddressNoZone(detail.addr.addr).getValue().contains(locator))
.findFirst()
diff --git a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/steering/request/L2SteeringRequest.java b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/steering/request/L2SteeringRequest.java
index b6554ce13..379ffa1ab 100644
--- a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/steering/request/L2SteeringRequest.java
+++ b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/steering/request/L2SteeringRequest.java
@@ -50,7 +50,7 @@ public class L2SteeringRequest extends SteeringRequest
@Nonnull
public List<InterfaceKey> readAllKeys(@Nonnull InstanceIdentifier<Interface> identifier, @Nonnull ReadContext ctx)
throws ReadFailedException {
- return dumpManager.getDump(identifier, ctx.getModificationCache()).or(STATIC_EMPTY_REPLY)
+ return dumpManager.getDump(identifier, ctx.getModificationCache()).orElse(STATIC_EMPTY_REPLY)
.srSteeringPolDetails.stream()
.filter(srSteeringPolDetails -> ((int) srSteeringPolDetails.trafficType) == L2_TRAFFIC_TYPE)
.map(srSteeringPolDetails -> srSteeringPolDetails.swIfIndex)
@@ -65,7 +65,7 @@ public class L2SteeringRequest extends SteeringRequest
ifcNamingContext.getIndex(identifier.firstKeyOf(Interface.class).getInputInterface(),
ctx.getMappingContext());
- dumpManager.getDump(identifier, ctx.getModificationCache()).or(STATIC_EMPTY_REPLY)
+ dumpManager.getDump(identifier, ctx.getModificationCache()).orElse(STATIC_EMPTY_REPLY)
.srSteeringPolDetails.stream()
.filter(srSteeringPolDetails -> ((int) srSteeringPolDetails.trafficType) == L2_TRAFFIC_TYPE)
.filter(srSteeringPolDetails -> srSteeringPolDetails.swIfIndex == index)
diff --git a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/steering/request/L3SteeringRequest.java b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/steering/request/L3SteeringRequest.java
index 2c3631d1e..3c40d4954 100644
--- a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/steering/request/L3SteeringRequest.java
+++ b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/steering/request/L3SteeringRequest.java
@@ -58,7 +58,7 @@ public class L3SteeringRequest extends SteeringRequest
@Nonnull
public List<PrefixKey> readAllKeys(@Nonnull InstanceIdentifier<Prefix> identifier, @Nonnull ReadContext ctx)
throws ReadFailedException {
- return dumpManager.getDump(identifier, ctx.getModificationCache()).or(STATIC_EMPTY_REPLY)
+ return dumpManager.getDump(identifier, ctx.getModificationCache()).orElse(STATIC_EMPTY_REPLY)
.srSteeringPolDetails.stream()
.filter(
srSteeringPolDetails -> ((int) srSteeringPolDetails.trafficType) !=
@@ -69,7 +69,7 @@ public class L3SteeringRequest extends SteeringRequest
public List<IpPrefix> readAllIpPrefixes(@Nonnull InstanceIdentifier<Prefixes> identifier, @Nonnull ReadContext ctx)
throws ReadFailedException {
- return dumpManager.getDump(identifier, ctx.getModificationCache()).or(STATIC_EMPTY_REPLY)
+ return dumpManager.getDump(identifier, ctx.getModificationCache()).orElse(STATIC_EMPTY_REPLY)
.srSteeringPolDetails.stream()
.filter(
srSteeringPolDetails -> ((int) srSteeringPolDetails.trafficType) !=
@@ -83,7 +83,7 @@ public class L3SteeringRequest extends SteeringRequest
@Nonnull PrefixBuilder builder) throws ReadFailedException {
checkValid();
PrefixKey key = identifier.firstKeyOf(Prefix.class);
- dumpManager.getDump(identifier, ctx.getModificationCache()).or(STATIC_EMPTY_REPLY)
+ dumpManager.getDump(identifier, ctx.getModificationCache()).orElse(STATIC_EMPTY_REPLY)
.srSteeringPolDetails.stream()
.filter(
srSteeringPolDetails -> ((int) srSteeringPolDetails.trafficType) !=
diff --git a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/CandidatePathContextManagerImpl.java b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/CandidatePathContextManagerImpl.java
index 1d3ed7a2f..85ee9244d 100644
--- a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/CandidatePathContextManagerImpl.java
+++ b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/CandidatePathContextManagerImpl.java
@@ -17,7 +17,7 @@
package io.fd.hc2vpp.srv6.util;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.honeycomb.translate.MappingContext;
import java.util.concurrent.atomic.AtomicLong;
import javax.annotation.Nonnull;
diff --git a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/LocatorContextManagerImpl.java b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/LocatorContextManagerImpl.java
index 969c36b65..1b6301df0 100644
--- a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/LocatorContextManagerImpl.java
+++ b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/LocatorContextManagerImpl.java
@@ -19,7 +19,7 @@ package io.fd.hc2vpp.srv6.util;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.honeycomb.translate.MappingContext;
import javax.annotation.Nonnull;
import javax.annotation.concurrent.ThreadSafe;
diff --git a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/PolicyContextManagerImpl.java b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/PolicyContextManagerImpl.java
index 226776147..36642ff28 100644
--- a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/PolicyContextManagerImpl.java
+++ b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/PolicyContextManagerImpl.java
@@ -17,7 +17,7 @@
package io.fd.hc2vpp.srv6.util;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.honeycomb.translate.MappingContext;
import javax.annotation.Nonnull;
import javax.annotation.concurrent.ThreadSafe;
diff --git a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/Srv6Util.java b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/Srv6Util.java
index 6cf792029..e1dc7eaf2 100644
--- a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/Srv6Util.java
+++ b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/Srv6Util.java
@@ -17,7 +17,7 @@
package io.fd.hc2vpp.srv6.util;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.honeycomb.translate.util.RWUtils;
import io.fd.honeycomb.translate.write.WriteContext;
import javax.annotation.Nonnull;
diff --git a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/write/policy/PolicyCustomizer.java b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/write/policy/PolicyCustomizer.java
index 9072e3991..00d51960f 100644
--- a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/write/policy/PolicyCustomizer.java
+++ b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/write/policy/PolicyCustomizer.java
@@ -179,7 +179,7 @@ public class PolicyCustomizer extends FutureJVppCustomizer
List<SidList> sidLists = new ArrayList<>();
segmentLists.forEach(segmentList -> {
- com.google.common.base.Optional<NamedSegmentList> namedSegmentListOptional = writeContext.readAfter(
+ java.util.Optional<NamedSegmentList> namedSegmentListOptional = writeContext.readAfter(
Srv6PolicyIIds.SR_TE_NSLS.child(NamedSegmentList.class,
new NamedSegmentListKey(segmentList.getName())));
diff --git a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/write/sid/SidCustomizer.java b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/write/sid/SidCustomizer.java
index e29b623c4..a9695d2e6 100644
--- a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/write/sid/SidCustomizer.java
+++ b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/write/sid/SidCustomizer.java
@@ -16,7 +16,7 @@
package io.fd.hc2vpp.srv6.write.sid;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.base.Preconditions;
import com.googlecode.ipv6.IPv6NetworkMask;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
diff --git a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/Srv6ModuleTest.java b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/Srv6ModuleTest.java
index b1610a8fa..05b5928b3 100644
--- a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/Srv6ModuleTest.java
+++ b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/Srv6ModuleTest.java
@@ -49,7 +49,7 @@ import java.util.Set;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.mdsal.binding.api.DataBroker;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.rev180313.RoutingBuilder;
public class Srv6ModuleTest {
diff --git a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/sid/SidCustomizerTest.java b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/sid/SidCustomizerTest.java
index e27cd67da..979a564fe 100644
--- a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/sid/SidCustomizerTest.java
+++ b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/sid/SidCustomizerTest.java
@@ -20,7 +20,7 @@ import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.when;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.translate.util.AddressTranslator;
import io.fd.hc2vpp.srv6.write.sid.request.LocalSidRequestTest;
import io.fd.honeycomb.translate.MappingContext;
diff --git a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/util/LocatorContextManagerImplTest.java b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/util/LocatorContextManagerImplTest.java
index e3fa6b007..5927ec38a 100644
--- a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/util/LocatorContextManagerImplTest.java
+++ b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/util/LocatorContextManagerImplTest.java
@@ -22,7 +22,7 @@ import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.srv6.write.sid.request.LocalSidRequestTest;
import io.fd.honeycomb.translate.MappingContext;
import org.junit.Assert;
diff --git a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/util/Srv6UtilTest.java b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/util/Srv6UtilTest.java
index 89d97be31..4143de641 100644
--- a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/util/Srv6UtilTest.java
+++ b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/util/Srv6UtilTest.java
@@ -19,7 +19,7 @@ package io.fd.hc2vpp.srv6.util;
import static org.mockito.Mockito.when;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.srv6.Srv6PolicyIIds;
import io.fd.honeycomb.test.tools.annotations.InjectTestData;
import org.junit.Assert;
diff --git a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/util/function/LocalSidFunctionBindingRegistryTest.java b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/util/function/LocalSidFunctionBindingRegistryTest.java
index 7045c8d6f..97a7000cb 100644
--- a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/util/function/LocalSidFunctionBindingRegistryTest.java
+++ b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/util/function/LocalSidFunctionBindingRegistryTest.java
@@ -18,7 +18,7 @@ package io.fd.hc2vpp.srv6.util.function;
import static org.mockito.Mockito.when;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.translate.util.AddressTranslator;
import io.fd.hc2vpp.fib.management.FibManagementIIds;
import io.fd.hc2vpp.srv6.util.JvppRequestTest;
diff --git a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/write/policy/PolicyCustomizerTest.java b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/write/policy/PolicyCustomizerTest.java
index 8f974542c..e779dad5e 100644
--- a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/write/policy/PolicyCustomizerTest.java
+++ b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/write/policy/PolicyCustomizerTest.java
@@ -22,7 +22,7 @@ import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-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.ByteDataTranslator;
import io.fd.hc2vpp.fib.management.FibManagementIIds;
diff --git a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/write/sid/SidCustomizerTest.java b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/write/sid/SidCustomizerTest.java
index ae72161e5..edef19dec 100644
--- a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/write/sid/SidCustomizerTest.java
+++ b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/write/sid/SidCustomizerTest.java
@@ -22,7 +22,7 @@ import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.srv6.write.sid.request.LocalSidRequestTest;
import io.fd.honeycomb.translate.write.WriteFailedException;
import org.junit.Before;
diff --git a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/write/steering/InterfacesConfigCustomizerTest.java b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/write/steering/InterfacesConfigCustomizerTest.java
index 738a970f5..b9e49908b 100644
--- a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/write/steering/InterfacesConfigCustomizerTest.java
+++ b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/write/steering/InterfacesConfigCustomizerTest.java
@@ -21,7 +21,7 @@ import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-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.ByteDataTranslator;
import io.fd.hc2vpp.common.translate.util.NamingContext;
diff --git a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/write/steering/PrefixCustomizerTest.java b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/write/steering/PrefixCustomizerTest.java
index d70813844..2adf497a6 100644
--- a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/write/steering/PrefixCustomizerTest.java
+++ b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/write/steering/PrefixCustomizerTest.java
@@ -21,7 +21,7 @@ import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
import io.fd.hc2vpp.srv6.Srv6PolicyIIds;
import io.fd.hc2vpp.srv6.util.JvppRequestTest;
diff --git a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/write/steering/PrefixesConfigCustomizerTest.java b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/write/steering/PrefixesConfigCustomizerTest.java
index 10ab55b39..7ac2cd0d5 100644
--- a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/write/steering/PrefixesConfigCustomizerTest.java
+++ b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/write/steering/PrefixesConfigCustomizerTest.java
@@ -21,7 +21,7 @@ import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
import io.fd.hc2vpp.srv6.Srv6PolicyIIds;
import io.fd.hc2vpp.srv6.util.JvppRequestTest;
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/DisabledInterfacesManager.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/DisabledInterfacesManager.java
index 893ad2c7a..9f571ee93 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/DisabledInterfacesManager.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/DisabledInterfacesManager.java
@@ -16,7 +16,7 @@
package io.fd.hc2vpp.v3po;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import io.fd.honeycomb.translate.MappingContext;
@@ -27,8 +27,8 @@ import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import javax.annotation.Nonnull;
-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.v3po.context.rev160909.DisabledInterfaces;
import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.context.rev160909.DisabledInterfacesBuilder;
import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.context.rev160909.disabled.interfaces.DisabledInterfaceIndex;
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/InterfaceRoutingCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/InterfaceRoutingCustomizer.java
index 79f4f785e..c5b3756d5 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/InterfaceRoutingCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/InterfaceRoutingCustomizer.java
@@ -18,7 +18,7 @@ package io.fd.hc2vpp.v3po.interfaces;
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.NamingContext;
import io.fd.honeycomb.translate.spi.write.WriterCustomizer;
import io.fd.honeycomb.translate.util.RWUtils;
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/SubInterfaceRoutingCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/SubInterfaceRoutingCustomizer.java
index f52543d71..fbaccfa1c 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/SubInterfaceRoutingCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/SubInterfaceRoutingCustomizer.java
@@ -19,7 +19,7 @@ package io.fd.hc2vpp.v3po.interfaces;
import static com.google.common.base.Preconditions.checkState;
import static io.fd.hc2vpp.v3po.util.SubInterfaceUtils.subInterfaceFullNameConfig;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.honeycomb.translate.spi.write.WriterCustomizer;
import io.fd.honeycomb.translate.util.RWUtils;
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/AfPacketCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/AfPacketCustomizer.java
index edf3ab66f..ef15dbcdf 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/AfPacketCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/AfPacketCustomizer.java
@@ -98,7 +98,7 @@ public class AfPacketCustomizer implements InitializingReaderCustomizer<AfPacket
}
final AfPacketDetailsReplyDump dump = afPacketDumpManager.getDump(id, ctx.getModificationCache())
- .or(new AfPacketDetailsReplyDump());
+ .orElse(new AfPacketDetailsReplyDump());
// Relying here that parent InterfaceCustomizer was invoked first to fill in the context with initial ifc mapping
final AfPacketDetails afPacketDetails = dump.afPacketDetails.stream()
.filter(detail -> detail.swIfIndex == index)
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/InterconnectionReadUtils.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/InterconnectionReadUtils.java
index 8fe0f0379..44a22d9b1 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/InterconnectionReadUtils.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/InterconnectionReadUtils.java
@@ -84,7 +84,7 @@ final class InterconnectionReadUtils implements InterfaceDataTranslator {
LOG.debug("Interface details for interface: {}, details: {}", ifaceName, iface);
final BridgeDomainDetailsReplyDump dumpReply = bdDumpManager.getDump(id, ctx.getModificationCache())
- .or(new BridgeDomainDetailsReplyDump());
+ .orElse(new BridgeDomainDetailsReplyDump());
for (final BridgeDomainDetails bd : dumpReply.bridgeDomainDetails) {
final Optional<BridgeDomainSwIf> bdIfAssignment = getBridgeDomainSwIf(ifaceId, bd);
if (bdIfAssignment.isPresent()) {
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/TapV2Customizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/TapV2Customizer.java
index 6919c94fe..1af4af64c 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/TapV2Customizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/TapV2Customizer.java
@@ -105,7 +105,7 @@ public class TapV2Customizer extends FutureJVppCustomizer
LOG.debug("Reading attributes for tapV2 interface: {}", key.getName());
final SwInterfaceTapV2DetailsReplyDump reply = tapV2DumpManager.getDump(id, ctx.getModificationCache())
- .or(new SwInterfaceTapV2DetailsReplyDump());
+ .orElse(new SwInterfaceTapV2DetailsReplyDump());
final Optional<SwInterfaceTapV2Details> detail = reply.swInterfaceTapV2Details.stream()
.filter(d -> d.swIfIndex == index)
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/VhostUserCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/VhostUserCustomizer.java
index d0e8bd50a..561b06738 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/VhostUserCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/VhostUserCustomizer.java
@@ -108,7 +108,7 @@ public class VhostUserCustomizer implements InitializingReaderCustomizer<VhostUs
final SwInterfaceVhostUserDetailsReplyDump dump =
vhostDumpManager.getDump(id, ctx.getModificationCache())
- .or(new SwInterfaceVhostUserDetailsReplyDump());
+ .orElse(new SwInterfaceVhostUserDetailsReplyDump());
// Relying here that parent InterfaceCustomizer was invoked first to fill in the context with initial ifc mapping
final SwInterfaceVhostUserDetails swInterfaceVhostUserDetails = dump.swInterfaceVhostUserDetails.stream()
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/cache/InterfaceCacheDumpManagerImpl.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/cache/InterfaceCacheDumpManagerImpl.java
index b6e850982..9e4c94d81 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/cache/InterfaceCacheDumpManagerImpl.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/cache/InterfaceCacheDumpManagerImpl.java
@@ -96,7 +96,7 @@ final class InterfaceCacheDumpManagerImpl implements InterfaceCacheDumpManager {
identifier);
final SwInterfaceDetailsReplyDump reply =
specificDumpManager.getDump(identifier, ctx.getModificationCache(), interfaceName)
- .or(new SwInterfaceDetailsReplyDump());
+ .orElse(new SwInterfaceDetailsReplyDump());
if (reply.swInterfaceDetails.isEmpty()) {
return null;
@@ -113,7 +113,7 @@ final class InterfaceCacheDumpManagerImpl implements InterfaceCacheDumpManager {
LOG.debug("Performing dump[{}]", identifier);
final SwInterfaceDetailsReplyDump dump =
fullDumpManager.getDump(identifier, cache)
- .or(new SwInterfaceDetailsReplyDump());
+ .orElse(new SwInterfaceDetailsReplyDump());
// naming context initialization must be done here, as it is uses getName in next step, therefore it would
// create artificial mapping for every interface, because this happens before interface dump is processed
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/BridgeDomainCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/BridgeDomainCustomizer.java
index f961027b6..f74d630be 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/BridgeDomainCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/BridgeDomainCustomizer.java
@@ -119,7 +119,7 @@ public class BridgeDomainCustomizer extends FutureJVppCustomizer
LOG.debug("deleteCurrentAttributes: id={}, dataBefore={}, ctx={}", id, dataBefore, ctx);
final String bdName = id.firstKeyOf(BridgeDomain.class).getName();
- final com.google.common.base.Optional<Interfaces> after =
+ final java.util.Optional<Interfaces> after =
ctx.readAfter(InstanceIdentifier.create(Interfaces.class));
if (after.isPresent()) {
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducer.java
index 07b846365..baf321a1c 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducer.java
@@ -16,7 +16,7 @@
package io.fd.hc2vpp.v3po.notification;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.collect.Lists;
import com.google.inject.Inject;
import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/DisabledInterfacesManagerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/DisabledInterfacesManagerTest.java
index 9b3baf5a4..e67fb2d2a 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/DisabledInterfacesManagerTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/DisabledInterfacesManagerTest.java
@@ -26,7 +26,7 @@ import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.verify;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.honeycomb.translate.MappingContext;
import java.util.Arrays;
import java.util.List;
@@ -66,7 +66,7 @@ public class DisabledInterfacesManagerTest {
doReturn(Optional.of(toIndex(1)))
.when(mappingContext)
.read(SPECIFIC_ID_1);
- doReturn(Optional.absent())
+ doReturn(Optional.empty())
.when(mappingContext)
.read(SPECIFIC_ID_4);
}
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/V3poModuleTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/V3poModuleTest.java
index 09d641584..818d3e7ce 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/V3poModuleTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/V3poModuleTest.java
@@ -41,7 +41,7 @@ import java.util.Set;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.mdsal.binding.api.DataBroker;
public class V3poModuleTest {
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/InterfaceRoutingCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/InterfaceRoutingCustomizerTest.java
index 495918d60..1d9be3511 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/InterfaceRoutingCustomizerTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/InterfaceRoutingCustomizerTest.java
@@ -20,7 +20,7 @@ import static org.mockito.Matchers.any;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.test.write.WriterCustomizerTest;
import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.honeycomb.translate.util.RWUtils;
@@ -62,7 +62,7 @@ public class InterfaceRoutingCustomizerTest extends WriterCustomizerTest {
@Test
public void testWrite() throws WriteFailedException {
- when(writeContext.readBefore(any(InstanceIdentifier.class))).thenReturn(Optional.absent());
+ when(writeContext.readBefore(any(InstanceIdentifier.class))).thenReturn(Optional.empty());
final int vrfId = 123;
when(api.swInterfaceSetTable(any())).thenReturn(future(new SwInterfaceSetTableReply()));
customizer.writeCurrentAttributes(IID, routing(vrfId), writeContext);
@@ -71,7 +71,7 @@ public class InterfaceRoutingCustomizerTest extends WriterCustomizerTest {
@Test(expected = WriteFailedException.class)
public void testWriteFailed() throws WriteFailedException {
- when(writeContext.readBefore(any(InstanceIdentifier.class))).thenReturn(Optional.absent());
+ when(writeContext.readBefore(any(InstanceIdentifier.class))).thenReturn(Optional.empty());
when(api.swInterfaceSetTable(any())).thenReturn(failedFuture());
customizer.writeCurrentAttributes(IID, routing(213), writeContext);
}
@@ -124,14 +124,14 @@ public class InterfaceRoutingCustomizerTest extends WriterCustomizerTest {
@Test(expected = WriteFailedException.class)
public void testUpdateFailed() throws WriteFailedException {
- when(writeContext.readBefore(any(InstanceIdentifier.class))).thenReturn(Optional.absent());
+ when(writeContext.readBefore(any(InstanceIdentifier.class))).thenReturn(Optional.empty());
when(api.swInterfaceSetTable(any())).thenReturn(failedFuture());
customizer.updateCurrentAttributes(IID, routing(123L), routing(321L), writeContext);
}
@Test
public void testDelete() throws WriteFailedException {
- when(writeContext.readAfter(any(InstanceIdentifier.class))).thenReturn(Optional.absent());
+ when(writeContext.readAfter(any(InstanceIdentifier.class))).thenReturn(Optional.empty());
when(api.swInterfaceSetTable(any())).thenReturn(future(new SwInterfaceSetTableReply()));
customizer.deleteCurrentAttributes(IID, routing(123), writeContext);
verify(api).swInterfaceSetTable(expectedRequest(0));
@@ -139,7 +139,7 @@ public class InterfaceRoutingCustomizerTest extends WriterCustomizerTest {
@Test(expected = WriteFailedException.DeleteFailedException.class)
public void testDeleteFailed() throws WriteFailedException {
- when(writeContext.readAfter(any(InstanceIdentifier.class))).thenReturn(Optional.absent());
+ when(writeContext.readAfter(any(InstanceIdentifier.class))).thenReturn(Optional.empty());
when(api.swInterfaceSetTable(any())).thenReturn(failedFuture());
customizer.deleteCurrentAttributes(IID, routing(123), writeContext);
}
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/InterfaceTypeTestUtils.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/InterfaceTypeTestUtils.java
index 5bce6aea1..73b15c636 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/InterfaceTypeTestUtils.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/InterfaceTypeTestUtils.java
@@ -18,7 +18,7 @@ package io.fd.hc2vpp.v3po.interfaces;
import static org.mockito.Mockito.doReturn;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.honeycomb.translate.ModificationCache;
import io.fd.honeycomb.translate.write.WriteContext;
import org.mockito.Matchers;
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/SubInterfaceRoutingCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/SubInterfaceRoutingCustomizerTest.java
index 298a824e6..a8903de10 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/SubInterfaceRoutingCustomizerTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/SubInterfaceRoutingCustomizerTest.java
@@ -21,7 +21,7 @@ import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.collect.ImmutableSet;
import io.fd.hc2vpp.common.test.write.WriterCustomizerTest;
import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
@@ -96,7 +96,7 @@ public class SubInterfaceRoutingCustomizerTest extends WriterCustomizerTest impl
@Test
public void testWriteIpv4Vrf() throws WriteFailedException {
- when(writeContext.readBefore(any(InstanceIdentifier.class))).thenReturn(Optional.absent());
+ when(writeContext.readBefore(any(InstanceIdentifier.class))).thenReturn(Optional.empty());
final Routing v4Routing = new RoutingBuilder().setIpv4VrfId(new VniReference(4L)).build();
customizer.writeCurrentAttributes(VALID_ID, v4Routing, writeContext);
verifySetTableRequest(1, Collections.singleton(request(false, SUBIF_INDEX, 4)));
@@ -105,7 +105,7 @@ public class SubInterfaceRoutingCustomizerTest extends WriterCustomizerTest impl
@Test
public void testWriteIpv6Vrf() throws WriteFailedException {
- when(writeContext.readBefore(any(InstanceIdentifier.class))).thenReturn(Optional.absent());
+ when(writeContext.readBefore(any(InstanceIdentifier.class))).thenReturn(Optional.empty());
final Routing v6Routing = new RoutingBuilder().setIpv6VrfId(new VniReference(3L)).build();
customizer.writeCurrentAttributes(VALID_ID, v6Routing, writeContext);
verifySetTableRequest(1, Collections.singleton(request(true, SUBIF_INDEX, 3)));
@@ -113,7 +113,7 @@ public class SubInterfaceRoutingCustomizerTest extends WriterCustomizerTest impl
@Test
public void testUpdateIpv4Vrf() throws WriteFailedException {
- when(writeContext.readBefore(any(InstanceIdentifier.class))).thenReturn(Optional.absent());
+ when(writeContext.readBefore(any(InstanceIdentifier.class))).thenReturn(Optional.empty());
final Routing routingBefore = new RoutingBuilder().setIpv6VrfId(new VniReference(3L))
.setIpv4VrfId(new VniReference(4L)).build();
final Routing routingAfter = new RoutingBuilder().setIpv6VrfId(new VniReference(3L))
@@ -125,7 +125,7 @@ public class SubInterfaceRoutingCustomizerTest extends WriterCustomizerTest impl
@Test
public void testUpdateIpv6Vrf() throws WriteFailedException {
- when(writeContext.readBefore(any(InstanceIdentifier.class))).thenReturn(Optional.absent());
+ when(writeContext.readBefore(any(InstanceIdentifier.class))).thenReturn(Optional.empty());
final Routing routingBefore = new RoutingBuilder().setIpv6VrfId(new VniReference(3L))
.setIpv4VrfId(new VniReference(4L)).build();
final Routing routingAfter = new RoutingBuilder().setIpv6VrfId(new VniReference(8L))
@@ -137,7 +137,7 @@ public class SubInterfaceRoutingCustomizerTest extends WriterCustomizerTest impl
@Test
public void testDeleteIpv4Vrf() throws WriteFailedException {
- when(writeContext.readAfter(any(InstanceIdentifier.class))).thenReturn(Optional.absent());
+ when(writeContext.readAfter(any(InstanceIdentifier.class))).thenReturn(Optional.empty());
final Routing v4Routing = new RoutingBuilder().setIpv4VrfId(new VniReference(4L)).build();
customizer.deleteCurrentAttributes(VALID_ID, v4Routing, writeContext);
verifySetTableRequest(1, Collections.singleton(request(false, SUBIF_INDEX, DISABLE_VRF)));
@@ -146,7 +146,7 @@ public class SubInterfaceRoutingCustomizerTest extends WriterCustomizerTest impl
@Test
public void testDeleteIpv6Vrf() throws WriteFailedException {
- when(writeContext.readAfter(any(InstanceIdentifier.class))).thenReturn(Optional.absent());
+ when(writeContext.readAfter(any(InstanceIdentifier.class))).thenReturn(Optional.empty());
final Routing v6Routing = new RoutingBuilder().setIpv6VrfId(new VniReference(3L)).build();
customizer.deleteCurrentAttributes(VALID_ID, v6Routing, writeContext);
verifySetTableRequest(1, Collections.singleton(request(true, SUBIF_INDEX, DISABLE_VRF)));
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2/BridgeDomainCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2/BridgeDomainCustomizerTest.java
index 3f914f63d..bf9de30a2 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2/BridgeDomainCustomizerTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2/BridgeDomainCustomizerTest.java
@@ -23,7 +23,7 @@ import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.test.write.WriterCustomizerTest;
import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
import io.fd.hc2vpp.common.translate.util.NamingContext;
@@ -178,7 +178,7 @@ public class BridgeDomainCustomizerTest extends WriterCustomizerTest implements
final String bdName = "bd1";
final BridgeDomain bd = generateBridgeDomain(bdName);
defineMapping(mappingContext, bdName, bdId, BD_CTX_NAME);
- when(writeContext.readAfter(InstanceIdentifier.create(Interfaces.class))).thenReturn(Optional.absent());
+ when(writeContext.readAfter(InstanceIdentifier.create(Interfaces.class))).thenReturn(Optional.empty());
whenBridgeDomainAddDelThenSuccess();
@@ -241,7 +241,7 @@ public class BridgeDomainCustomizerTest extends WriterCustomizerTest implements
final String bdName = "bd1";
final BridgeDomain bd = generateBridgeDomain("bd1");
noMappingDefined(mappingContext, bdName, BD_CTX_NAME);
- when(writeContext.readAfter(InstanceIdentifier.create(Interfaces.class))).thenReturn(Optional.absent());
+ when(writeContext.readAfter(InstanceIdentifier.create(Interfaces.class))).thenReturn(Optional.empty());
try {
customizer.deleteCurrentAttributes(bdIdentifierForName(bdName), bd, writeContext);
@@ -258,7 +258,7 @@ public class BridgeDomainCustomizerTest extends WriterCustomizerTest implements
final String bdName = "bd1";
final BridgeDomain bd = generateBridgeDomain(bdName);
defineMapping(mappingContext, bdName, bdId, BD_CTX_NAME);
- when(writeContext.readAfter(InstanceIdentifier.create(Interfaces.class))).thenReturn(Optional.absent());
+ when(writeContext.readAfter(InstanceIdentifier.create(Interfaces.class))).thenReturn(Optional.empty());
whenBridgeDomainAddDelThenFailure();
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2state/L2StateTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2state/L2StateTest.java
index 3a73abdff..651993637 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2state/L2StateTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2state/L2StateTest.java
@@ -24,7 +24,7 @@ import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.when;
import static org.mockito.MockitoAnnotations.initMocks;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.collect.Iterables;
import com.google.common.collect.Multimap;
import io.fd.hc2vpp.common.test.util.FutureProducer;
diff --git a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/policer/read/InterfacePolicerCustomizer.java b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/policer/read/InterfacePolicerCustomizer.java
index 62a4f79fd..e170ebcfe 100644
--- a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/policer/read/InterfacePolicerCustomizer.java
+++ b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/policer/read/InterfacePolicerCustomizer.java
@@ -104,7 +104,7 @@ final class InterfacePolicerCustomizer extends FutureJVppCustomizer
private Optional<Integer> readTableIndex(@Nonnull final InstanceIdentifier<Policer> id, final int ifcIndex,
final byte type,
final ModificationCache cache) throws ReadFailedException {
- final com.google.common.base.Optional<PolicerClassifyDetailsReplyDump> dump =
+ final java.util.Optional<PolicerClassifyDetailsReplyDump> dump =
dumpManager.getDump(id, cache, type);
if (!dump.isPresent() || dump.get().policerClassifyDetails.isEmpty()) {
return Optional.empty();
diff --git a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/policer/read/PolicerCustomizer.java b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/policer/read/PolicerCustomizer.java
index 6445828c0..6d0295e89 100644
--- a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/policer/read/PolicerCustomizer.java
+++ b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/policer/read/PolicerCustomizer.java
@@ -16,7 +16,7 @@
package io.fd.hc2vpp.policer.read;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.primitives.Longs;
import com.google.common.primitives.UnsignedInts;
import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
diff --git a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/context/VppClassifierContextManager.java b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/context/VppClassifierContextManager.java
index 3dda5d3de..bd7bcb0ef 100644
--- a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/context/VppClassifierContextManager.java
+++ b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/context/VppClassifierContextManager.java
@@ -16,7 +16,7 @@
package io.fd.hc2vpp.vpp.classifier.context;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.honeycomb.translate.MappingContext;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
diff --git a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/context/VppClassifierContextManagerImpl.java b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/context/VppClassifierContextManagerImpl.java
index c4b48acdc..06cdcb2e3 100644
--- a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/context/VppClassifierContextManagerImpl.java
+++ b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/context/VppClassifierContextManagerImpl.java
@@ -20,7 +20,7 @@ import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkState;
import com.google.common.annotations.VisibleForTesting;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.base.Preconditions;
import com.google.inject.Inject;
import io.fd.honeycomb.translate.MappingContext;
@@ -33,8 +33,8 @@ import java.util.stream.Collector;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.inject.Named;
-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.vpp.classifier.context.rev170502.VppClassifierContext;
import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.classifier.context.rev170502.VppClassifierContextBuilder;
import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.classifier.context.rev170502.vpp.classifier.context.ClassifyTableContext;
@@ -124,9 +124,9 @@ public final class VppClassifierContextManagerImpl implements VppClassifierConte
public Optional<String> getTableBaseNode(@Nonnull final String name, @Nonnull final MappingContext ctx) {
final Optional<ClassifyTableContext> read = ctx.read(getMappingIid(name));
if (read.isPresent()) {
- return Optional.fromNullable(read.get().getClassifierNodeName());
+ return Optional.ofNullable(read.get().getClassifierNodeName());
}
- return Optional.absent();
+ return Optional.empty();
}
@Override
@@ -146,15 +146,15 @@ public final class VppClassifierContextManagerImpl implements VppClassifierConte
@Override
public Optional<String> getNodeName(final int tableIndex, final int nodeIndex, @Nonnull final MappingContext ctx) {
if (!containsName(tableIndex, ctx)) {
- return Optional.absent();
+ return Optional.empty();
}
final String tableName = getTableName(tableIndex, ctx);
final Optional<ClassifyTableContext> tableCtx = ctx.read(getMappingIid(tableName));
final List<NodeContext> nodeContext = tableCtx.get().getNodeContext();
if (nodeContext == null) {
- return Optional.absent();
+ return Optional.empty();
}
- return Optional.fromNullable(nodeContext.stream()
+ return Optional.ofNullable(nodeContext.stream()
.filter(n -> n.getIndex().equals(nodeIndex))
.findFirst()
.map(nodes -> nodes.getName())
diff --git a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifySessionReader.java b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifySessionReader.java
index ffe6b263c..9c69433f0 100644
--- a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifySessionReader.java
+++ b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifySessionReader.java
@@ -18,7 +18,7 @@ package io.fd.hc2vpp.vpp.classifier.read;
import static com.google.common.base.Preconditions.checkNotNull;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.base.Preconditions;
import com.google.common.primitives.UnsignedInts;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
@@ -185,7 +185,7 @@ public class ClassifySessionReader extends FutureJVppCustomizer
final List<ClassifySessionDetails> filteredSessions = details.stream()
.filter(singleDetail -> Arrays.equals(singleDetail.match, match)).collect(Collectors.toList());
if (filteredSessions.isEmpty()) {
- return Optional.absent();
+ return Optional.empty();
} else if (filteredSessions.size() == 1) {
return Optional.of(filteredSessions.get(0));
} else {
@@ -194,7 +194,7 @@ public class ClassifySessionReader extends FutureJVppCustomizer
filteredSessions.size()));
}
}
- return Optional.absent();
+ return Optional.empty();
}
@Nonnull
diff --git a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifyTableReader.java b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifyTableReader.java
index 4139a7187..61859b16a 100644
--- a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifyTableReader.java
+++ b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifyTableReader.java
@@ -18,7 +18,7 @@ package io.fd.hc2vpp.vpp.classifier.read;
import static com.google.common.base.Preconditions.checkNotNull;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.base.Preconditions;
import com.google.common.primitives.UnsignedInts;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
diff --git a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/VppNodeReader.java b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/VppNodeReader.java
index e8a33a484..965860c82 100644
--- a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/VppNodeReader.java
+++ b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/VppNodeReader.java
@@ -16,7 +16,7 @@
package io.fd.hc2vpp.vpp.classifier.read;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.vpp.classifier.context.VppClassifierContextManager;
import io.fd.honeycomb.translate.MappingContext;
import javax.annotation.Nonnull;
@@ -38,7 +38,7 @@ interface VppNodeReader {
final PacketHandlingAction action = PacketHandlingAction.forValue(nodeIndex);
if (action == null) {
return vppClassifierContextManager.getNodeName(tableIndex, nodeIndex, ctx)
- .transform(nodeName -> new VppNode(new VppNodeName(nodeName)));
+ .map(nodeName -> new VppNode(new VppNodeName(nodeName)));
}
return Optional.of(new VppNode(action));
}
diff --git a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/write/ClassifySessionWriter.java b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/write/ClassifySessionWriter.java
index d50dbda89..72829fcb0 100644
--- a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/write/ClassifySessionWriter.java
+++ b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/write/ClassifySessionWriter.java
@@ -16,7 +16,7 @@
package io.fd.hc2vpp.vpp.classifier.write;
-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.common.translate.util.NamingContext;
diff --git a/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/VppClassifierModuleTest.java b/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/VppClassifierModuleTest.java
index d6e990ec4..e560e1672 100644
--- a/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/VppClassifierModuleTest.java
+++ b/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/VppClassifierModuleTest.java
@@ -38,7 +38,7 @@ import java.util.Set;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.mdsal.binding.api.DataBroker;
public class VppClassifierModuleTest {
diff --git a/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/context/VppClassifierContextManagerImplTest.java b/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/context/VppClassifierContextManagerImplTest.java
index ed70e7e15..9a59e5774 100644
--- a/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/context/VppClassifierContextManagerImplTest.java
+++ b/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/context/VppClassifierContextManagerImplTest.java
@@ -23,7 +23,7 @@ import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.mockito.MockitoAnnotations.initMocks;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.honeycomb.translate.MappingContext;
import java.util.Arrays;
import org.junit.Before;
@@ -70,7 +70,7 @@ public class VppClassifierContextManagerImplTest {
@Test
public void testContainsTable() throws Exception {
- when(ctx.read(TABLE_IID_0)).thenReturn(Optional.absent());
+ when(ctx.read(TABLE_IID_0)).thenReturn(Optional.empty());
assertFalse(vppClassfierContext.containsTable(TABLE_NAME_0, ctx));
}
@@ -124,7 +124,7 @@ public class VppClassifierContextManagerImplTest {
final ClassifyTableContext tableCtx = table(TABLE_ID_0, TABLE_NAME_0, "aa");
when(ctx.read(VPP_CLASSIFIER_CONTEXT_IID)).thenReturn(Optional.of(context(tableCtx)));
when(ctx.read(TABLE_IID_0)).thenReturn(Optional.of(tableCtx));
- assertEquals(Optional.absent(), vppClassfierContext.getNodeName(TABLE_ID_0, 123, ctx));
+ assertEquals(Optional.empty(), vppClassfierContext.getNodeName(TABLE_ID_0, 123, ctx));
}
@Test
diff --git a/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/read/ClassifyTableReaderTest.java b/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/read/ClassifyTableReaderTest.java
index b2accdcba..aa450804f 100644
--- a/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/read/ClassifyTableReaderTest.java
+++ b/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/read/ClassifyTableReaderTest.java
@@ -23,7 +23,7 @@ import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.test.read.ListReaderCustomizerTest;
import io.fd.hc2vpp.vpp.classifier.context.VppClassifierContextManager;
import io.fd.honeycomb.translate.read.ReadFailedException;
@@ -100,7 +100,7 @@ public class ClassifyTableReaderTest extends
when(classifierContext.containsTable(TABLE_NAME_1, mappingContext)).thenReturn(true);
when(classifierContext.getTableIndex(TABLE_NAME_1, mappingContext)).thenReturn(TABLE_INDEX_1);
- when(classifierContext.getTableBaseNode(TABLE_NAME_1, mappingContext)).thenReturn(Optional.absent());
+ when(classifierContext.getTableBaseNode(TABLE_NAME_1, mappingContext)).thenReturn(Optional.empty());
final ClassifyTableBuilder builder = mock(ClassifyTableBuilder.class);
getCustomizer().readCurrentAttributes(getClassifyTableId(TABLE_NAME_1), builder, ctx);
diff --git a/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/write/ClassifySessionWriterTest.java b/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/write/ClassifySessionWriterTest.java
index 84bc4d6a4..efaf58c3b 100644
--- a/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/write/ClassifySessionWriterTest.java
+++ b/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/write/ClassifySessionWriterTest.java
@@ -23,7 +23,7 @@ import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.test.write.WriterCustomizerTest;
import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.hc2vpp.vpp.classifier.context.VppClassifierContextManager;
@@ -191,7 +191,7 @@ public class ClassifySessionWriterTest extends WriterCustomizerTest {
@Test(expected = IllegalStateException.class)
public void testDeleteMisssingTable() throws WriteFailedException {
- when(writeContext.readAfter(ArgumentMatchers.any())).thenReturn(Optional.absent());
+ when(writeContext.readAfter(ArgumentMatchers.any())).thenReturn(Optional.empty());
final String match = "00:00:00:00:00:00:01:02:03:04:05:06:00:00:00:00";
final ClassifySession classifySession = generateClassifySession(SESSION_INDEX, match);
final InstanceIdentifier<ClassifySession> id = getClassifySessionId(TABLE_NAME, match);
diff --git a/vpp-common/naming-context-impl/src/main/java/io/fd/hc2vpp/common/context/ContextsReaderFactory.java b/vpp-common/naming-context-impl/src/main/java/io/fd/hc2vpp/common/context/ContextsReaderFactory.java
index 1aba6fc8b..773e770c7 100644
--- a/vpp-common/naming-context-impl/src/main/java/io/fd/hc2vpp/common/context/ContextsReaderFactory.java
+++ b/vpp-common/naming-context-impl/src/main/java/io/fd/hc2vpp/common/context/ContextsReaderFactory.java
@@ -18,8 +18,8 @@ package io.fd.hc2vpp.common.context;
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.naming.context.rev160513.Contexts;
import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.naming.context.rev160513.ContextsBuilder;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
diff --git a/vpp-common/vpp-common-integration/src/main/java/io/fd/hc2vpp/common/integration/ContextsReaderFactoryProvider.java b/vpp-common/vpp-common-integration/src/main/java/io/fd/hc2vpp/common/integration/ContextsReaderFactoryProvider.java
index 2e62e0770..a91dd9246 100644
--- a/vpp-common/vpp-common-integration/src/main/java/io/fd/hc2vpp/common/integration/ContextsReaderFactoryProvider.java
+++ b/vpp-common/vpp-common-integration/src/main/java/io/fd/hc2vpp/common/integration/ContextsReaderFactoryProvider.java
@@ -22,7 +22,7 @@ import io.fd.honeycomb.binding.init.ProviderTrait;
import io.fd.honeycomb.infra.distro.data.context.ContextPipelineModule;
import io.fd.honeycomb.translate.read.ReaderFactory;
import io.fd.hc2vpp.common.context.ContextsReaderFactory;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.mdsal.binding.api.DataBroker;
/**
* Mirror of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.context.impl.rev141210.ContextReaderModule
diff --git a/vpp-common/vpp-common-integration/src/test/java/io/fd/hc2vpp/common/integration/VppCommonModuleTest.java b/vpp-common/vpp-common-integration/src/test/java/io/fd/hc2vpp/common/integration/VppCommonModuleTest.java
index 2ca7239ec..7595cc63f 100644
--- a/vpp-common/vpp-common-integration/src/test/java/io/fd/hc2vpp/common/integration/VppCommonModuleTest.java
+++ b/vpp-common/vpp-common-integration/src/test/java/io/fd/hc2vpp/common/integration/VppCommonModuleTest.java
@@ -35,7 +35,7 @@ import java.util.HashSet;
import java.util.Set;
import org.junit.Test;
import org.mockito.Mock;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.mdsal.binding.api.DataBroker;
public class VppCommonModuleTest {
diff --git a/vpp-common/vpp-translate-test/src/main/java/io/fd/hc2vpp/common/test/util/NamingContextHelper.java b/vpp-common/vpp-translate-test/src/main/java/io/fd/hc2vpp/common/test/util/NamingContextHelper.java
index 7fb487629..f4f9790c2 100644
--- a/vpp-common/vpp-translate-test/src/main/java/io/fd/hc2vpp/common/test/util/NamingContextHelper.java
+++ b/vpp-common/vpp-translate-test/src/main/java/io/fd/hc2vpp/common/test/util/NamingContextHelper.java
@@ -18,7 +18,7 @@ package io.fd.hc2vpp.common.test.util;
import static org.mockito.Mockito.doReturn;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.collect.Lists;
import io.fd.honeycomb.translate.MappingContext;
import java.util.List;
@@ -99,7 +99,7 @@ public interface NamingContextHelper {
final List<Mapping> list = Common.getMappingList(mappingContext, iid);
doReturn(Optional.of(new MappingsBuilder().setMapping(list).build())).when(mappingContext).read(iid);
- doReturn(Optional.absent()).when(mappingContext).read(mappingIid(name, namingContextName));
+ doReturn(Optional.empty()).when(mappingContext).read(mappingIid(name, namingContextName));
}
final class Common {
diff --git a/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/AbstractInterfaceTypeCustomizer.java b/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/AbstractInterfaceTypeCustomizer.java
index 9227ddd32..cd3af7ec2 100644
--- a/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/AbstractInterfaceTypeCustomizer.java
+++ b/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/AbstractInterfaceTypeCustomizer.java
@@ -19,7 +19,7 @@ package io.fd.hc2vpp.common.translate.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.spi.write.WriterCustomizer;
import io.fd.honeycomb.translate.write.WriteContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
diff --git a/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/MultiNamingContext.java b/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/MultiNamingContext.java
index e093c661c..04fdb2818 100644
--- a/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/MultiNamingContext.java
+++ b/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/MultiNamingContext.java
@@ -19,7 +19,7 @@ package io.fd.hc2vpp.common.translate.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.Collections;
diff --git a/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/NamingContext.java b/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/NamingContext.java
index b6f50b608..bbc29b622 100644
--- a/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/NamingContext.java
+++ b/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/NamingContext.java
@@ -19,7 +19,7 @@ package io.fd.hc2vpp.common.translate.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.List;
@@ -97,7 +97,7 @@ public final class NamingContext implements AutoCloseable {
@Nonnull final MappingContext mappingContext) {
final Optional<Mappings> read = mappingContext.read(namingContextIid.child(Mappings.class));
if (!read.isPresent()) {
- return Optional.absent();
+ return Optional.empty();
}
final List<Mapping> mappings = read.get().getMapping().stream()
@@ -109,7 +109,7 @@ public final class NamingContext implements AutoCloseable {
} else if (mappings.size() == 1) {
return Optional.of(mappings.get(0).getName());
} else {
- return Optional.absent();
+ return Optional.empty();
}
}
diff --git a/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/MultiNamingContextTest.java b/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/MultiNamingContextTest.java
index d6bd15735..bedbf8e5d 100644
--- a/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/MultiNamingContextTest.java
+++ b/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/MultiNamingContextTest.java
@@ -24,7 +24,7 @@ import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.honeycomb.test.tools.HoneycombTestRunner;
import io.fd.honeycomb.test.tools.annotations.InjectTestData;
import io.fd.honeycomb.test.tools.annotations.InjectablesProcessor;
@@ -102,7 +102,7 @@ public class MultiNamingContextTest implements InjectablesProcessor {
.child(MultiNaming.class, new MultiNamingKey("context"));
when(mappingContext.read(multiNamingContextIid.child(Mappings.class))).thenReturn(Optional.of(mappings));
- when(mappingContext.read(parentKey(NON_EXISTING_PARENT))).thenReturn(Optional.absent());
+ when(mappingContext.read(parentKey(NON_EXISTING_PARENT))).thenReturn(Optional.empty());
when(mappingContext.read(parentKey(PARENT_1))).thenReturn(Optional.of(filterForParent(PARENT_1)));
when(mappingContext.read(parentKey(PARENT_2))).thenReturn(Optional.of(filterForParent(PARENT_2)));
when(mappingContext.read(parentKey(PARENT_3))).thenReturn(Optional.of(filterForParent(PARENT_3)));
diff --git a/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/NamingContextTest.java b/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/NamingContextTest.java
index 9c9b0e297..93ae8c9bd 100644
--- a/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/NamingContextTest.java
+++ b/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/NamingContextTest.java
@@ -23,7 +23,7 @@ import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.collect.Lists;
import io.fd.honeycomb.test.tools.HoneycombTestRunner;
import io.fd.honeycomb.test.tools.annotations.InjectTestData;
@@ -110,7 +110,7 @@ public class NamingContextTest implements InjectablesProcessor {
@Test
public void addNameNoMapings() throws Exception {
- when(mappingContext.read(namingContextIid.child(Mappings.class))).thenReturn(Optional.absent());
+ when(mappingContext.read(namingContextIid.child(Mappings.class))).thenReturn(Optional.empty());
namingContext.addName("name-0", mappingContext);
verify(mappingContext, times(1))
@@ -125,7 +125,7 @@ public class NamingContextTest implements InjectablesProcessor {
@Test(expected = IllegalArgumentException.class)
public void getAndThrow() {
- when(mappingContext.read(any())).thenReturn(Optional.absent());
+ when(mappingContext.read(any())).thenReturn(Optional.empty());
namingContext
.getIndex("non-existing", mappingContext, () -> new IllegalArgumentException("Non existing index"));
}
@@ -146,7 +146,7 @@ public class NamingContextTest implements InjectablesProcessor {
final Mappings mappings = new MappingsBuilder().setMapping(Lists.newArrayList(mapping1)).build();
when(mappingContext.read(namingContextIid.child(Mappings.class))).thenReturn(Optional.of(mappings));
- assertEquals(Optional.absent(), namingContext.getNameIfPresent(0, mappingContext));
+ assertEquals(Optional.empty(), namingContext.getNameIfPresent(0, mappingContext));
}
@Test
diff --git a/vpp-integration/api-docs/scripts/src/main/java/io/fd/hc2vpp/docs/core/mock/binding/MockBindingModule.java b/vpp-integration/api-docs/scripts/src/main/java/io/fd/hc2vpp/docs/core/mock/binding/MockBindingModule.java
index 5ffea516d..43d5c7ea7 100644
--- a/vpp-integration/api-docs/scripts/src/main/java/io/fd/hc2vpp/docs/core/mock/binding/MockBindingModule.java
+++ b/vpp-integration/api-docs/scripts/src/main/java/io/fd/hc2vpp/docs/core/mock/binding/MockBindingModule.java
@@ -25,7 +25,7 @@ import io.fd.jvpp.JVppRegistry;
import io.fd.jvpp.core.future.FutureJVppCore;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Proxy;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.mdsal.binding.api.DataBroker;
/**
* Use to bypass jvpp registration, and infra modules
diff --git a/vpp-management/impl/src/test/java/io/fd/hc2vpp/management/state/VppStateTest.java b/vpp-management/impl/src/test/java/io/fd/hc2vpp/management/state/VppStateTest.java
index 087efee1b..9c0bcaf4e 100644
--- a/vpp-management/impl/src/test/java/io/fd/hc2vpp/management/state/VppStateTest.java
+++ b/vpp-management/impl/src/test/java/io/fd/hc2vpp/management/state/VppStateTest.java
@@ -22,7 +22,7 @@ import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.when;
import static org.mockito.MockitoAnnotations.initMocks;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.collect.Iterables;
import com.google.common.collect.Multimap;
import io.fd.hc2vpp.common.test.util.FutureProducer;