Delete an ip by deleting the iface
423068
def delete(cls, resources, background=False, force=False):
        """"""
        if not isinstance(resources, (list, tuple)):
            resources = [resources]

        ifaces = []
        for item in resources:
            try:
                ip_ = cls.info(item)
            except UsageError:
                cls.error("Can't find this ip %s" % item)

            iface = Iface.info(ip_['iface_id'])
            ifaces.append(iface['id'])

        return Iface.delete(ifaces, background)
1152195
def delete_nic(self, instance_id, port_id):
        """"""
        self.client.servers.interface_detach(instance_id, port_id)
        return True
50409
def delete_network(self, network):
        '''
        
        '''
        net_id = self._find_network_id(network)
        ret = self.network_conn.delete_network(network=net_id)
        return ret if ret else True
1144852
def remove_ipv6addr(self, ipv6addr):
        
        for addr in self.ipv6addrs:
            if ((isinstance(addr, dict) and addr['ipv6addr'] == ipv6addr) or
                (isinstance(addr, HostIPv4) and addr.ipv6addr == ipv6addr)):
                self.ipv6addrs.remove(addr)
                break
1099667
def delete_raw(self):
        
        return client.delete(
            self.path(which='self'),
            **self._server_config.get_client_kwargs()
        )
1252727
def cli(env, identifier):
    """"""

    mgr = SoftLayer.NetworkManager(env.client)
    global_ip_id = helpers.resolve_id(mgr.resolve_global_ip_ids, identifier,
                                      name='global ip')

    if not (env.skip_confirmations or formatting.no_going_back(global_ip_id)):
        raise exceptions.CLIAbort('Aborted')

    mgr.cancel_global_ip(global_ip_id)
143713
def allow(self, ip):
        
        self.whitelist.append(ip)
        self.blacklist.clear()
490874
def delete_host_from_segment(ipaddress, networkaddress, auth, url):
    '''

    '''
    host_id = get_host_id(ipaddress, networkaddress, auth, url)
    remove_scope_ip(host_id, auth.creds, auth.url)
1028695
def Delete(self):
		

		public_ip_set = [{'public_ipId': o.id} for o in self.parent.public_ips if o!=self]
		self.parent.public_ips = [o for o in self.parent.public_ips if o!=self]
		return(clc.v2.Requests(clc.v2.API.Call('DELETE','servers/%s/%s/publicIPAddresses/%s' % (self.parent.server.alias,self.parent.server.id,self.id),
											   session=self.session),
		                       alias=self.parent.server.alias,
							   session=self.session))
5846
def strip_ip_port(ip_address):
    

    # IPv4 with or without port
    if '.' in ip_address:
        cleaned_ip = ip_address.split(':')[0]

    # IPv6 with port
    elif ']:' in ip_address:
        # Remove the port following last ':', and then strip first and last chars for [].
        cleaned_ip = ip_address.rpartition(':')[0][1:-1]

    # IPv6 without port
    else:
        cleaned_ip = ip_address

    return cleaned_ip
638018
def unpack_ip_addr(addr):
    """"""
    if isinstance(addr, bytearray):
        addr = bytes(addr)
    return (socket.inet_ntoa(addr[0:4]), struct.unpack('!H', addr[4:6])[0])
216355
def delete(self, ids):
        
        url = build_uri_with_ids('api/v3/ipv6/%s/', ids)
        return super(ApiIPv6, self).delete(url)
671567
public void serviceName_ips_ip_DELETE(String serviceName, String ip) throws IOException {
		String qPath = "/xdsl/{serviceName}/ips/{ip}";
		StringBuilder sb = path(qPath, serviceName, ip);
		exec(qPath, "DELETE", sb.toString(), null);
	}
718051
def detach(gandi, resource, background, force):
    
    if not force:
        proceed = click.confirm('Are you sure you want to detach ip %s?' %
                                resource)
        if not proceed:
            return

    return gandi.ip.detach(resource, background, force)
250422
protected void releaseIpAddress( String ip ) {
		this.logger.fine( "Releasing IP address: " + ip );
		this.usedIps.remove( ip );
		save( this );
	}
205353
public static base_response delete(nitro_service client, String ipfrom) throws Exception {
		location deleteresource = new location();
		deleteresource.ipfrom = ipfrom;
		return deleteresource.delete_resource(client);
	}
370314
def disable(iface):
    '''
    
    '''
    if is_disabled(iface):
        return True
    cmd = ['netsh', 'interface', 'set', 'interface',
           'name={0}'.format(iface),
           'admin=DISABLED']
    __salt__['cmd.run'](cmd, python_shell=False)
    return is_disabled(iface)