summaryrefslogtreecommitdiffstats
path: root/nsh
diff options
context:
space:
mode:
authorHongjun Ni <hongjun.ni@intel.com>2017-03-16 00:17:26 +0800
committerMarek Gradzki <mgradzki@cisco.com>2017-03-27 11:37:01 +0000
commit169ce221c4e8e2eeb24fc1f509cc440c694fa5a4 (patch)
tree9499cc2b8b883798b31005586731892d289b74e8 /nsh
parent148e3067aa22b312c0bec24b1c8c89994b311c77 (diff)
Add Yang model for NSH MD2 support
Change-Id: Idec4f8dae90ef90de538b977248bee7a078ae374 Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
Diffstat (limited to 'nsh')
-rw-r--r--nsh/api/src/main/yang/vpp-nsh.yang29
-rwxr-xr-xnsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/config/NshEntryWriterCustomizer.java54
-rwxr-xr-xnsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/config/NshMapWriterCustomizer.java18
-rwxr-xr-xnsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/config/VppNshWriterFactory.java22
-rwxr-xr-xnsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/oper/NshEntryReaderCustomizer.java73
-rwxr-xr-xnsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/oper/NshMapReaderCustomizer.java34
-rwxr-xr-xnsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/oper/VppNshReaderFactory.java16
-rw-r--r--nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/config/NshEntryWriterCustomizerTest.java16
-rw-r--r--nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/config/NshMapWriterCustomizerTest.java12
-rw-r--r--nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/oper/NshEntryReaderCustomizerTest.java16
-rw-r--r--nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/oper/NshMapReaderCustomizerTest.java14
11 files changed, 204 insertions, 100 deletions
diff --git a/nsh/api/src/main/yang/vpp-nsh.yang b/nsh/api/src/main/yang/vpp-nsh.yang
index 14ea06d6f..a379313cf 100644
--- a/nsh/api/src/main/yang/vpp-nsh.yang
+++ b/nsh/api/src/main/yang/vpp-nsh.yang
@@ -3,6 +3,11 @@ module vpp-nsh {
namespace "urn:opendaylight:params:xml:ns:yang:vpp:nsh";
prefix "vpp-nsh";
+ revision "2017-03-15" {
+ description
+ "This revision adds support for NSH-MD2 features";
+ }
+
revision "2016-12-14" {
description
"This revision adds support for NSH-Proxy and NSH-Classifier features";
@@ -165,8 +170,28 @@ module vpp-nsh {
}
grouping nsh-md-type2-attributes {
- leaf type {
- type uint32;
+ list md2-data {
+ key "md2_class type";
+
+ leaf md2_class {
+ type uint32 {
+ range "0..65535";
+ }
+ }
+ leaf type
+ {
+ type uint8;
+ }
+ leaf len
+ {
+ type uint8;
+ }
+ leaf metadata
+ {
+ type string {
+ length 1..128;
+ }
+ }
}
}
diff --git a/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/config/NshEntryWriterCustomizer.java b/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/config/NshEntryWriterCustomizer.java
index 553d946b4..122594c3d 100755
--- a/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/config/NshEntryWriterCustomizer.java
+++ b/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/config/NshEntryWriterCustomizer.java
@@ -32,17 +32,23 @@ import io.fd.vpp.jvpp.nsh.dto.NshAddDelEntryReply;
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.rev161214.Ethernet;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.Ipv4;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.Ipv6;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.MdType1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.NshMdType1Augment;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.nsh.entries.NshEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.nsh.entries.NshEntryKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.Ethernet;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.Ipv4;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.Ipv6;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.MdType1;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.MdType2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.NshMdType1Augment;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.NshMdType2Augment;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.nsh.entries.NshEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.nsh.entries.NshEntryKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.nsh.md.type2.attributes.Md2Data;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.nio.charset.StandardCharsets;
+import java.util.List;
+
/**
* Writer customizer responsible for NshEntry create/delete.
*/
@@ -117,6 +123,37 @@ public class NshEntryWriterCustomizer extends FutureJVppNshCustomizer
}
}
+ private void getNshEntryMdType2Request(@Nonnull final NshEntry entry, @Nonnull NshAddDelEntry request) {
+ final List<Md2Data> md2Datas = entry.getAugmentation(NshMdType2Augment.class).getMd2Data();
+ final byte md2_len = (byte) (entry.getLength() * 4 - 8);
+ byte cur_len = 0;
+ byte option_len = 0;
+
+ LOG.debug("wr: md2_len={}", md2_len);
+ request.tlv = new byte[md2_len];
+ for (Md2Data md2data : md2Datas) {
+ option_len = (byte) md2data.getLen().shortValue();
+ LOG.debug("wr: option_len={}", option_len);
+ if ((cur_len + option_len + 4) <= md2_len) {
+ request.tlv[cur_len] = (byte) (md2data.getMd2Class().shortValue() >> 8);
+ request.tlv[cur_len + 1] = (byte) (md2data.getMd2Class().shortValue() & 0xF);
+ request.tlv[cur_len + 2] = (byte) md2data.getType().shortValue();
+ request.tlv[cur_len + 3] = option_len;
+
+ /* convert string to hex digits */
+ LOG.debug("wr: md2data.getMetadata()={}", md2data.getMetadata());
+ int length = md2data.getMetadata().length();
+ for (int i = 0; i < length / 2; ++i)
+ {
+ request.tlv[(cur_len+4)+i] = (byte)(Integer.parseInt
+ (md2data.getMetadata().substring(i*2, i*2+2), 16) & 0xff);
+ }
+ cur_len += (option_len + 4);
+ }
+ }
+ request.tlvLength = cur_len;
+ }
+
private NshAddDelEntry getNshAddDelEntryRequest(final boolean isAdd, final int entryIndex,
@Nonnull final NshEntry entry,
@Nonnull final MappingContext ctx) {
@@ -138,8 +175,9 @@ public class NshEntryWriterCustomizer extends FutureJVppNshCustomizer
if (entry.getMdType() == MdType1.class) {
request.mdType = 1;
getNshEntryMdType1Request(entry, request);
- } else if (entry.getMdType() == MdType1.class) {
+ } else if (entry.getMdType() == MdType2.class) {
request.mdType = 2;
+ getNshEntryMdType2Request(entry, request);
} else {
request.mdType = 0;
}
diff --git a/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/config/NshMapWriterCustomizer.java b/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/config/NshMapWriterCustomizer.java
index 486655cd3..eaa1e75ee 100755
--- a/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/config/NshMapWriterCustomizer.java
+++ b/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/config/NshMapWriterCustomizer.java
@@ -32,15 +32,15 @@ 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.rev161214.Pop;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.Push;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.Swap;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.VxlanGpe;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.Vxlan4;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.Vxlan6;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.None;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.nsh.maps.NshMap;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.nsh.maps.NshMapKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.Pop;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.Push;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.Swap;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.VxlanGpe;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.Vxlan4;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.Vxlan6;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.None;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.nsh.maps.NshMap;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.nsh.maps.NshMapKey;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/config/VppNshWriterFactory.java b/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/config/VppNshWriterFactory.java
index 24601fa22..c78abb955 100755
--- a/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/config/VppNshWriterFactory.java
+++ b/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/config/VppNshWriterFactory.java
@@ -16,6 +16,7 @@
package io.fd.hc2vpp.vppnsh.impl.config;
+import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Sets;
import com.google.inject.Inject;
import com.google.inject.name.Named;
@@ -25,13 +26,15 @@ 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.rev161214.NshMdType1Augment;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.NshMdType2Augment;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.VppNsh;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.NshEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.NshMaps;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.nsh.entries.NshEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.nsh.maps.NshMap;
+
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.NshMdType1Augment;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.NshMdType2Augment;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.VppNsh;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.NshEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.NshMaps;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.nsh.entries.NshEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.nsh.md.type2.attributes.Md2Data;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.nsh.maps.NshMap;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
public class VppNshWriterFactory implements WriterFactory {
@@ -65,9 +68,10 @@ public class VppNshWriterFactory implements WriterFactory {
final InstanceIdentifier<NshEntries> nshEntriesId = InstanceIdentifier.create(VppNsh.class).child(NshEntries.class);
final InstanceIdentifier<NshEntry> nshEntryId = nshEntriesId.child(NshEntry.class);
registry.subtreeAdd(
- Sets.newHashSet(
+ ImmutableSet.of(
InstanceIdentifier.create(NshEntry.class).augmentation(NshMdType1Augment.class),
- InstanceIdentifier.create(NshEntry.class).augmentation(NshMdType2Augment.class)),
+ InstanceIdentifier.create(NshEntry.class).augmentation(NshMdType2Augment.class),
+ InstanceIdentifier.create(NshEntry.class).augmentation(NshMdType2Augment.class).child(Md2Data.class)),
new GenericListWriter<>(nshEntryId, new NshEntryWriterCustomizer(jvppNsh, nshEntryContext)));
// VppNsh has no handlers
diff --git a/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/oper/NshEntryReaderCustomizer.java b/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/oper/NshEntryReaderCustomizer.java
index 9b28f9b9b..147b9c50a 100755
--- a/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/oper/NshEntryReaderCustomizer.java
+++ b/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/oper/NshEntryReaderCustomizer.java
@@ -31,21 +31,27 @@ 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.ArrayList;
+import java.util.Arrays;
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.rev161214.Ethernet;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.Ipv4;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.Ipv6;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.MdType1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.NshMdType1StateAugment;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.NshMdType1StateAugmentBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.VppNsh;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.state.NshEntriesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.state.nsh.entries.NshEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.state.nsh.entries.NshEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.state.nsh.entries.NshEntryKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.Ethernet;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.Ipv4;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.Ipv6;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.MdType1;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.NshMdType1StateAugment;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.NshMdType1StateAugmentBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.MdType2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.NshMdType2StateAugment;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.NshMdType2StateAugmentBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.VppNsh;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.state.NshEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.state.nsh.entries.NshEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.state.nsh.entries.NshEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.state.nsh.entries.NshEntryKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.nsh.md.type2.attributes.Md2Data;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.nsh.md.type2.attributes.Md2DataBuilder;
import org.opendaylight.yangtools.concepts.Builder;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
@@ -90,6 +96,37 @@ public class NshEntryReaderCustomizer extends FutureJVppNshCustomizer
builder.addAugmentation(NshMdType1StateAugment.class, augmentBuilder.build());
}
+ private void setNshEntryMdType2Augment(@Nonnull final NshEntryBuilder builder,
+ @Nonnull NshEntryDetails nshEntryDetails) {
+ final NshMdType2StateAugmentBuilder augmentBuilder = new NshMdType2StateAugmentBuilder();
+ final byte md2_len = (nshEntryDetails.tlvLength);
+ byte cur_len = 0;
+ byte option_len = 0;
+
+ LOG.debug("rd: md2_len={}", md2_len);
+ List<Md2Data> md2Datas = new ArrayList<>();
+ while(cur_len < md2_len ) {
+ Md2DataBuilder md2DataBuilder = new Md2DataBuilder();
+ long md2_class = (long)(nshEntryDetails.tlv[cur_len] & 0xFF)
+ + (nshEntryDetails.tlv[cur_len+1] & 0xFF);
+ md2DataBuilder.setMd2Class(md2_class);
+ md2DataBuilder.setType((short)nshEntryDetails.tlv[cur_len+2]);
+ md2DataBuilder.setLen((short)nshEntryDetails.tlv[cur_len+3]);
+ option_len = nshEntryDetails.tlv[cur_len+3];
+ LOG.debug("rd: option_len={}", option_len);
+ byte[] opt_data = new byte[option_len];
+ System.arraycopy(nshEntryDetails.tlv, (cur_len+4), opt_data, 0, option_len);
+ md2DataBuilder.setMetadata(Arrays.toString(opt_data));
+ LOG.debug("rd: Arrays.toString(opt_data)={}", Arrays.toString(opt_data));
+ md2Datas.add(md2DataBuilder.build());
+
+ cur_len += (option_len + 4);
+ }
+ augmentBuilder.setMd2Data(md2Datas);
+
+ builder.addAugmentation(NshMdType2StateAugment.class, augmentBuilder.build());
+ }
+
@Override
public void readCurrentAttributes(@Nonnull final InstanceIdentifier<NshEntry> id,
@Nonnull final NshEntryBuilder builder, @Nonnull final ReadContext ctx)
@@ -110,7 +147,6 @@ public class NshEntryReaderCustomizer extends FutureJVppNshCustomizer
getFutureJVppNsh().nshEntryDump(request);
final NshEntryDetailsReplyDump reply =
getReplyForRead(nshEntryDetailsReplyDumpCompletionStage.toCompletableFuture(), id);
-
if (reply == null || reply.nshEntryDetails == null || reply.nshEntryDetails.isEmpty()) {
LOG.debug("Has no Nsh Entry {} in VPP. ", key.getName());
return;
@@ -146,7 +182,8 @@ public class NshEntryReaderCustomizer extends FutureJVppNshCustomizer
break;
}
case 2: {
- builder.setMdType(MdType1.class);
+ builder.setMdType(MdType2.class);
+ setNshEntryMdType2Augment(builder, nshEntryDetails);
break;
}
default:
@@ -199,15 +236,15 @@ public class NshEntryReaderCustomizer extends FutureJVppNshCustomizer
}
@Override
- public Initialized<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.nsh.entries.NshEntry> init(
+ public Initialized<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.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.rev161214.vpp.nsh.NshEntries.class).child(
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.nsh.entries.NshEntry.class,
- new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.nsh.entries.NshEntryKey(id.firstKeyOf(NshEntry.class).getName())),
- new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.nsh.entries.NshEntryBuilder(readValue)
+ org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.NshEntries.class).child(
+ org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.nsh.entries.NshEntry.class,
+ new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.nsh.entries.NshEntryKey(id.firstKeyOf(NshEntry.class).getName())),
+ new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.nsh.entries.NshEntryBuilder(readValue)
.setName(readValue.getName())
.build());
}
diff --git a/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/oper/NshMapReaderCustomizer.java b/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/oper/NshMapReaderCustomizer.java
index d06d1505f..e3fcad0b6 100755
--- a/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/oper/NshMapReaderCustomizer.java
+++ b/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/oper/NshMapReaderCustomizer.java
@@ -36,18 +36,18 @@ 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.rev161214.Pop;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.Push;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.Swap;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.VppNsh;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.VxlanGpe;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.Vxlan4;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.Vxlan6;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.None;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.state.NshMapsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.state.nsh.maps.NshMap;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.state.nsh.maps.NshMapBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.state.nsh.maps.NshMapKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.Pop;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.Push;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.Swap;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.VppNsh;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.VxlanGpe;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.Vxlan4;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.Vxlan6;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.None;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.state.NshMapsBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.state.nsh.maps.NshMap;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.state.nsh.maps.NshMapBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.state.nsh.maps.NshMapKey;
import org.opendaylight.yangtools.concepts.Builder;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
@@ -205,15 +205,15 @@ implements InitializingListReaderCustomizer<NshMap, NshMapKey, NshMapBuilder>, J
}
@Override
- public Initialized<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.nsh.maps.NshMap> init(
+ public Initialized<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.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.rev161214.vpp.nsh.NshMaps.class).child(
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.nsh.maps.NshMap.class,
- new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.nsh.maps.NshMapKey(id.firstKeyOf(NshMap.class).getName())),
- new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.nsh.maps.NshMapBuilder(readValue).setName(readValue.getName()).build());
+ org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.NshMaps.class).child(
+ org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.nsh.maps.NshMap.class,
+ new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.nsh.maps.NshMapKey(id.firstKeyOf(NshMap.class).getName())),
+ new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.nsh.maps.NshMapBuilder(readValue).setName(readValue.getName()).build());
}
}
diff --git a/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/oper/VppNshReaderFactory.java b/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/oper/VppNshReaderFactory.java
index e8dd35dd7..a1ab1c4a0 100755
--- a/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/oper/VppNshReaderFactory.java
+++ b/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/oper/VppNshReaderFactory.java
@@ -24,14 +24,14 @@ import io.fd.honeycomb.translate.read.registry.ModifiableReaderRegistryBuilder;
import io.fd.hc2vpp.common.translate.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.rev161214.VppNshState;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.VppNshStateBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.state.NshEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.state.NshEntriesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.state.NshMaps;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.state.NshMapsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.state.nsh.entries.NshEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.state.nsh.maps.NshMap;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.VppNshState;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.VppNshStateBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.state.NshEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.state.NshEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.state.NshMaps;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.state.NshMapsBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.state.nsh.entries.NshEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.state.nsh.maps.NshMap;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
public class VppNshReaderFactory implements ReaderFactory {
diff --git a/nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/config/NshEntryWriterCustomizerTest.java b/nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/config/NshEntryWriterCustomizerTest.java
index 5567f8b27..8b2320b76 100644
--- a/nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/config/NshEntryWriterCustomizerTest.java
+++ b/nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/config/NshEntryWriterCustomizerTest.java
@@ -31,14 +31,14 @@ 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.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.Ethernet;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.MdType1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.NshMdType1Augment;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.NshMdType1AugmentBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.NshEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.nsh.entries.NshEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.nsh.entries.NshEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.nsh.entries.NshEntryKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.Ethernet;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.MdType1;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.NshMdType1Augment;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.NshMdType1AugmentBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.NshEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.nsh.entries.NshEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.nsh.entries.NshEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.nsh.entries.NshEntryKey;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
public class NshEntryWriterCustomizerTest extends WriterCustomizerTest {
diff --git a/nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/config/NshMapWriterCustomizerTest.java b/nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/config/NshMapWriterCustomizerTest.java
index dce06e006..e46c21926 100644
--- a/nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/config/NshMapWriterCustomizerTest.java
+++ b/nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/config/NshMapWriterCustomizerTest.java
@@ -31,12 +31,12 @@ 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.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.Swap;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.VxlanGpe;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.NshMaps;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.nsh.maps.NshMap;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.nsh.maps.NshMapBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.nsh.maps.NshMapKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.Swap;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.VxlanGpe;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.NshMaps;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.nsh.maps.NshMap;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.nsh.maps.NshMapBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.nsh.maps.NshMapKey;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
public class NshMapWriterCustomizerTest extends WriterCustomizerTest {
diff --git a/nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/oper/NshEntryReaderCustomizerTest.java b/nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/oper/NshEntryReaderCustomizerTest.java
index 075767642..78f90e821 100644
--- a/nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/oper/NshEntryReaderCustomizerTest.java
+++ b/nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/oper/NshEntryReaderCustomizerTest.java
@@ -34,14 +34,14 @@ import io.fd.vpp.jvpp.nsh.future.FutureJVppNsh;
import java.util.List;
import org.junit.Test;
import org.mockito.Mock;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.Ethernet;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.MdType1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.NshMdType1StateAugment;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.state.NshEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.state.NshEntriesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.state.nsh.entries.NshEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.state.nsh.entries.NshEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.state.nsh.entries.NshEntryKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.Ethernet;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.MdType1;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.NshMdType1StateAugment;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.state.NshEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.state.NshEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.state.nsh.entries.NshEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.state.nsh.entries.NshEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.state.nsh.entries.NshEntryKey;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
diff --git a/nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/oper/NshMapReaderCustomizerTest.java b/nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/oper/NshMapReaderCustomizerTest.java
index 67565adc0..215d69bf5 100644
--- a/nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/oper/NshMapReaderCustomizerTest.java
+++ b/nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/oper/NshMapReaderCustomizerTest.java
@@ -34,13 +34,13 @@ import io.fd.vpp.jvpp.nsh.future.FutureJVppNsh;
import java.util.List;
import org.junit.Test;
import org.mockito.Mock;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.Swap;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.VxlanGpe;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.state.NshMaps;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.state.NshMapsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.state.nsh.maps.NshMap;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.state.nsh.maps.NshMapBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev161214.vpp.nsh.state.nsh.maps.NshMapKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.Swap;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.VxlanGpe;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.state.NshMaps;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.state.NshMapsBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.state.nsh.maps.NshMap;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.state.nsh.maps.NshMapBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.state.nsh.maps.NshMapKey;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;