Tabnine Logo
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715
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

Best Java code snippets using org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715 (Showing top 20 results out of 1,026)

origin: org.opendaylight.bgpcep/bgp-bmp-impl

private static String getStringIpAddress(final IpAddress ipAddress) {
  if (ipAddress.getIpv4Address() != null) {
    return ipAddress.getIpv4Address().getValue();
  }
  return ipAddress.getIpv6Address().getValue();
}
origin: org.opendaylight.packetcable/packetcable-policy-server

private String getIpPrefixStr(final IpPrefix ipPrefix) {
  final Ipv4Prefix ipv4 = ipPrefix.getIpv4Prefix();
  if (ipv4 != null) {
    return ipv4.getValue();
  } else {
    return ipPrefix.getIpv6Prefix().getValue();
  }
}
origin: org.opendaylight.groupbasedpolicy/sxp-mapper

  private String stripToCidr(final IpPrefix value) {
    return value.getIpv4Prefix().getValue();
  }
}
origin: org.opendaylight.netconf/netconf-topology

private InetSocketAddress getSocketAddress(final Host host, int port) {
  if(host.getDomainName() != null) {
    return new InetSocketAddress(host.getDomainName().getValue(), port);
  } else {
    final IpAddress ipAddress = host.getIpAddress();
    final String ip = ipAddress.getIpv4Address() != null ? ipAddress.getIpv4Address().getValue() : ipAddress.getIpv6Address().getValue();
    return new InetSocketAddress(ip, port);
  }
}
origin: org.opendaylight.faas/fabric

public static IpPrefix createDefaultPrefix(IpAddress ipAddress) {
  if (ipAddress.getIpv4Address() == null) {
    return null;
  }
  String ipv4 = ipAddress.getIpv4Address().getValue();
  long mask = getDefaultMask(ipv4);
  return new IpPrefix(new Ipv4Prefix(String.format("%s/%d", ipv4, mask)));
}
origin: org.opendaylight.groupbasedpolicy/neutron-mapper

public static IpPrefix ipAddressToIpPrefix(IpAddress address) {
  if (address.getIpv4Address() != null) {
    return new IpPrefix(new Ipv4Prefix(ipv4PrefixOf(address)));
  } else if (address.getIpv6Address() != null) {
    return new IpPrefix(new Ipv6Prefix(ipv6PrefixOf(address)));
  }
  throw new IllegalArgumentException("Ip address [{}] is not a valid Ipv4 or Ipv6 address." + address);
}
origin: org.opendaylight.mdsal.model/ietf-inet-types-2013-07-15

  @Override
  protected Ipv6Address maybeIpv6Address(final IpAddress addr) {
    return addr.getIpv6Address();
  }
}
origin: org.opendaylight.coretutorials/openconfig-bgp

@Override
public int hashCode() {
  if (hashValid) {
    return hash;
  }

  final int prime = 31;
  int result = 1;
  result = prime * result + ((_localPort == null) ? 0 : _localPort.hashCode());
  result = prime * result + ((_remoteAddress == null) ? 0 : _remoteAddress.hashCode());
  result = prime * result + ((_remotePort == null) ? 0 : _remotePort.hashCode());

  hash = result;
  hashValid = true;
  return result;
}
origin: org.opendaylight.sfc/sfc-sb-rest

public static String convertIpAddress(IpAddress ip) {
  String ret = null;
  if (ip != null) {
    if (ip.getIpv4Address() != null) {
      ret = ip.getIpv4Address().getValue();
    } else if (ip.getIpv6Address() != null) {
      ret = ip.getIpv6Address().getValue();
    }
  }
  return ret;
}
origin: org.opendaylight.bgpcep/util

  /**
   * Get string representation of IpAddress
   * @param ipAddress
   * @return String value of Ipv4Address or Ipv6Address
   */
  public static String toStringIP(final IpAddress ipAddress) {
    if (ipAddress.getIpv4Address() != null) {
      return ipAddress.getIpv4Address().getValue();
    }
    return ipAddress.getIpv6Address().getValue();
  }
}
origin: org.opendaylight.groupbasedpolicy/ofoverlay-renderer

