diff options
author | Marek Gradzki <mgradzki@cisco.com> | 2016-06-21 10:21:39 +0200 |
---|---|---|
committer | Marek Gradzki <mgradzki@cisco.com> | 2016-06-21 15:12:00 +0200 |
commit | a760fd96233ae4e95e5b2667cdebc1aff92da800 (patch) | |
tree | b8bf7b811a8414971166a454ae26f68f225946e3 /v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/InterfaceUtils.java | |
parent | 6a48826150125820818dbf5d2786af0686b6a0ae (diff) |
HONEYCOMB-64: Add ipv4 netmask support
Supported contiguous netmask only
(strictly, only leading 1s are allowed)
Update postman collection
Change-Id: I989bbd013227bc3e1eda0861241543db0cdbf656
Signed-off-by: Tibor Sirovatka <tsirovat@cisco.com>
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/InterfaceUtils.java')
-rw-r--r-- | v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/InterfaceUtils.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/InterfaceUtils.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/InterfaceUtils.java index e2d3002d7..01a315a77 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/InterfaceUtils.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/InterfaceUtils.java @@ -16,10 +16,10 @@ package io.fd.honeycomb.v3po.translate.v3po.interfacesstate; +import static com.google.common.base.Preconditions.checkArgument; import static io.fd.honeycomb.v3po.translate.v3po.interfacesstate.InterfaceCustomizer.getCachedInterfaceDump; import static java.util.Objects.requireNonNull; -import com.google.common.base.Preconditions; import io.fd.honeycomb.v3po.translate.ModificationCache; import io.fd.honeycomb.v3po.translate.read.ReadFailedException; import io.fd.honeycomb.v3po.translate.util.RWUtils; @@ -120,7 +120,7 @@ public final class InterfaceUtils { public static String vppPhysAddrToYang(@Nonnull final byte[] vppPhysAddress, int startIndex) { Objects.requireNonNull(vppPhysAddress, "Empty physical address bytes"); final int endIndex = startIndex + PHYSICAL_ADDRESS_LENGTH; - Preconditions.checkArgument(endIndex <= vppPhysAddress.length, + checkArgument(endIndex <= vppPhysAddress.length, "Invalid physical address size (%s) for given startIndex (%d), expected >= %d", vppPhysAddress.length, startIndex, endIndex); StringBuilder physAddr = new StringBuilder(); @@ -152,7 +152,7 @@ public final class InterfaceUtils { * @return VPP's representation of the if-index */ public static int yangIfIndexToVpp(int yangIfIndex) { - Preconditions.checkArgument(yangIfIndex >= 1, "YANG if-index has invalid value %s", yangIfIndex); + checkArgument(yangIfIndex >= 1, "YANG if-index has invalid value %s", yangIfIndex); return yangIfIndex - 1; } |