diff options
Diffstat (limited to 'nsh/impl')
14 files changed, 81 insertions, 273 deletions
diff --git a/nsh/impl/src/main/java/io/fd/honeycomb/vppnsh/impl/VppNshModule.java b/nsh/impl/src/main/java/io/fd/honeycomb/vppnsh/impl/VppNshModule.java index cd21e0e76..90c826dc7 100755 --- a/nsh/impl/src/main/java/io/fd/honeycomb/vppnsh/impl/VppNshModule.java +++ b/nsh/impl/src/main/java/io/fd/honeycomb/vppnsh/impl/VppNshModule.java @@ -18,16 +18,14 @@ package io.fd.honeycomb.vppnsh.impl; import com.google.common.annotations.VisibleForTesting; import com.google.inject.AbstractModule; +import com.google.inject.Provider; import com.google.inject.Singleton; import com.google.inject.multibindings.Multibinder; import com.google.inject.name.Names; -import com.google.inject.Provider; -import io.fd.honeycomb.data.init.DataTreeInitializer; import io.fd.honeycomb.translate.read.ReaderFactory; import io.fd.honeycomb.translate.vpp.util.NamingContext; import io.fd.honeycomb.translate.write.WriterFactory; import io.fd.honeycomb.vppnsh.impl.config.VppNshWriterFactory; -import io.fd.honeycomb.vppnsh.impl.init.VppNshInitializer; import io.fd.honeycomb.vppnsh.impl.oper.VppNshReaderFactory; import io.fd.honeycomb.vppnsh.impl.util.JVppNshProvider; import io.fd.vpp.jvpp.nsh.future.FutureJVppNsh; @@ -70,7 +68,6 @@ public final class VppNshModule extends AbstractModule { // Below are classes picked up by HC framework Multibinder.newSetBinder(binder(), WriterFactory.class).addBinding().to(VppNshWriterFactory.class); Multibinder.newSetBinder(binder(), ReaderFactory.class).addBinding().to(VppNshReaderFactory.class); - Multibinder.newSetBinder(binder(), DataTreeInitializer.class).addBinding().to(VppNshInitializer.class); LOG.info("Module NSH successfully configured"); } } diff --git a/nsh/impl/src/main/java/io/fd/honeycomb/vppnsh/impl/config/NshMapWriterCustomizer.java b/nsh/impl/src/main/java/io/fd/honeycomb/vppnsh/impl/config/NshMapWriterCustomizer.java index c272e0e34..701475936 100755 --- a/nsh/impl/src/main/java/io/fd/honeycomb/vppnsh/impl/config/NshMapWriterCustomizer.java +++ b/nsh/impl/src/main/java/io/fd/honeycomb/vppnsh/impl/config/NshMapWriterCustomizer.java @@ -32,10 +32,10 @@ import io.fd.vpp.jvpp.nsh.dto.NshAddDelMapReply; import io.fd.vpp.jvpp.nsh.future.FutureJVppNsh; import java.util.concurrent.CompletionStage; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.VxlanGpe; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.Swap; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.Push; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.Pop; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.Push; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.Swap; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.VxlanGpe; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.nsh.maps.NshMap; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.nsh.maps.NshMapKey; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; diff --git a/nsh/impl/src/main/java/io/fd/honeycomb/vppnsh/impl/config/VppNshWriterFactory.java b/nsh/impl/src/main/java/io/fd/honeycomb/vppnsh/impl/config/VppNshWriterFactory.java index 26c681101..61c442e18 100755 --- a/nsh/impl/src/main/java/io/fd/honeycomb/vppnsh/impl/config/VppNshWriterFactory.java +++ b/nsh/impl/src/main/java/io/fd/honeycomb/vppnsh/impl/config/VppNshWriterFactory.java @@ -23,16 +23,16 @@ import io.fd.honeycomb.translate.impl.write.GenericListWriter; import io.fd.honeycomb.translate.vpp.util.NamingContext; import io.fd.honeycomb.translate.write.WriterFactory; import io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder; +import io.fd.vpp.jvpp.nsh.future.FutureJVppNsh; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.VppNsh; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.NshMdType1Augment; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.NshMdType2Augment; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.VppNsh; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.NshEntries; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.nsh.entries.NshEntry; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.NshMaps; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.nsh.entries.NshEntry; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.nsh.maps.NshMap; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import io.fd.vpp.jvpp.nsh.future.FutureJVppNsh; public class VppNshWriterFactory implements WriterFactory { diff --git a/nsh/impl/src/main/java/io/fd/honeycomb/vppnsh/impl/init/VppNshInitializer.java b/nsh/impl/src/main/java/io/fd/honeycomb/vppnsh/impl/init/VppNshInitializer.java deleted file mode 100755 index ca13d8a19..000000000 --- a/nsh/impl/src/main/java/io/fd/honeycomb/vppnsh/impl/init/VppNshInitializer.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2016 Intel and/or its affiliates. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.fd.honeycomb.vppnsh.impl.init; - -import com.google.inject.Inject; -import com.google.inject.name.Named; -import io.fd.honeycomb.data.init.AbstractDataTreeConverter; -import java.util.stream.Collectors; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import org.opendaylight.controller.md.sal.binding.api.DataBroker; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.VppNsh; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.VppNshBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.VppNshState; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.NshEntries; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.NshEntriesBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.NshMaps; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.NshMapsBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.nsh.entries.NshEntry; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.nsh.entries.NshEntryBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.nsh.maps.NshMap; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.nsh.maps.NshMapBuilder; -import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * This is an initializer for VppNsh plugin. Its main goal is to revers-engineer configuration data (config "true") - * for Nsh model from operational data. In this case, we are trying to recreate Nsh container from NshsState - * container. Thanks to symmetrical nature of the model, it's pretty straightforward. - * - * This is very useful when the lower layer already contains some data that should be revers-engineer to config data - * in honeycomb in order to get HC and lower layer to sync... It makes life of upper layers much easier - * - * However it's not always possible to perform this task so the initializers are optional for plugins - */ -public class VppNshInitializer extends AbstractDataTreeConverter<VppNshState, VppNsh> { - - private static final Logger LOG = LoggerFactory.getLogger(VppNshInitializer.class); - private static final InstanceIdentifier<VppNshState> OPER_ID = InstanceIdentifier.create(VppNshState.class); - private static final InstanceIdentifier<VppNsh> CFG_ID = InstanceIdentifier.create(VppNsh.class); - - @Inject - public VppNshInitializer(@Named("honeycomb-initializer") final DataBroker bindingDataBroker) { - super(bindingDataBroker, OPER_ID, CFG_ID); - } - - @Override - protected VppNsh convert(final VppNshState operationalData) { - // Just convert operational data into config data - // The operational data are queried from lower layer using readerCustomizers from this plugin - - LOG.info("Initializing VppNsh config data from: {}", operationalData); - - VppNshBuilder vppNshBuilder = new VppNshBuilder(); - - NshEntriesBuilder nshEntriesBuilder = new NshEntriesBuilder() - .setNshEntry(operationalData.getNshEntries().getNshEntry().stream() - .map(oper -> new NshEntryBuilder(oper).setName(oper.getName()).build()) - .collect(Collectors.toList())); - vppNshBuilder.setNshEntries(nshEntriesBuilder.build()); - - NshMapsBuilder nshMapsBuilder = new NshMapsBuilder() - .setNshMap(operationalData.getNshMaps().getNshMap().stream() - .map(oper -> new NshMapBuilder(oper).setName(oper.getName()).build()) - .collect(Collectors.toList())); - vppNshBuilder.setNshMaps(nshMapsBuilder.build()); - - return vppNshBuilder.build(); - } -} diff --git a/nsh/impl/src/main/java/io/fd/honeycomb/vppnsh/impl/oper/NshEntryReaderCustomizer.java b/nsh/impl/src/main/java/io/fd/honeycomb/vppnsh/impl/oper/NshEntryReaderCustomizer.java index 186db26ff..066fb103d 100755 --- a/nsh/impl/src/main/java/io/fd/honeycomb/vppnsh/impl/oper/NshEntryReaderCustomizer.java +++ b/nsh/impl/src/main/java/io/fd/honeycomb/vppnsh/impl/oper/NshEntryReaderCustomizer.java @@ -21,7 +21,8 @@ import static com.google.common.base.Preconditions.checkNotNull; import io.fd.honeycomb.translate.read.ReadContext; import io.fd.honeycomb.translate.read.ReadFailedException; -import io.fd.honeycomb.translate.spi.read.ListReaderCustomizer; +import io.fd.honeycomb.translate.spi.read.Initialized; +import io.fd.honeycomb.translate.spi.read.InitializingListReaderCustomizer; import io.fd.honeycomb.translate.vpp.util.JvppReplyConsumer; import io.fd.honeycomb.translate.vpp.util.NamingContext; import io.fd.honeycomb.vppnsh.impl.util.FutureJVppNshCustomizer; @@ -40,6 +41,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh. import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.MdType1; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.NshMdType1StateAugment; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.NshMdType1StateAugmentBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.VppNsh; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.NshEntriesBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.nsh.entries.NshEntry; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.nsh.entries.NshEntryBuilder; @@ -54,7 +56,7 @@ import org.slf4j.LoggerFactory; * Reader customizer responsible for nsh entry read.<br> to VPP. */ public class NshEntryReaderCustomizer extends FutureJVppNshCustomizer - implements ListReaderCustomizer<NshEntry, NshEntryKey, NshEntryBuilder>, JvppReplyConsumer { + implements InitializingListReaderCustomizer<NshEntry, NshEntryKey, NshEntryBuilder>, JvppReplyConsumer { private static final Logger LOG = LoggerFactory.getLogger(NshEntryReaderCustomizer.class); private final NamingContext nshEntryContext; @@ -65,7 +67,6 @@ public class NshEntryReaderCustomizer extends FutureJVppNshCustomizer this.nshEntryContext = checkNotNull(nshEntryContext, "nshEntryContext should not be null"); } - @Override public void merge(@Nonnull final Builder<? extends DataObject> builder, @Nonnull final List<NshEntry> readData) { @@ -196,4 +197,18 @@ public class NshEntryReaderCustomizer extends FutureJVppNshCustomizer return allIds; } + + @Override + public Initialized<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.nsh.entries.NshEntry> init( + @Nonnull final InstanceIdentifier<NshEntry> id, @Nonnull final NshEntry readValue, + @Nonnull final ReadContext ctx) { + return Initialized.create( + InstanceIdentifier.create(VppNsh.class).child( + org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.NshEntries.class).child( + org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.nsh.entries.NshEntry.class, + new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.nsh.entries.NshEntryKey(id.firstKeyOf(NshEntry.class).getName())), + new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.nsh.entries.NshEntryBuilder(readValue) + .setName(readValue.getName()) + .build()); + } } diff --git a/nsh/impl/src/main/java/io/fd/honeycomb/vppnsh/impl/oper/NshMapReaderCustomizer.java b/nsh/impl/src/main/java/io/fd/honeycomb/vppnsh/impl/oper/NshMapReaderCustomizer.java index 8e9b7793b..75ff21f27 100755 --- a/nsh/impl/src/main/java/io/fd/honeycomb/vppnsh/impl/oper/NshMapReaderCustomizer.java +++ b/nsh/impl/src/main/java/io/fd/honeycomb/vppnsh/impl/oper/NshMapReaderCustomizer.java @@ -22,7 +22,8 @@ import static com.google.common.base.Preconditions.checkState; import io.fd.honeycomb.translate.read.ReadContext; import io.fd.honeycomb.translate.read.ReadFailedException; -import io.fd.honeycomb.translate.spi.read.ListReaderCustomizer; +import io.fd.honeycomb.translate.spi.read.Initialized; +import io.fd.honeycomb.translate.spi.read.InitializingListReaderCustomizer; import io.fd.honeycomb.translate.vpp.util.JvppReplyConsumer; import io.fd.honeycomb.translate.vpp.util.NamingContext; import io.fd.honeycomb.vppnsh.impl.util.FutureJVppNshCustomizer; @@ -35,10 +36,11 @@ import java.util.Collections; import java.util.List; import java.util.concurrent.CompletionStage; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.VxlanGpe; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.Swap; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.Push; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.Pop; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.Push; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.Swap; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.VppNsh; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.VxlanGpe; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.NshMapsBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.nsh.maps.NshMap; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.nsh.maps.NshMapBuilder; @@ -53,7 +55,7 @@ import org.slf4j.LoggerFactory; * Reader customizer responsible for nsh map read.<br> to VPP. */ public class NshMapReaderCustomizer extends FutureJVppNshCustomizer - implements ListReaderCustomizer<NshMap, NshMapKey, NshMapBuilder>, JvppReplyConsumer { + implements InitializingListReaderCustomizer<NshMap, NshMapKey, NshMapBuilder>, JvppReplyConsumer { private static final Logger LOG = LoggerFactory.getLogger(NshMapReaderCustomizer.class); private final NamingContext nshMapContext; @@ -187,4 +189,17 @@ public class NshMapReaderCustomizer extends FutureJVppNshCustomizer return allIds; } + + @Override + public Initialized<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.nsh.maps.NshMap> init( + @Nonnull final InstanceIdentifier<NshMap> id, + @Nonnull final NshMap readValue, + @Nonnull final ReadContext ctx) { + return Initialized.create( + InstanceIdentifier.create(VppNsh.class).child( + org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.NshMaps.class).child( + org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.nsh.maps.NshMap.class, + new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.nsh.maps.NshMapKey(id.firstKeyOf(NshMap.class).getName())), + new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.nsh.maps.NshMapBuilder(readValue).setName(readValue.getName()).build()); + } } diff --git a/nsh/impl/src/main/java/io/fd/honeycomb/vppnsh/impl/oper/VppNshReaderFactory.java b/nsh/impl/src/main/java/io/fd/honeycomb/vppnsh/impl/oper/VppNshReaderFactory.java index e4d459333..5eb54669a 100755 --- a/nsh/impl/src/main/java/io/fd/honeycomb/vppnsh/impl/oper/VppNshReaderFactory.java +++ b/nsh/impl/src/main/java/io/fd/honeycomb/vppnsh/impl/oper/VppNshReaderFactory.java @@ -18,21 +18,20 @@ package io.fd.honeycomb.vppnsh.impl.oper; import com.google.inject.Inject; import com.google.inject.name.Named; -import io.fd.honeycomb.translate.impl.read.GenericListReader; -import io.fd.honeycomb.translate.vpp.util.NamingContext; +import io.fd.honeycomb.translate.impl.read.GenericInitListReader; import io.fd.honeycomb.translate.read.ReaderFactory; import io.fd.honeycomb.translate.read.registry.ModifiableReaderRegistryBuilder; +import io.fd.honeycomb.translate.vpp.util.NamingContext; +import io.fd.vpp.jvpp.nsh.future.FutureJVppNsh; import javax.annotation.Nonnull; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.VppNshState; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.VppNshStateBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.NshEntries; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.NshEntriesBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.nsh.entries.NshEntry; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.NshMaps; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.NshMapsBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.nsh.entries.NshEntry; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.nsh.maps.NshMap; - -import io.fd.vpp.jvpp.nsh.future.FutureJVppNsh; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; public class VppNshReaderFactory implements ReaderFactory { @@ -67,13 +66,13 @@ public class VppNshReaderFactory implements ReaderFactory { registry.addStructuralReader(nshEntriesId, NshEntriesBuilder.class); // NshENtry final InstanceIdentifier<NshEntry> nshEntryId = nshEntriesId.child(NshEntry.class); - registry.add(new GenericListReader<>(nshEntryId, new NshEntryReaderCustomizer(jvppNsh, nshEntryContext))); + registry.add(new GenericInitListReader<>(nshEntryId, new NshEntryReaderCustomizer(jvppNsh, nshEntryContext))); // NshMaps(Structural) final InstanceIdentifier<NshMaps> nshMapsId = vppNshStateId.child(NshMaps.class); registry.addStructuralReader(nshMapsId, NshMapsBuilder.class); // NshMap final InstanceIdentifier<NshMap> nshMapId = nshMapsId.child(NshMap.class); - registry.add(new GenericListReader<>(nshMapId, new NshMapReaderCustomizer(jvppNsh, nshMapContext, interfaceContext))); + registry.add(new GenericInitListReader<>(nshMapId, new NshMapReaderCustomizer(jvppNsh, nshMapContext, interfaceContext))); } } diff --git a/nsh/impl/src/main/java/io/fd/honeycomb/vppnsh/impl/util/JVppNshProvider.java b/nsh/impl/src/main/java/io/fd/honeycomb/vppnsh/impl/util/JVppNshProvider.java index 56f73dedf..6778bae2a 100755 --- a/nsh/impl/src/main/java/io/fd/honeycomb/vppnsh/impl/util/JVppNshProvider.java +++ b/nsh/impl/src/main/java/io/fd/honeycomb/vppnsh/impl/util/JVppNshProvider.java @@ -17,13 +17,11 @@ package io.fd.honeycomb.vppnsh.impl.util; import com.google.inject.Inject; -import com.google.inject.Provider; import io.fd.honeycomb.infra.distro.ProviderTrait; -import java.io.IOException; import io.fd.vpp.jvpp.JVppRegistry; -import io.fd.vpp.jvpp.nsh.future.FutureJVppNsh; -import io.fd.vpp.jvpp.nsh.future.FutureJVppNshFacade; import io.fd.vpp.jvpp.nsh.JVppNshImpl; +import io.fd.vpp.jvpp.nsh.future.FutureJVppNshFacade; +import java.io.IOException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/nsh/impl/src/test/java/io/fd/honeycomb/vppnsh/impl/VppNshModuleTest.java b/nsh/impl/src/test/java/io/fd/honeycomb/vppnsh/impl/VppNshModuleTest.java index a07f1c8c9..211757474 100644 --- a/nsh/impl/src/test/java/io/fd/honeycomb/vppnsh/impl/VppNshModuleTest.java +++ b/nsh/impl/src/test/java/io/fd/honeycomb/vppnsh/impl/VppNshModuleTest.java @@ -27,7 +27,6 @@ import static org.mockito.MockitoAnnotations.initMocks; import com.google.inject.Guice; import com.google.inject.Inject; import com.google.inject.Provider; -import com.google.inject.multibindings.Multibinder; import com.google.inject.name.Named; import com.google.inject.testing.fieldbinder.Bind; import com.google.inject.testing.fieldbinder.BoundFieldModule; @@ -36,30 +35,14 @@ import io.fd.honeycomb.translate.util.read.registry.CompositeReaderRegistryBuild import io.fd.honeycomb.translate.util.write.registry.FlatWriterRegistryBuilder; import io.fd.honeycomb.translate.vpp.util.NamingContext; import io.fd.honeycomb.translate.write.WriterFactory; +import io.fd.vpp.jvpp.JVppRegistry; +import io.fd.vpp.jvpp.nsh.future.FutureJVppNshFacade; import java.util.HashSet; 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.yangtools.yang.binding.InstanceIdentifier; - -import io.fd.honeycomb.vppnsh.impl.config.VppNshWriterFactory; -import io.fd.honeycomb.vppnsh.impl.init.VppNshInitializer; -import io.fd.honeycomb.vppnsh.impl.oper.VppNshReaderFactory; -import io.fd.honeycomb.vppnsh.impl.util.JVppNshProvider; -import io.fd.vpp.jvpp.nsh.future.FutureJVppNsh; -import io.fd.vpp.jvpp.nsh.future.FutureJVppNshFacade; -import io.fd.vpp.jvpp.JVppRegistry; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.VppNshState; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.VppNshStateBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.NshEntries; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.NshEntriesBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.nsh.entries.NshEntry; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.NshMaps; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.NshMapsBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.nsh.maps.NshMap; - public class VppNshModuleTest { diff --git a/nsh/impl/src/test/java/io/fd/honeycomb/vppnsh/impl/config/NshEntryWriterCustomizerTest.java b/nsh/impl/src/test/java/io/fd/honeycomb/vppnsh/impl/config/NshEntryWriterCustomizerTest.java index ef0fa111a..23f861073 100644 --- a/nsh/impl/src/test/java/io/fd/honeycomb/vppnsh/impl/config/NshEntryWriterCustomizerTest.java +++ b/nsh/impl/src/test/java/io/fd/honeycomb/vppnsh/impl/config/NshEntryWriterCustomizerTest.java @@ -20,20 +20,18 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.mockito.Matchers.any; import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; import io.fd.honeycomb.translate.vpp.util.NamingContext; import io.fd.honeycomb.translate.write.WriteFailedException; import io.fd.honeycomb.vpp.test.write.WriterCustomizerTest; +import io.fd.vpp.jvpp.VppBaseCallException; +import io.fd.vpp.jvpp.nsh.dto.NshAddDelEntry; +import io.fd.vpp.jvpp.nsh.dto.NshAddDelEntryReply; +import io.fd.vpp.jvpp.nsh.future.FutureJVppNsh; import org.junit.Test; import org.mockito.Mock; -import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; - import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.Ethernet; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.Ipv4; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.Ipv6; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.MdType1; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.NshMdType1Augment; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.NshMdType1AugmentBuilder; @@ -41,11 +39,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh. import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.nsh.entries.NshEntry; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.nsh.entries.NshEntryBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.nsh.entries.NshEntryKey; - -import io.fd.vpp.jvpp.VppBaseCallException; -import io.fd.vpp.jvpp.nsh.dto.NshAddDelEntry; -import io.fd.vpp.jvpp.nsh.dto.NshAddDelEntryReply; -import io.fd.vpp.jvpp.nsh.future.FutureJVppNsh; +import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; public class NshEntryWriterCustomizerTest extends WriterCustomizerTest { diff --git a/nsh/impl/src/test/java/io/fd/honeycomb/vppnsh/impl/config/NshMapWriterCustomizerTest.java b/nsh/impl/src/test/java/io/fd/honeycomb/vppnsh/impl/config/NshMapWriterCustomizerTest.java index 30f4c488c..39297d427 100644 --- a/nsh/impl/src/test/java/io/fd/honeycomb/vppnsh/impl/config/NshMapWriterCustomizerTest.java +++ b/nsh/impl/src/test/java/io/fd/honeycomb/vppnsh/impl/config/NshMapWriterCustomizerTest.java @@ -20,32 +20,24 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.mockito.Matchers.any; import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; import io.fd.honeycomb.translate.vpp.util.NamingContext; import io.fd.honeycomb.translate.write.WriteFailedException; import io.fd.honeycomb.vpp.test.write.WriterCustomizerTest; +import io.fd.vpp.jvpp.VppBaseCallException; +import io.fd.vpp.jvpp.nsh.dto.NshAddDelMap; +import io.fd.vpp.jvpp.nsh.dto.NshAddDelMapReply; +import io.fd.vpp.jvpp.nsh.future.FutureJVppNsh; import org.junit.Test; import org.mockito.Mock; -import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import io.fd.honeycomb.translate.MappingContext; - -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.VxlanGpe; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.Swap; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.Push; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.Pop; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.VxlanGpe; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.NshMaps; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.NshMapsBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.nsh.maps.NshMap; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.nsh.maps.NshMapBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.nsh.maps.NshMapKey; - -import io.fd.vpp.jvpp.VppBaseCallException; -import io.fd.vpp.jvpp.nsh.dto.NshAddDelMap; -import io.fd.vpp.jvpp.nsh.dto.NshAddDelMapReply; -import io.fd.vpp.jvpp.nsh.future.FutureJVppNsh; +import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; public class NshMapWriterCustomizerTest extends WriterCustomizerTest { diff --git a/nsh/impl/src/test/java/io/fd/honeycomb/vppnsh/impl/init/VppNshInitializerTest.java b/nsh/impl/src/test/java/io/fd/honeycomb/vppnsh/impl/init/VppNshInitializerTest.java deleted file mode 100644 index 18b799cc5..000000000 --- a/nsh/impl/src/test/java/io/fd/honeycomb/vppnsh/impl/init/VppNshInitializerTest.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2016 Intel and/or its affiliates. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.fd.honeycomb.vppnsh.impl.init; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.mockito.Mockito.mock; - -import com.google.common.collect.Lists; -import java.util.stream.Collectors; - -import org.junit.Test; -import org.opendaylight.controller.md.sal.binding.api.DataBroker; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.VppNsh; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.VppNshBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.VppNshState; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.VppNshStateBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.NshEntries; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.NshEntriesBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.nsh.entries.NshEntry; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.nsh.entries.NshEntryBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.NshMaps; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.NshMapsBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.nsh.maps.NshMap; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.nsh.maps.NshMapBuilder; - - -public class VppNshInitializerTest { - @Test - public void convert() throws Exception { - - final VppNshInitializer initializer = new VppNshInitializer(mock(DataBroker.class)); - - - /* mock VppNsh operational data */ - final VppNshStateBuilder stateBuilder = new VppNshStateBuilder(); - - NshEntriesBuilder nshEntriesBuilder = new NshEntriesBuilder() - .setNshEntry(Lists.newArrayList()); - stateBuilder.setNshEntries(nshEntriesBuilder.build()); - - NshMapsBuilder nshMapsBuilder = new NshMapsBuilder() - .setNshMap(Lists.newArrayList()); - stateBuilder.setNshMaps(nshMapsBuilder.build()); - - final VppNshState state = stateBuilder.build(); - - /* Convert operational data to config data */ - final VppNsh config = initializer.convert(state); - - /* vefify the config data */ - assertNotNull(config); - assertNotNull(config.getNshEntries()); - assertNotNull(config.getNshMaps()); - } - -} diff --git a/nsh/impl/src/test/java/io/fd/honeycomb/vppnsh/impl/oper/NshEntryReaderCustomizerTest.java b/nsh/impl/src/test/java/io/fd/honeycomb/vppnsh/impl/oper/NshEntryReaderCustomizerTest.java index 804346f75..2921d07dd 100644 --- a/nsh/impl/src/test/java/io/fd/honeycomb/vppnsh/impl/oper/NshEntryReaderCustomizerTest.java +++ b/nsh/impl/src/test/java/io/fd/honeycomb/vppnsh/impl/oper/NshEntryReaderCustomizerTest.java @@ -18,43 +18,31 @@ package io.fd.honeycomb.vppnsh.impl.oper; import static org.junit.Assert.assertEquals; import static org.mockito.Matchers.any; -import static org.mockito.Matchers.anyString; import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; -import com.google.common.base.Optional; import com.google.common.collect.Lists; import io.fd.honeycomb.translate.read.ReadFailedException; import io.fd.honeycomb.translate.spi.read.ReaderCustomizer; +import io.fd.honeycomb.translate.vpp.util.NamingContext; import io.fd.honeycomb.vpp.test.read.ListReaderCustomizerTest; +import io.fd.vpp.jvpp.VppBaseCallException; +import io.fd.vpp.jvpp.nsh.dto.NshEntryDetails; +import io.fd.vpp.jvpp.nsh.dto.NshEntryDetailsReplyDump; +import io.fd.vpp.jvpp.nsh.dto.NshEntryDump; +import io.fd.vpp.jvpp.nsh.future.FutureJVppNsh; import java.util.List; import org.junit.Test; import org.mockito.Mock; - -import io.fd.honeycomb.translate.vpp.util.NamingContext; -import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.Ethernet; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.Ipv4; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.Ipv6; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.MdType1; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.NshMdType1StateAugment; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.NshMdType1StateAugmentBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.VppNshState; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.VppNshStateBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.NshEntries; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.NshEntriesBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.nsh.entries.NshEntry; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.nsh.entries.NshEntryBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.nsh.entries.NshEntryKey; - -import io.fd.vpp.jvpp.VppBaseCallException; -import io.fd.vpp.jvpp.nsh.dto.NshEntryDetails; -import io.fd.vpp.jvpp.nsh.dto.NshEntryDetailsReplyDump; -import io.fd.vpp.jvpp.nsh.dto.NshEntryDump; -import io.fd.vpp.jvpp.nsh.future.FutureJVppNsh; +import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; public class NshEntryReaderCustomizerTest extends diff --git a/nsh/impl/src/test/java/io/fd/honeycomb/vppnsh/impl/oper/NshMapReaderCustomizerTest.java b/nsh/impl/src/test/java/io/fd/honeycomb/vppnsh/impl/oper/NshMapReaderCustomizerTest.java index 8e2add961..868f851a3 100644 --- a/nsh/impl/src/test/java/io/fd/honeycomb/vppnsh/impl/oper/NshMapReaderCustomizerTest.java +++ b/nsh/impl/src/test/java/io/fd/honeycomb/vppnsh/impl/oper/NshMapReaderCustomizerTest.java @@ -18,45 +18,30 @@ package io.fd.honeycomb.vppnsh.impl.oper; import static org.junit.Assert.assertEquals; import static org.mockito.Matchers.any; -import static org.mockito.Matchers.anyString; import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; -import com.google.common.base.Optional; import com.google.common.collect.Lists; import io.fd.honeycomb.translate.read.ReadFailedException; import io.fd.honeycomb.translate.spi.read.ReaderCustomizer; +import io.fd.honeycomb.translate.vpp.util.NamingContext; import io.fd.honeycomb.vpp.test.read.ListReaderCustomizerTest; +import io.fd.vpp.jvpp.VppBaseCallException; +import io.fd.vpp.jvpp.nsh.dto.NshMapDetails; +import io.fd.vpp.jvpp.nsh.dto.NshMapDetailsReplyDump; +import io.fd.vpp.jvpp.nsh.dto.NshMapDump; +import io.fd.vpp.jvpp.nsh.future.FutureJVppNsh; import java.util.List; import org.junit.Test; import org.mockito.Mock; - -import io.fd.honeycomb.translate.vpp.util.NamingContext; -import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.VxlanGpe; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.Swap; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.Push; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.Pop; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.VppNshState; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.VppNshStateBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.VxlanGpe; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.NshMaps; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.NshMapsBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.nsh.entries.NshEntryKey; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.nsh.maps.NshMap; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.nsh.maps.NshMapBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.nsh.maps.NshMapKey; - -import io.fd.vpp.jvpp.VppBaseCallException; -import io.fd.vpp.jvpp.nsh.dto.NshEntryDetails; -import io.fd.vpp.jvpp.nsh.dto.NshEntryDetailsReplyDump; -import io.fd.vpp.jvpp.nsh.dto.NshEntryDump; -import io.fd.vpp.jvpp.nsh.dto.NshMapDetails; -import io.fd.vpp.jvpp.nsh.dto.NshMapDetailsReplyDump; -import io.fd.vpp.jvpp.nsh.dto.NshMapDump; -import io.fd.vpp.jvpp.nsh.future.FutureJVppNsh; +import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; public class NshMapReaderCustomizerTest extends |