private static String getStringIpAddress(IpAddress ipAddress) {
  if (ipAddress.getIpv4Address() != null) {
    return ipAddress.getIpv4Address().getValue();
  }
  return ipAddress.getIpv6Address().getValue();
}
origin: org.opendaylight.groupbasedpolicy/neutron-mapper

public static String getStringIpAddress(IpAddress ipAddress) {
  if (ipAddress.getIpv4Address() != null) {
    return ipAddress.getIpv4Address().getValue();
  }
  return ipAddress.getIpv6Address().getValue();
}
origin: org.opendaylight.bgpcep/bgp-openconfig-impl

private static String createPeerName(final IpAddress ipAddress) {
  final String address = ipAddress.getIpv4Address() != null ? ipAddress.getIpv4Address().getValue() : ipAddress.getIpv6Address().getValue();
  return PEER + address;
}
origin: io.fd.honeycomb.v3po/v3po2vpp

private String getAddressString(final IpAddress addr) {
  return addr.getIpv4Address() == null ? addr.getIpv6Address().getValue() : addr.getIpv4Address().getValue();
}
origin: io.fd.honeycomb.v3po/v3po2vpp

private String getAddressString(final IpAddress addr) {
  return addr.getIpv4Address() == null ? addr.getIpv6Address().getValue() : addr.getIpv4Address().getValue();
}
origin: io.fd.honeycomb.v3po/v3po2vpp

private String getAddressString(final IpAddress addr) {
  return addr.getIpv4Address() == null ? addr.getIpv6Address().getValue() : addr.getIpv4Address().getValue();
}
origin: org.opendaylight.bgpcep/bgp-bmp-impl

private String getAddressString(final IpAddress address) {
  Preconditions.checkArgument(address.getIpv4Address() != null || address.getIpv6Address() != null, "Address %s is invalid", address);
  if (address.getIpv4Address() != null) {
    return address.getIpv4Address().getValue();
  }
  return address.getIpv6Address().getValue();
}
origin: org.opendaylight.bgpcep/pcep-topology-provider

private String getAddressString(final IpAddress address) {
  Preconditions.checkArgument(address.getIpv4Address() != null || address.getIpv6Address() != null, "Address %s is invalid", address);
  if (address.getIpv4Address() != null) {
    return address.getIpv4Address().getValue();
  }
  return address.getIpv6Address().getValue();
}
origin: org.opendaylight.alto.basic/alto-simple-ecs-impl

private String touniqueIpAddress(IpAddress ipAddress) {
  Ipv4Address ipv4 = ipAddress.getIpv4Address();
  if (ipv4 != null) {
    return ipv4.getValue();
  }
  Ipv6Address ipv6 = ipAddress.getIpv6Address();
  if (ipv6 != null) {
    return uniqueIpv6String(ipv6.getValue());
  }
  return null;
}
private static String uniqueIpv6String(String ipv6) {
origin: org.opendaylight.netconf/netconf-monitoring

@XmlElement(name = "source-host")
public String getSourceHost() {
  final IpAddress ipAddress = managementSession.getSourceHost().getIpAddress();
  if (ipAddress.getIpv4Address() != null) {
    return ipAddress.getIpv4Address().getValue();
  } else {
    return ipAddress.getIpv6Address().getValue();
  }
}
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715

Most used classes

  • $YangModuleInfoImpl
  • Ipv4Address
    The ipv4-address type represents an IPv4 address in dotted-quad notation. The IPv4 address may inclu
  • IpAddress
    The union built-in type represents a value that corresponds to one of its member types.
  • Ipv4Prefix
    The ipv4-prefix type represents an IPv4 address prefix. The prefix length is given by the number fol
  • Uri
    The uri type represents a Uniform Resource Identifier (URI) as defined by STD 66. Objects using the
  • PortNumber,
  • IpPrefix,
  • Ipv6Prefix,
  • Dscp,
  • AsNumber,
  • IpAddressBuilder,
  • Ipv4AddressNoZone,
  • IetfInetUtil,
  • Ipv6FlowLabel,
  • Host,
  • Ipv6AddressNoZone,
  • DomainName,
  • IpPrefixBuilder,
  • IpAddressNoZone
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