Removes an associated UDP port number from this project.

        :param port: UDP port number
322823
def remove_udp_port(self, port):
        

        if port in self._used_udp_ports:
            self._used_udp_ports.remove(port)
620584
def get_free_udp_port(self, project):
        
        port = self.find_unused_port(self._udp_port_range[0],
                                     self._udp_port_range[1],
                                     host=self._udp_host,
                                     socket_type="UDP",
                                     ignore_ports=self._used_udp_ports)

        self._used_udp_ports.add(port)
        project.record_udp_port(port)
        log.debug("UDP port {} has been allocated".format(port))
        return port
124613
def delete_port_if_removed(self, port):
        """"""
        instance_type = self.get_instance_type(port)
        if not instance_type:
            return
        port_type = instance_type + a_const.PORT_SUFFIX
        if not db_lib.port_provisioned(port['id']):
            p_res = MechResource(port['id'], port_type, a_const.DELETE)
            self.provision_queue.put(p_res)
107890
def setUdpJoinerPort(self, portNumber):
        
        print '%s call setUdpJoinerPort' % self.port
        cmd = 'joinerport %d' % portNumber
        print cmd
        return self.__sendCommand(cmd)[0] == 'Done'
703887
def _delete_port_channel_resources(self, host_id, switch_ip,
                                       intf_type, nexus_port, port_id):
        ''''''

        # if this connection is not a port-channel, nothing to do.
        if intf_type != 'port-channel':
            return

        # Check if this driver created it and its no longer needed.
        try:
            vpc = nxos_db.get_switch_vpc_alloc(
                switch_ip, nexus_port)
        except excep.NexusVPCAllocNotFound:
            # This can occur for non-baremetal configured
            # port-channels.  Nothing more to do.
            LOG.debug("Switch %s portchannel %s vpc entry not "
                      "found in vpcid alloc table.",
                      switch_ip, nexus_port)
            return

        # if this isn't one which was allocated or learned,
        # don't do any further processing.
        if not vpc.active:
            LOG.debug("Switch %s portchannel %s vpc entry not "
                      "active.",
                      switch_ip, nexus_port)
            return

        # Is this port-channel still in use?
        # If so, nothing more to do.
        try:
            nxos_db.get_nexus_switchport_binding(port_id, switch_ip)
            LOG.debug("Switch %s portchannel %s port entries "
                      "in use. Skipping port-channel clean-up.",
                      switch_ip, nexus_port)
            return
        except excep.NexusPortBindingNotFound:
            pass

        # need to get ethernet interface name
        try:
            mapping = nxos_db.get_switch_and_host_mappings(
                host_id, switch_ip)
            eth_type, eth_port = nexus_help.split_interface_name(
                mapping[0].if_id)
        except excep.NexusHostMappingNotFound:
            LOG.warning("Switch %s hostid %s host_mapping not "
                        "found. Skipping port-channel clean-up.",
                        switch_ip, host_id)
            return

        # Remove the channel group from ethernet interface
        # and remove port channel from this switch.
        if not vpc.learned:
            self.driver.delete_ch_grp_to_interface(
                switch_ip, eth_type, eth_port,
                nexus_port)
            self.driver.delete_port_channel(switch_ip,
                nexus_port)
        try:
            nxos_db.free_vpcid_for_switch(nexus_port, switch_ip)
            LOG.info("Released portchannel %s resources for "
                     "switch %s",
                     nexus_port, switch_ip)
        except excep.NexusVPCAllocNotFound:
            # Not all learned port channels will be in this db when
            # they're outside the configured vpc_pool so
            # this exception may be possible.
            LOG.warning("Failed to free vpcid %s for switch %s "
                        "since it did not exist in table.",
                        nexus_port, switch_ip)
684087
def RemoveForwardedIp(self, address, interface):
    
    ip = netaddr.IPNetwork(address)
    self._RunIfconfig(args=[interface, '-alias', str(ip.ip)])
1162266
def get_free_udp_port():
    '''
    
    '''
    import socket
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.bind(('localhost', 0))
    addr = sock.getsockname()
    sock.close()
    return addr[1]
86720
def delete(gandi, webacc, vhost, backend, port):
    
    result = []
    if webacc:
        result = gandi.webacc.delete(webacc)

    if backend:
        backends = backend
        for backend in backends:
            if 'port' not in backend:
                if not port:
                    backend['port'] = click.prompt('Please set a port for '
                                                   'backends. If you want to '
                                                   ' different port for '
                                                   'each backend, use `-b '
                                                   'ip:port`', type=int)
                else:
                    backend['port'] = port
            result = gandi.webacc.backend_remove(backend)

    if vhost:
        vhosts = vhost
        for vhost in vhosts:
            result = gandi.webacc.vhost_remove(vhost)

    return result
1086963
function (ports) {
	
	var port = ports[0];

	var list = '';
	for (var i=0; i < ports.length; i++) {
		list += (ports[i] + ', ');
		delete l_ports[ports[i]];
	}

	LOG.warn('release ports: ' + list, 'SR.Monitor');
	
	// remove all other ports associated with this port
	for (var i in l_ports) {
		if (l_ports[i] === port) {
			LOG.warn('release port: ' + i, 'SR.Monitor');
			delete l_ports[i];
		}
	}
}
122275
def clear_oui(self, port_uuid):
        
        if port_uuid in self.oui_vif_map:
            del self.oui_vif_map[port_uuid]
        else:
            LOG.debug("OUI does not exist")
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
686645
def ensure_port_cleanup(bound_addresses, maxtries=30, sleeptime=2):
    
    atexit.register(_cleanup_ports, bound_addresses, maxtries=maxtries,
                    sleeptime=sleeptime)
380671
def remove(self, transport):
        
        if transport.uid in self.transports:
            del (self.transports[transport.uid])
1294677
def delete_port(self, port):
        '''
        
        '''
        port_id = self._find_port_id(port)
        ret = self.network_conn.delete_port(port=port_id)
        return ret if ret else True
955733
def _delete_port_profile_from_ucsm(self, handle, port_profile, ucsm_ip):
        """"""
        port_profile_dest = (const.PORT_PROFILESETDN + const.VNIC_PATH_PREFIX +
                             port_profile)
        handle.StartTransaction()

        # Find port profile on the UCS Manager
        p_profile = handle.GetManagedObject(
            None,
            self.ucsmsdk.VnicProfile.ClassId(),
            {self.ucsmsdk.VnicProfile.NAME: port_profile,
            self.ucsmsdk.VnicProfile.DN: port_profile_dest})

        if p_profile:
            handle.RemoveManagedObject(p_profile)
        else:
            LOG.warning('UCS Manager network driver did not find '
                        'Port Profile %s to delete.',
                        port_profile)

        handle.CompleteTransaction()
1291225
public final UdpServer port(int port) {
		return bootstrap(b -> b.localAddress(getHost(b), port));
	}
407915
def Delete(self):
		

		self.public_ip.ports = [o for o in self.public_ip.ports if o!=self]

		return(self.public_ip.Update())