summaryrefslogtreecommitdiffstats
path: root/vpp-common
diff options
context:
space:
mode:
Diffstat (limited to 'vpp-common')
-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
9 files changed, 17 insertions, 17 deletions
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