Tabnine Logo
Ipv6Address.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address
constructor

Best Java code snippets using org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address.<init> (Showing top 20 results out of 315)

origin: org.opendaylight.coretutorials/openconfig-bgp

public static Ipv6Address getDefaultInstance(String defaultValue) {
  return new Ipv6Address(defaultValue);
}
origin: org.opendaylight.mdsal.model/ietf-inet-types-2013-07-15

public static Ipv6Address getDefaultInstance(String defaultValue) {
  return new Ipv6Address(defaultValue);
}
origin: org.opendaylight.mdsal.binding.model.ietf/rfc6991-ietf-inet-types

public static Ipv6Address getDefaultInstance(String defaultValue) {
  return new Ipv6Address(defaultValue);
}
origin: io.fd.hc2vpp.srv6/srv6-impl

  static Ipv6Address parseLocator(@Nonnull final Ipv6Prefix prefix) {
    Matcher matcher = IP_PREFIX_PATTERN.matcher(prefix.getValue());
    checkArgument(matcher.matches(), "Could`t parse Locator: {}", prefix);
    return new Ipv6Address(matcher.group(GROUP_IP));
  }
}
origin: org.opendaylight.mdsal.binding.model.ietf/rfc8294-ietf-routing-types

public static Ipv6MulticastSourceAddress getDefaultInstance(final String defaultValue) {
  return Enumeration.forName(defaultValue).map(ENUMERATED::get)
      .orElse(new Ipv6MulticastSourceAddress(new Ipv6Address(defaultValue)));
}
origin: io.fd.honeycomb.vpp/vpp-translate-utils

/**
 * Creates address array from address part of {@link Ipv6Prefix}
 */
public static byte[] ipv6AddressPrefixToArray(@Nonnull final Ipv6Prefix ipv4Prefix) {
  checkNotNull(ipv4Prefix, "Cannot convert null prefix");
  return ipv6AddressNoZoneToArray(new Ipv6AddressNoZone(
      new Ipv6Address(ipv4Prefix.getValue().substring(0, ipv4Prefix.getValue().indexOf('/')))));
}
origin: org.opendaylight.mdsal.model/ietf-inet-types-2013-07-15

  public static IpAddress getDefaultInstance(java.lang.String defaultValue) {
    final Matcher ipv4Matcher = IPV4_PATTERN.matcher(defaultValue);

    if (ipv4Matcher.matches()) {
      if (IPV6_PATTERN1.matcher(defaultValue).matches() && IPV6_PATTERN2.matcher(defaultValue).matches()) {
        throw new IllegalArgumentException(
          String.format("Cannot create IpAddress from \"%s\", matches both %s and %s",
            defaultValue, Ipv4Address.class.getSimpleName(), Ipv6Address.class.getSimpleName()));

      }
      return new IpAddress(new Ipv4Address(defaultValue));
    } else if (IPV6_PATTERN1.matcher(defaultValue).matches() && IPV6_PATTERN2.matcher(defaultValue).matches()) {
      return new IpAddress(new Ipv6Address(defaultValue));
    } else {
      throw new IllegalArgumentException("Cannot create IpAddress from " + defaultValue);
    }

  }
}
origin: org.opendaylight.mdsal.binding.model.ietf/rfc6991-ietf-inet-types

  public static IpAddress getDefaultInstance(final String defaultValue) {
    return IPV4_PATTERN.matcher(defaultValue).matches() ? new IpAddress(new Ipv4Address(defaultValue))
        : new IpAddress(new Ipv6Address(defaultValue));
  }
}
origin: org.opendaylight.netide/shim

private static IpAddress resolveIpAddress(final InetAddress address) {
  String hostAddress = address.getHostAddress();
  if (address instanceof Inet4Address) {
    return new IpAddress(new Ipv4Address(hostAddress));
  }
  if (address instanceof Inet6Address) {
    return new IpAddress(new Ipv6Address(hostAddress));
  }
  throw new IllegalArgumentException("Unsupported IP address type!");
}
origin: org.opendaylight.bgpcep/util

/**
 * Creates uncompressed IP Address
 *
 * @param ip to be uncompressed
 * @return Ipv6Address with same, but uncompressed, value
 */
public static Ipv6Address getFullForm(final Ipv6Address ip) {
  return new Ipv6Address(InetAddresses.forString(ip.getValue()).getHostAddress());
}
origin: org.opendaylight.openflowplugin/openflowplugin

private static IpAddress resolveIpAddress(final InetAddress address) {
  String hostAddress = address.getHostAddress();
  if (address instanceof Inet4Address) {
    return new IpAddress(new Ipv4Address(hostAddress));
  }
  if (address instanceof Inet6Address) {
    return new IpAddress(new Ipv6Address(hostAddress));
  }
  throw new IllegalArgumentException("Unsupported IP address type!");
}
origin: org.opendaylight.sfc/sfc-ovs

public static IpAddress convertStringToIpAddress(String ipAddressString) {
  Preconditions.checkNotNull(ipAddressString, "Supplied string value of ipAddress must not be null");
  try {
    return new IpAddress(new Ipv4Address(ipAddressString));
  } catch (Exception e) {
    LOG.debug("Supplied string value of ipAddress ({}) is not an instance of IPv4", ipAddressString);
  }
  try {
    return new IpAddress(new Ipv6Address(ipAddressString));
  } catch (Exception e) {
    LOG.debug("Supplied string value of ipAddress ({}) is not an instance of IPv6", ipAddressString);
  }
  LOG.error("Supplied string value of ipAddress ({}) cannot be converted to IpAddress object!", ipAddressString);
  return null;
}
origin: org.opendaylight.ovsdb/utils.southbound-utils

