Plesk licenses associated to this IP

REST: GET /ip/{ip}/license/plesk
@param ipAddress [required] Filter the value of ipAddress property (=)
@param ip [required]
329637
public ArrayList<String> ip_license_plesk_GET(String ip, String ipAddress) throws IOException {
		String qPath = "/ip/{ip}/license/plesk";
		StringBuilder sb = path(qPath, ip);
		query(sb, "ipAddress", ipAddress);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, t2);
	}
1068152
def get_public_ip(addresses, version=4):
        
        for addr in addresses:
            if addr['public'] and addr['address_family'] == version:
                return addr.get('address')
        return None
427317
def json_2_ip_address(json_obj):
        
        LOGGER.debug("IPAddress.json_2_ip_address")
        return IPAddress(ipa_id=json_obj['ipAddressID'],
                         ip_address=json_obj['ipAddressIPA'],
                         fqdn=json_obj['ipAddressFQDN'],
                         ipa_osi_id=json_obj['ipAddressOSInstanceID'],
                         ipa_subnet_id=json_obj['ipAddressSubnetID'])
1158821
def hasIP(self, ip):
        """"""

        for f in self.features:
            if (f.prop.startswith("net_interface.") and
                    f.prop.endswith(".ip") and f.value == ip):
                return True
        return False
1103584
def ip_address_list(ips):
    
    # first, try it as a single IP address
    try:
        return ip_address(ips)
    except ValueError:
        pass
    # then, consider it as an ipaddress.IPv[4|6]Network instance and expand it
    return list(ipaddress.ip_network(u(ips)).hosts())
1028858
def lookup!(nameserver=nil)
      resolver = Resolv.resolver(nameserver)
      ips = begin
              resolver.getaddresses(self.address)
            rescue
              []
            end

      ips.map! do |addr|
        IPAddress.first_or_create(
          :address => addr,
          :host_names => [self]
        )
      end

      return ips
    end
586462
def ip_host(value, options=None, version=None):
    '''
    
    '''
    ipaddr_filter_out = _filter_ipaddr(value, options=options, version=version)
    if not ipaddr_filter_out:
        return
    if not isinstance(value, (list, tuple, types.GeneratorType)):
        return six.text_type(ipaddress.ip_interface(ipaddr_filter_out[0]))
    return [six.text_type(ipaddress.ip_interface(ip_a)) for ip_a in ipaddr_filter_out]
250422
protected void releaseIpAddress( String ip ) {
		this.logger.fine( "Releasing IP address: " + ip );
		this.usedIps.remove( ip );
		save( this );
	}
597085
def _parse_ip(addr):
    

    # Parse the IP address
    try:
        address = netaddr.IPAddress(addr.strip())
    except (ValueError, netaddr.AddrFormatError):
        return None

    # Canonicalize it, if possible
    if address.version == 6:
        try:
            return address.ipv4()
        except netaddr.AddrConversionError:
            pass

    return address
45018
public static sslfipskey[] get_filtered(nitro_service service, String filter) throws Exception{
		sslfipskey obj = new sslfipskey();
		options option = new options();
		option.set_filter(filter);
		sslfipskey[] response = (sslfipskey[]) obj.getfiltered(service, option);
		return response;
	}
1061292
public function isValidIP4NoPrivate(string $ipAddress): bool
    {
        return (bool) filter_var(
            $ipAddress,
            FILTER_VALIDATE_IP,
            FILTER_FLAG_IPV4
            | FILTER_FLAG_NO_PRIV_RANGE
            | FILTER_FLAG_NO_RES_RANGE
        );
    }
1208240
def get_instance_private_ip_from_route(instance, route):
    
    ipaddr = None
    for eni in instance.interfaces:
        if eni.id == route.interface_id:
            ipaddr = eni.private_ip_address
            break
    return ipaddr, eni if ipaddr else None
1020927
public boolean checkIP(String ipstring)
    {
        Boolean ipconstrain = (Boolean) ips.get(ipstring);
        if (ipconstrain != null)
        {
            return ipconstrain.booleanValue();
        }
        else
        {
            return standard;
        }
    }
1202776
private String ipAddressFromURL(String url, String name) {
    String ipAddr = null;

    if (_urlValidator.isValid(url)) {
      WebTarget resolver = ClientBuilder.newClient().target(url);
      try {
        ipAddr = resolver.request().get(String.class);
      } catch (Exception e) {
        warn("URL Cannot Resolve for resolveIP named [" + name + "]. The requested URL is invalid  [" + url + "].");
      }
    } else {
      warn("The requested URL for resolveIP named [" + name + "] is invalid  [" + url + "].");
    }
    return ipAddr;
  }
149915
private static IPAddressStringParameters toMaskOptions(final IPAddressStringParameters validationOptions,
			final IPVersion ipVersion) {
		//We must provide options that do not allow a mask with wildcards or ranges
		IPAddressStringParameters.Builder builder = null;
		if(ipVersion == null || ipVersion.isIPv6()) {
			IPv6AddressStringParameters ipv6Options = validationOptions.getIPv6Parameters();
			if(!ipv6Options.rangeOptions.isNoRange()) {
				builder = validationOptions.toBuilder();
				builder.getIPv6AddressParametersBuilder().setRangeOptions(RangeParameters.NO_RANGE);
			}
			if(ipv6Options.allowMixed && !ipv6Options.getMixedParameters().getIPv4Parameters().rangeOptions.isNoRange()) {
				if(builder == null) {
					builder = validationOptions.toBuilder();
				}
				builder.getIPv6AddressParametersBuilder().setRangeOptions(RangeParameters.NO_RANGE);
			}
		}
		if(ipVersion == null || ipVersion.isIPv4()) {
			IPv4AddressStringParameters ipv4Options = validationOptions.getIPv4Parameters();
			if(!ipv4Options.rangeOptions.isNoRange()) {
				if(builder == null) {
					builder = validationOptions.toBuilder();
				}
				builder.getIPv4AddressParametersBuilder().setRangeOptions(RangeParameters.NO_RANGE);
			}
		}
		if(validationOptions.allowAll) {
			if(builder == null) {
				builder = validationOptions.toBuilder();
			}
			builder.allowAll(false);
		}
		IPAddressStringParameters maskOptions = (builder == null) ? validationOptions : builder.toParams();
		return maskOptions;
	}
261793
def maybe_ip_addr(addr):
    

    if six.PY2 and isinstance(addr, str):
        addr = unicode(addr)  # noqa
    try:
        return ipaddress.ip_address(addr)
    except ValueError:
        pass
    return str(addr)
1013032
public String chooseServerAlias(String ipAddress, Principal[] issuers, Socket socket) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "chooseServerAlias", new Object[] { ipAddress, issuers, socket });
        }

        String alias = null;

        // Use connection info
        Map<String, Object> connectionInfo = JSSEHelper.getInstance().getInboundConnectionInfo();
        if (connectionInfo != null) {
            String tmpIpAddress = (String) connectionInfo.get(JSSEHelper.CONNECTION_INFO_CERT_MAPPING_HOST);
            alias = certMapping.getProperty(tmpIpAddress, certDefaultLabel);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "chooseServerAlias: " + alias);
        }
        return alias;
    }