@Test public final void testGetStringIpPrefix_ipv6() { String ipv6Prefix = "fd1c:29d6:85d1::/48"; assertEquals(ipv6Prefix.replace('/', '_').replace(':', '.'), Utils.getStringIpPrefix(new IpPrefix(new Ipv6Prefix(ipv6Prefix)))); }
public static String getStringIpPrefix(IpPrefix ipPrefix) { Preconditions.checkNotNull(ipPrefix); if (ipPrefix.getIpv4Prefix() != null) { String ipPrefixIpv4 = ipPrefix.getIpv4Prefix().getValue(); return ipPrefixIpv4.replace('/', '_'); } String ipPrefixIpv6 = ipPrefix.getIpv6Prefix().getValue(); return ipPrefixIpv6.replace('/', '_').replace(':', '.'); }
Utils { public static String getStringIpPrefix(IpPrefix ipPrefix) { Preconditions.checkNotNull(ipPrefix); if (ipPrefix.getIpv4Prefix() != null) { String ipPrefixIpv4 = ipPrefix.getIpv4Prefix().getValue(); return ipPrefixIpv4.replace('/', '_'); } String ipPrefixIpv6 = ipPrefix.getIpv6Prefix().getValue(); return ipPrefixIpv6.replace('/', '_').replace(':', '.'); } }
Utils { public static String getStringIpPrefix(IpPrefix ipPrefix) { Preconditions.checkNotNull(ipPrefix); if (ipPrefix.getIpv4Prefix() != null) { String ipPrefixIpv4 = ipPrefix.getIpv4Prefix().getValue(); return ipPrefixIpv4.replace('/', '_'); } String ipPrefixIpv6 = ipPrefix.getIpv6Prefix().getValue(); return ipPrefixIpv6.replace('/', '_').replace(':', '.'); } private  Utils(); }
Utils { public static String getStringIpPrefix(IpPrefix ipPrefix) { Preconditions.checkNotNull(ipPrefix); if (ipPrefix.getIpv4Prefix() != null) { String ipPrefixIpv4 = ipPrefix.getIpv4Prefix().getValue(); return ipPrefixIpv4.replace('/', '_'); } String ipPrefixIpv6 = ipPrefix.getIpv6Prefix().getValue(); return ipPrefixIpv6.replace('/', '_').replace(':', '.'); } private  Utils(); static IpPrefix createIpPrefix(String cidr); static IpAddress createIpAddress(String ipAddress); static String getStringIpPrefix(IpPrefix ipPrefix); static String getStringIpAddress(IpAddress ipAddress); static String normalizeUuid(String string); static void syncNat(ReadWriteTransaction rwTx, Floatingip oldFloatingIp, Floatingip newFloatingIp); static void removeNat(ReadWriteTransaction rwTx, Floatingip removedFloatingIp); }
Utils { public static String getStringIpPrefix(IpPrefix ipPrefix) { Preconditions.checkNotNull(ipPrefix); if (ipPrefix.getIpv4Prefix() != null) { String ipPrefixIpv4 = ipPrefix.getIpv4Prefix().getValue(); return ipPrefixIpv4.replace('/', '_'); } String ipPrefixIpv6 = ipPrefix.getIpv6Prefix().getValue(); return ipPrefixIpv6.replace('/', '_').replace(':', '.'); } private  Utils(); static IpPrefix createIpPrefix(String cidr); static IpAddress createIpAddress(String ipAddress); static String getStringIpPrefix(IpPrefix ipPrefix); static String getStringIpAddress(IpAddress ipAddress); static String normalizeUuid(String string); static void syncNat(ReadWriteTransaction rwTx, Floatingip oldFloatingIp, Floatingip newFloatingIp); static void removeNat(ReadWriteTransaction rwTx, Floatingip removedFloatingIp);  }