From f8273e10b19ecc82bdda81feef9982ce28d5de21 Mon Sep 17 00:00:00 2001 From: Jan Srnicek Date: Fri, 16 Dec 2016 13:07:56 +0100 Subject: HONEYCOMB-310: translation layer for acl plugin Not covered by this patch (moved to subsequent commits): - postman collection - distinguish ingress/egress ACLs while reading assigned acls - proper support for acl tag - unit tests improvements - read for acls (not necessarily assigned) - initializers Change-Id: I5a198ce1a6e20d0b1d95b4d2d83d0464fb86580c Signed-off-by: Jan Srnicek Signed-off-by: Marek Gradzki --- .../interfacesstate/InterfaceDataTranslator.java | 25 ---------------------- 1 file changed, 25 deletions(-) (limited to 'v3po/v3po2vpp/src/main/java/io/fd') diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/InterfaceDataTranslator.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/InterfaceDataTranslator.java index a0d292a4f..3365dabf6 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/InterfaceDataTranslator.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/InterfaceDataTranslator.java @@ -58,8 +58,6 @@ public interface InterfaceDataTranslator extends ByteDataTranslator, JvppReplyCo Gauge64 vppLinkSpeed16 = new Gauge64(BigInteger.valueOf(40000L * 1000000)); Gauge64 vppLinkSpeed32 = new Gauge64(BigInteger.valueOf(100000L * 1000000)); - char[] HEX_CHARS = "0123456789abcdef".toCharArray(); - int PHYSICAL_ADDRESS_LENGTH = 6; Collector SINGLE_ITEM_COLLECTOR = @@ -90,12 +88,6 @@ public interface InterfaceDataTranslator extends ByteDataTranslator, JvppReplyCo } } - default void appendHexByte(final StringBuilder sb, final byte b) { - final int v = b & 0xFF; - sb.append(HEX_CHARS[v >>> 4]); - sb.append(HEX_CHARS[v & 15]); - } - /** * Reads first 6 bytes of supplied byte array and converts to string as Yang dictates

Replace later with * https://git.opendaylight.org/gerrit/#/c/34869/10/model/ietf/ietf-type- util/src/main/ @@ -119,23 +111,6 @@ public interface InterfaceDataTranslator extends ByteDataTranslator, JvppReplyCo return printHexBinary(vppPhysAddress, startIndex, endIndex); } - default String printHexBinary(@Nonnull final byte[] bytes) { - Objects.requireNonNull(bytes, "bytes array should not be null"); - return printHexBinary(bytes, 0, bytes.length); - } - - default String printHexBinary(@Nonnull final byte[] bytes, final int startIndex, final int endIndex) { - StringBuilder str = new StringBuilder(); - - appendHexByte(str, bytes[startIndex]); - for (int i = startIndex + 1; i < endIndex; i++) { - str.append(":"); - appendHexByte(str, bytes[i]); - } - - return str.toString(); - } - /** * VPP's interface index is counted from 0, whereas ietf-interface's if-index is from 1. This function converts from * VPP's interface index to YANG's interface index. -- cgit 1.2.3-korg