summaryrefslogtreecommitdiffstats
path: root/v3po/v3po2vpp/src/main/java/io
diff options
context:
space:
mode:
authorJan Srnicek <jsrnicek@cisco.com>2016-12-16 13:07:56 +0100
committerMarek Gradzki <mgradzki@cisco.com>2016-12-20 13:59:56 +0100
commitf8273e10b19ecc82bdda81feef9982ce28d5de21 (patch)
tree98d2d9686bcf24f64c0c18c633554e8629f2e22e /v3po/v3po2vpp/src/main/java/io
parente3b9212110528217c2477f588ebccc0d76ee31e1 (diff)
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 <jsrnicek@cisco.com> Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'v3po/v3po2vpp/src/main/java/io')
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/InterfaceDataTranslator.java25
1 files changed, 0 insertions, 25 deletions
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<SwInterfaceDetails, ?, SwInterfaceDetails> 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 <p> 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.