summaryrefslogtreecommitdiffstats
path: root/v3po/v3po2vpp/src/test
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2016-05-16 14:51:53 +0200
committerMarek Gradzki <mgradzki@cisco.com>2016-05-18 08:02:33 +0200
commitc068b27764b2d8f3f4a0023da12d93b8ebe0b176 (patch)
tree5ab8c70ceb96254b8375c6873e981db5563cdcf3 /v3po/v3po2vpp/src/test
parent02b2183a113214039611373f84352da4a5f57e2c (diff)
Fix interface dump caching
Change-Id: I18d29bebf754c34bbc05e5c9cfb78d8aba87c205 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'v3po/v3po2vpp/src/test')
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/InterfaceUtilsTest.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/InterfaceUtilsTest.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/InterfaceUtilsTest.java
index ff6ed3dde..0a0eff03b 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/InterfaceUtilsTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/InterfaceUtilsTest.java
@@ -19,6 +19,10 @@ package io.fd.honeycomb.v3po.translate.v3po.interfacesstate;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.iana._if.type.rev140508.EthernetCsmacd;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.Tap;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VhostUser;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VxlanTunnel;
public class InterfaceUtilsTest {
@@ -37,4 +41,12 @@ public class InterfaceUtilsTest {
public void testVppPhysAddrToYangInvalidByteArrayLength() throws Exception {
InterfaceUtils.vppPhysAddrToYang(new byte[]{1, 2, 3, 4, 5});
}
+
+ @Test
+ public void testGetInterfaceType() {
+ assertEquals(Tap.class, InterfaceUtils.getInterfaceType("tap0"));
+ assertEquals(VxlanTunnel.class, InterfaceUtils.getInterfaceType("vxlan0"));
+ assertEquals(VhostUser.class, InterfaceUtils.getInterfaceType("VirtualEthernet0/0/0"));
+ assertEquals(EthernetCsmacd.class, InterfaceUtils.getInterfaceType("local0"));
+ }
} \ No newline at end of file