summaryrefslogtreecommitdiffstats
path: root/v3po/vpp-translate-utils/src
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2016-06-27 15:23:28 +0200
committerMarek Gradzki <mgradzki@cisco.com>2016-07-01 13:21:14 +0200
commitafab782c07481c8a618ccb4baa72b8a4d293a428 (patch)
tree232f151a02c732077d8eba4b772bd7a8f43b345b /v3po/vpp-translate-utils/src
parentfe7e4c45bdf74e91482964070205329d5009002d (diff)
HONEYCOMB-104: add Ipv4 support to sub-interfaces
* updates vpp-vlan.yang with Ipv4 and Ipv6 support based on ietf-ip rev. 2014-06-16 * adds Ipv4 support for sub-interfaces Ipv6 support for interfaces and sub-interfaces will be addded in the future (HONEYCOMB-102) Change-Id: I0bf10fe3ff1c543685f651d8b6fb06bbeee3db92 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'v3po/vpp-translate-utils/src')
-rw-r--r--v3po/vpp-translate-utils/src/main/java/io/fd/honeycomb/v3po/translate/v3po/util/SubInterfaceUtils.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/v3po/vpp-translate-utils/src/main/java/io/fd/honeycomb/v3po/translate/v3po/util/SubInterfaceUtils.java b/v3po/vpp-translate-utils/src/main/java/io/fd/honeycomb/v3po/translate/v3po/util/SubInterfaceUtils.java
index 1df82af73..0aff6c1a7 100644
--- a/v3po/vpp-translate-utils/src/main/java/io/fd/honeycomb/v3po/translate/v3po/util/SubInterfaceUtils.java
+++ b/v3po/vpp-translate-utils/src/main/java/io/fd/honeycomb/v3po/translate/v3po/util/SubInterfaceUtils.java
@@ -21,6 +21,35 @@ public final class SubInterfaceUtils {
private SubInterfaceUtils() {
throw new UnsupportedOperationException("Utility class cannot be instantiated.");
}
+//
+// @Nullable
+// private static String getCfgIfaceName(@Nonnull final InstanceIdentifier<?> id) {
+// final org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceKey key = id.firstKeyOf(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface.class);
+// if (key == null) {
+// return null;
+// } else {
+// return key.getName();
+// }
+// }
+//
+// @Nullable
+// private static String getOperIfaceName(@Nonnull final InstanceIdentifier<?> id) {
+// final org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.InterfaceKey key = id.firstKeyOf(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface.class);
+// if (key == null) {
+// return null;
+// } else {
+// return key.getName();
+// }
+// }
+//
+// @Nullable
+// public static String getSubInterfaceName(@Nonnull final InstanceIdentifier<?> id) {
+// String ifaceName = getCfgIfaceName(id);
+// if (ifaceName == null) {
+// ifaceName = getOperIfaceName(id);
+// }
+// if (i)
+// }
public static String getSubInterfaceName(final String superIfName, final int subIfaceId) {
return String.format("%s.%d", superIfName, subIfaceId);