summaryrefslogtreecommitdiffstats
path: root/nsh/impl/src/test/java/io
diff options
context:
space:
mode:
authorHongjun Ni <hongjun.ni@intel.com>2016-10-20 23:56:38 +0800
committerMaros Marsalek <mmarsale@cisco.com>2016-10-24 09:01:26 +0000
commit73da0ef102d07dc347ff72140ecd0e50523bcf26 (patch)
treefdb85c7768e98352069eb537b7d753466d72500f /nsh/impl/src/test/java/io
parentb17433b8e54489139c4cbcb91b82f375adfdf2de (diff)
Augment nsh map API with nsh_action
Depends on VPP's patch: https://gerrit.fd.io/r/#/c/3462/ Change-Id: I874cb7c5b39b9ece75d7d9af980e8d25df6f5aad Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
Diffstat (limited to 'nsh/impl/src/test/java/io')
-rw-r--r--nsh/impl/src/test/java/io/fd/honeycomb/vppnsh/impl/config/NshMapWriterCustomizerTest.java5
-rw-r--r--nsh/impl/src/test/java/io/fd/honeycomb/vppnsh/impl/oper/NshMapReaderCustomizerTest.java5
2 files changed, 10 insertions, 0 deletions
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 e15e9c6e8..30f4c488c 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
@@ -33,6 +33,9 @@ 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.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;
@@ -81,6 +84,7 @@ public class NshMapWriterCustomizerTest extends WriterCustomizerTest {
builder.setNsi((short) 255);
builder.setMappedNsp(183L);
builder.setMappedNsi((short) 254);
+ builder.setNshAction(Swap.class);
builder.setEncapType(VxlanGpe.class);
builder.setEncapIfName("vxlanGpeTun3");
@@ -107,6 +111,7 @@ public class NshMapWriterCustomizerTest extends WriterCustomizerTest {
request.isAdd = isAdd;
request.nspNsi = 184<<8 | 255;
request.mappedNspNsi = 183<<8 | 254;
+ request.nshAction = 0;
request.swIfIndex = ITF_INDEX;
request.nextNode = 2;
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 67db740aa..8e2add961 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
@@ -37,6 +37,9 @@ 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.vpp.nsh.state.NshMaps;
@@ -104,6 +107,7 @@ public class NshMapReaderCustomizerTest extends
final NshMapDetails nshMapDetails = new NshMapDetails();
nshMapDetails.nspNsi = (184<<8 | 255);
nshMapDetails.mappedNspNsi = (183<<8 | 254);
+ nshMapDetails.nshAction = 0;
nshMapDetails.swIfIndex = ITF_INDEX;
nshMapDetails.nextNode = 2;
reply.nshMapDetails = Lists.newArrayList(nshMapDetails);
@@ -120,6 +124,7 @@ public class NshMapReaderCustomizerTest extends
assertEquals(255, builder.getNsi().intValue());
assertEquals(183, builder.getMappedNsp().intValue());
assertEquals(254, builder.getMappedNsi().intValue());
+ assertEquals(Swap.class, builder.getNshAction());
assertEquals(VxlanGpe.class, builder.getEncapType());
assertEquals("vxlanGpeTun3", builder.getEncapIfName());