Remove a translation entry from an IPSEC tunnel context.

    A separate configuration request should be made to realize changes on
    network devices.
341230
def cli(env, context_id, translation_id):
    
    manager = SoftLayer.IPSECManager(env.client)
    # ensure translation can be retrieved by given id
    manager.get_translation(context_id, translation_id)

    succeeded = manager.remove_translation(context_id, translation_id)
    if succeeded:
        env.out('Removed translation #{}'.format(translation_id))
    else:
        raise CLIHalt('Failed to remove translation #{}'.format(translation_id))
1299820
def delete_network_postcommit(self, context):
        """"""
        segments = context.network_segments
        network_name = context.current['name']

        for segment in segments:
            if not self.check_segment(segment):
                return  # Not a vlan network
            vlan_id = segment.get(api.SEGMENTATION_ID)
            if not vlan_id:
                return  # No vlan assigned to segment

            port_profile = self.make_profile_name(vlan_id)
            trunk_vlans = (
                CONF.sriov_multivlan_trunk.network_vlans.get(network_name, []))
            self.driver.delete_all_config_for_vlan(vlan_id, port_profile,
                trunk_vlans)
629236
def remove_nio(self, port_number):
        

        if port_number not in self._nios:
            raise DynamipsError("Port {} is not allocated".format(port_number))

        nio = self._nios[port_number]
        if isinstance(nio, NIOUDP):
            self.manager.port_manager.release_udp_port(nio.lport, self._project)
        if self._hypervisor:
            yield from self._hypervisor.send('ethsw remove_nio "{name}" {nio}'.format(name=self._name, nio=nio))

        log.info('Ethernet switch "{name}" [{id}]: NIO {nio} removed from port {port}'.format(name=self._name,
                                                                                              id=self._id,
                                                                                              nio=nio,
                                                                                              port=port_number))

        del self._nios[port_number]
        if port_number in self._mappings:
            del self._mappings[port_number]

        return nio
42681
public static void removeCurrentAuthentication() {
        RequestContext context = RequestContext.getCurrent();
        if (context != null) {
            removeAuthentication(context.getRequest());
        }
    }
108442
def remove_from_tor(self, protocol):
        '''
        
        '''
        r = yield protocol.queue_command('DEL_ONION %s' % self.hostname[:-6])
        if r.strip() != 'OK':
            raise RuntimeError('Failed to remove hidden service: "%s".' % r)
722560
def delete_port_precommit(self, context):
        """"""
        if self._is_supported_deviceowner(context.current):
            vlan_segment, vxlan_segment = self._get_segments(
                                                context.top_bound_segment,
                                                context.bottom_bound_segment)
            vni = self._port_action_vxlan(context.current, vxlan_segment,
                             self._delete_nve_db) if vxlan_segment else 0
            self._port_action_vlan(context.current, vlan_segment,
                                   self._delete_nxos_db, vni)
907281
def router_removed_from_hosting_device(self, context, router):
        """"""
        self._notification(context, 'router_removed_from_hosting_device',
                           [router], operation=None, shuffle_agents=False)
825917
function (entry) {
		if (typeof entry === 'number' && entry < entryServers.length) {
			entryServers.splice(entry, 1);
			return true;
		}
		else if (typeof entry === 'string') {	
			for (var i=0; i < entryServers.length; i++) {
				if (entryServers[i] === entry) {
					entryServers.splice(i, 1);
					SR.Log('remove entry: ' + entry + '. entries left: ' + entryServers.length);						
					return true;	
				}
			}
		}
		return false;
	}
425754
def remove_prefix(self, prefix):
        
        self._req('prefix remove %s' % prefix)
        time.sleep(1)
        self._req('netdataregister')
