diff options
author | Marek Gradzki <mgradzki@cisco.com> | 2016-05-16 14:51:53 +0200 |
---|---|---|
committer | Marek Gradzki <mgradzki@cisco.com> | 2016-05-18 08:02:33 +0200 |
commit | 2a810b8e6fe88ceef3ef781bfddef79829834b45 (patch) | |
tree | 8a9ce8b0cacb7845e37e9b102b6e5cac6814d764 /v3po/v3po2vpp/src/test/java | |
parent | b613264e15f74cd594fb5cf02f0b602825b4936e (diff) |
Fix interface dump caching
Change-Id: I18d29bebf754c34bbc05e5c9cfb78d8aba87c205
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'v3po/v3po2vpp/src/test/java')
-rw-r--r-- | v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/InterfaceUtilsTest.java | 12 |
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 |