public static IpAddress createIpAddress(Inet6Address address) {
  Ipv6Address ipv6 = new Ipv6Address(address.getHostAddress());
  return new IpAddress(ipv6);
}
origin: org.opendaylight.openflowplugin/openflowplugin

public static Ipv6Address compressedIpv6AddressFormat(final Ipv6Address ipv6Address) {
  return new Ipv6Address(compressedIpv6FormatFromString(ipv6Address.getValue()));
}
origin: org.opendaylight.ovsdb/southbound-impl

public static IpAddress createIpAddress(Inet6Address address) {
  Ipv6Address ipv6 = new Ipv6Address(address.getHostAddress());
  return new IpAddress(ipv6);
}
origin: org.opendaylight.groupbasedpolicy/neutron-mapper

/**
 * This implementation does not use nameservice lookups (e.g. no DNS).
 *
 * @param ipAddress - format must be valid for regex in {@link Ipv4Address} or
 *        {@link Ipv6Address}
 * @return the {@link IpAddress} having the given ipAddress string representation
 * @throws IllegalArgumentException - if the argument is not a valid IP address string
 */
public static IpAddress createIpAddress(String ipAddress) {
  checkArgument(!Strings.isNullOrEmpty(ipAddress), "Cannot be null or empty.");
  InetAddress ip = InetAddresses.forString(ipAddress);
  if (ip instanceof Inet4Address) {
    return new IpAddress(new Ipv4Address(ipAddress));
  }
  return new IpAddress(new Ipv6Address(ipAddress));
}
origin: io.fd.hc2vpp.srv6/srv6-impl

private Ipv6Address parseSrv6SidAddress(final String locatorIp, final String locatorLength, final Long opcode) {
  com.googlecode.ipv6.IPv6Address ip =
      com.googlecode.ipv6.IPv6Address.fromString(locatorIp);
  IPv6NetworkMask mask = IPv6NetworkMask.fromPrefixLength(parseInt(locatorLength));
  com.googlecode.ipv6.IPv6Address srv6Sid = ip.maskWithNetworkMask(mask);
  return new Ipv6Address(srv6Sid.add(opcode.intValue()).toString());
}
origin: io.fd.hc2vpp.srv6/srv6-impl

private Segment parseSrv6Sid(final long i, final Srv6Sid srv6Sid) {
  // shifting index by 1 so it matches original indexing
  long index = i + 1L;
  SegmentBuilder builder = new SegmentBuilder().withKey(new SegmentKey(index)).setState(
      new org.opendaylight.yang.gen.v1.http.cisco.com.ns.yang.oc.srte.policy.rev170918.segment.properties.StateBuilder()
          .setIndex(index)
          .setType(SegmentType.Type2)
          .setSidValue(new SidValueType(
              new IpAddress(new Ipv6Address(arrayToIpv6AddressNoZone(srv6Sid.addr)))))
          .build());
  return builder.build();
}
origin: org.opendaylight.bgpcep/bgp-linkstate

private static AddressFamily serializeAddressFamily(final ChoiceNode addressFamily, final boolean ipv4Case) {
  if (ipv4Case) {
    return new Ipv4CaseBuilder()
      .setIpv4TunnelSenderAddress(new Ipv4Address((String) addressFamily.getChild(IPV4_TUNNEL_SENDER_ADDRESS).get().getValue()))
      .setIpv4TunnelEndpointAddress(new Ipv4Address((String) addressFamily.getChild(IPV4_TUNNEL_ENDPOINT_ADDRESS).get().getValue()))
      .build();
  }
  return new Ipv6CaseBuilder()
    .setIpv6TunnelSenderAddress(new Ipv6Address((String) addressFamily.getChild(IPV6_TUNNEL_SENDER_ADDRESS).get().getValue()))
    .setIpv6TunnelEndpointAddress(new Ipv6Address((String) addressFamily.getChild(IPV6_TUNNEL_ENDPOINT_ADDRESS).get().getValue()))
    .build();
}
origin: io.fd.hc2vpp.srv6/srv6-impl

Ipv6Address resolveSidAddress(@Nonnull final Prefix locPrefix, @Nonnull Sid localSid) {
  com.googlecode.ipv6.IPv6Address ip =
      com.googlecode.ipv6.IPv6Address.fromString(locPrefix.getAddress().getValue());
  IPv6NetworkMask mask = IPv6NetworkMask.fromPrefixLength(locPrefix.getLength().getValue());
  // strip function part if present
  ip = ip.maskWithNetworkMask(mask);
  //add new function part based on opcode
  String locIp = ip.add(localSid.getOpcode().getValue().intValue()).toString();
  return new Ipv6Address(locIp);
}
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715Ipv6Address<init>

Javadoc

Creates a copy from Source Object.

Popular methods of Ipv6Address

  • getValue
  • equals
  • check_valueLength
  • getDefaultInstance
  • hashCode

Popular in Java

  • Updating database using SQL prepared statement
  • getExternalFilesDir (Context)
  • startActivity (Activity)
  • getApplicationContext (Context)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Permission (java.security)
    Legacy security code; do not use.
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Notification (javax.management)
  • JTextField (javax.swing)
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now