103145
def remove_nio(self, port_number):
        

        if port_number not in self._nios:
            raise DynamipsError("Port {} is not allocated".format(port_number))

        # remove VCs mapped with the port
        for source, destination in self._active_mappings.copy().items():
            if len(source) == 3 and len(destination) == 3:
                # remove the virtual channels mapped with this port/nio
                source_port, source_vpi, source_vci = source
                destination_port, destination_vpi, destination_vci = destination
                if port_number == source_port:
                    log.info('ATM switch "{name}" [{id}]: unmapping VCC between port {source_port} VPI {source_vpi} VCI {source_vci} and port {destination_port} VPI {destination_vpi} VCI {destination_vci}'.format(name=self._name,
                                                                                                                                                                                                                     id=self._id,
                                                                                                                                                                                                                     source_port=source_port,
                                                                                                                                                                                                                     source_vpi=source_vpi,
                                                                                                                                                                                                                     source_vci=source_vci,
                                                                                                                                                                                                                     destination_port=destination_port,
                                                                                                                                                                                                                     destination_vpi=destination_vpi,
                                                                                                                                                                                                                     destination_vci=destination_vci))
                    yield from self.unmap_pvc(source_port, source_vpi, source_vci, destination_port, destination_vpi, destination_vci)
                    yield from self.unmap_pvc(destination_port, destination_vpi, destination_vci, source_port, source_vpi, source_vci)
            else:
                # remove the virtual paths mapped with this port/nio
                source_port, source_vpi = source
                destination_port, destination_vpi = destination
                if port_number == source_port:
                    log.info('ATM switch "{name}" [{id}]: unmapping VPC between port {source_port} VPI {source_vpi} and port {destination_port} VPI {destination_vpi}'.format(name=self._name,
                                                                                                                                                                              id=self._id,
                                                                                                                                                                              source_port=source_port,
                                                                                                                                                                              source_vpi=source_vpi,
                                                                                                                                                                              destination_port=destination_port,
                                                                                                                                                                              destination_vpi=destination_vpi))
                    yield from self.unmap_vp(source_port, source_vpi, destination_port, destination_vpi)
                    yield from self.unmap_vp(destination_port, destination_vpi, source_port, source_vpi)

        nio = self._nios[port_number]
        if isinstance(nio, NIOUDP):
            self.manager.port_manager.release_udp_port(nio.lport, self._project)
        log.info('ATM switch "{name}" [{id}]: NIO {nio} removed from port {port}'.format(name=self._name,
                                                                                         id=self._id,
                                                                                         nio=nio,
                                                                                         port=port_number))

        del self._nios[port_number]
        return nio
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)
259073
protected void removeDestination(DestinationHandler dh)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "removeDestination", dh);

        if (dh.isLink())
        {
            if (linkIndex.containsKey(dh))
            {
                linkIndex.remove(dh);
            }
        }
        else
        {
            if (destinationIndex.containsKey(dh))
            {
                destinationIndex.remove(dh);
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "removeDestination");
    }
1128213
def _remove_qs(self, url):
        '''
        
        '''
        scheme, netloc, path, query, fragment = urlsplit(url)

        return urlunsplit((scheme, netloc, path, '', fragment))
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
1199622
def remove_hash_prefix_indices(self, threat_list, indices):
        """"""
        batch_size = 40
        q = '''DELETE FROM hash_prefix
                WHERE threat_type=? AND platform_type=? AND threat_entry_type=? AND value IN ({})
        '''
        prefixes_to_remove = self.get_hash_prefix_values_to_remove(threat_list, indices)
        with self.get_cursor() as dbc:
            for i in range(0, len(prefixes_to_remove), batch_size):
                remove_batch = prefixes_to_remove[i:(i + batch_size)]
                params = [
                    threat_list.threat_type,
                    threat_list.platform_type,
                    threat_list.threat_entry_type
                ] + [sqlite3.Binary(b) for b in remove_batch]
                dbc.execute(q.format(','.join(['?'] * len(remove_batch))), params)
533140
def delete_vlan_entry(self, vlan_id):
        """"""
        with self.session.begin(subtransactions=True):
            try:
                self.session.query(ucsm_model.PortProfile).filter_by(
                    vlan_id=vlan_id).delete()
            except orm.exc.NoResultFound:
                return
580024
def _clean_line(self, l):
        ''''''

        new_line = self._sub_ip(l)                  # IP substitution
        new_line = self._sub_hostname(new_line)     # Hostname substitution
        new_line = self._sub_keywords(new_line)     # Keyword Substitution

        return new_line