diff options
author | Marek Gradzki <mgradzki@cisco.com> | 2017-11-06 10:59:52 +0100 |
---|---|---|
committer | Marek Gradzki <mgradzki@cisco.com> | 2017-11-07 09:09:03 +0000 |
commit | 472f13d6bf3f681d4ba575baa0bc03583d1d6f20 (patch) | |
tree | d135a325d8fe559e1fed7de5047108b66bc0dbad /v3po/v3po2vpp/src/test | |
parent | baee9a73ebcf4db04d80f454094496a24595e142 (diff) |
Fix operational read for interface's MAC address
Hc2vpp supports 48-bit addresses.
VPP returns 64-bits, so ignore extended part.
This patch updates MAC address handling broken by
https://gerrit.fd.io/r/#/c/9090/
Change-Id: I7cc8d75e19f1f56e1f1adc23848a4a9baef87206
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/hc2vpp/v3po/interfacesstate/InterfaceDataTranslatorTest.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/InterfaceDataTranslatorTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/InterfaceDataTranslatorTest.java index c58409754..9a9697413 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/InterfaceDataTranslatorTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/InterfaceDataTranslatorTest.java @@ -30,7 +30,9 @@ public class InterfaceDataTranslatorTest implements InterfaceDataTranslator { @Test public void testVppPhysAddrToYang() throws Exception { assertEquals("01:02:03:04:05:06", vppPhysAddrToYang(new byte[]{1, 2, 3, 4, 5, 6})); - assertEquals("0a:0b:0c:0d:0e:0f", vppPhysAddrToYang(new byte[]{0xa, 0xb, 0xc, 0xd, 0xe, 0xf})); + // Extended (64-bit) MAC addresses are currently not supported (it might require yang model update), + // so test if extended part is ignored + assertEquals("0a:0b:0c:0d:0e:0f", vppPhysAddrToYang(new byte[]{0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0, 0})); } @Test(expected = NullPointerException.class) |