summaryrefslogtreecommitdiffstats
path: root/v3po
diff options
context:
space:
mode:
authorMichal Cmarada <mcmarada@cisco.com>2019-04-01 11:39:35 +0200
committerMichal Cmarada <mcmarada@cisco.com>2019-04-08 13:39:49 +0200
commitd726d0f173544c8d0078c5f918b5d086f6e85f79 (patch)
tree640e65411731b3a25abc2e7949de68dc625cf60e /v3po
parent89eeb336aebc92cd34c27b3fa325803c6478a461 (diff)
HC2VPP-406: fix build errors after ODL bump to neon
This fixes build issues after ODL bump in Honeycomb (HONEYCOMB-443). Change-Id: I3bf203dd60d12057595b15ce1ad59302dc14e2a0 Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
Diffstat (limited to 'v3po')
-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
17 files changed, 35 insertions, 35 deletions
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;