Delete all the resource attribute mappings in a network. If another network
        is specified, only delete the mappings between the two networks.
433573
def delete_mappings_in_network(network_id, network_2_id=None, **kwargs):
    
    qry = db.DBSession.query(ResourceAttrMap).filter(or_(ResourceAttrMap.network_a_id == network_id, ResourceAttrMap.network_b_id == network_id))

    if network_2_id is not None:
        qry = qry.filter(or_(ResourceAttrMap.network_a_id==network_2_id, ResourceAttrMap.network_b_id==network_2_id))

    mappings = qry.all()

    for m in mappings:
        db.DBSession.delete(m)
    db.DBSession.flush()

    return 'OK'
1277649
def delete(self, using=None, **kwargs):
        
        return self._get_connection(using).indices.delete(index=self._name, **kwargs)
1289060
def delete(self):
        

        es = connections.get_connection(self._using)

        return AttrDict(
            es.delete_by_query(
                index=self._index,
                body=self.to_dict(),
                **self._params
            )
        )
1372510
def clear(self):
        
        # self.graph = nx.Graph()
        self.graph.clear()
        self.data.clear()
        self.descriptors.clear()
        self.size2d = None
        self.rings = None
        self.scaffolds = None
        self.isolated = None
1278006
def delete_subnet(self, subnet):
        '''
        
        '''
        subnet_id = self._find_subnet_id(subnet)
        ret = self.network_conn.delete_subnet(subnet=subnet_id)
        return ret if ret else True
813696
def delete_subnetwork(kwargs=None, call=None):
    '''
    
    '''
    if call != 'function':
        raise SaltCloudSystemExit(
            'The delete_subnet function must be called with -f or --function.'
        )

    if not kwargs or 'name' not in kwargs:
        log.error(
            'Must specify name of subnet.'
        )
        return False

    if 'region' not in kwargs:
        log.error(
            'Must specify region of subnet.'
        )
        return False

    name = kwargs['name']
    region = kwargs['region']
    conn = get_conn()

    __utils__['cloud.fire_event'](
        'event',
        'deleting subnetwork',
        'salt/cloud/subnet/deleting',
        args={
            'name': name,
            'region': region
        },
        sock_dir=__opts__['sock_dir'],
        transport=__opts__['transport']
    )

    try:
        result = conn.ex_destroy_subnetwork(name, region)
    except ResourceNotFoundError as exc:
        log.error(
            'Subnetwork %s was not found. Exception was: %s',
            name, exc, exc_info_on_loglevel=logging.DEBUG
        )
        return False

    __utils__['cloud.fire_event'](
        'event',
        'deleted subnetwork',
        'salt/cloud/subnet/deleted',
        args={
            'name': name,
            'region': region
        },
        sock_dir=__opts__['sock_dir'],
        transport=__opts__['transport']
    )
    return result
1307650
def deletephysicalnetwork(check_processor = default_physicalnetwork_delete_check,
                                reorder_dict = default_iterate_dict):
    
    def walker(walk, write, timestamp, parameters_dict):
        for key, parameters in reorder_dict(parameters_dict):
            try:
                value = walk(key)
            except KeyError:
                pass
            else:
                id_ = parameters['id']
                try:
                    phy_map = walk(PhysicalNetworkMap.default_key(id_))
                except KeyError:
                    pass
                else:
                    check_processor(value, phy_map, walk, write, parameters=parameters)
                    write(phy_map.getkey(), None)
                try:
                    phynetset = walk(PhysicalNetworkSet.default_key())
                except KeyError:
                    pass
                else:
                    phynetset.set.dataset().discard(value.create_weakreference())
                    write(phynetset.getkey(), phynetset)
                write(key, None)
    return walker
558071
def remove_network(self, net_id):
        
        url = self._url("/networks/{0}", net_id)
        res = self._delete(url)
        self._raise_for_status(res)
725144
def remove(self, resource, **kwargs):
        
        log.info(
            "Removing {} '{}'...".format(self._model_name, resource.name))
        resource.remove(**kwargs)
        self._ids.remove(resource.id)
1024236
def delete_network_interface(
        name=None, network_interface_id=None, region=None, key=None,
        keyid=None, profile=None):
    '''
    
    '''
    if not (name or network_interface_id):
        raise SaltInvocationError(
            'Either name or network_interface_id must be provided.'
        )
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
    r = {}
    result = _get_network_interface(conn, name, network_interface_id)
    if 'error' in result:
        return result
    eni = result['result']
    try:
        info = _describe_network_interface(eni)
        network_interface_id = info['id']
    except KeyError:
        r['error'] = {'message': 'ID not found for this network interface.'}
        return r
    try:
        r['result'] = conn.delete_network_interface(network_interface_id)
    except boto.exception.EC2ResponseError as e:
        r['error'] = __utils__['boto.get_error'](e)
    return r
204311
def remove_nodes(self, indices):
        

        self.molecule.remove_sites(indices)
        self.graph.remove_nodes_from(indices)

        mapping = {}
        for correct, current in enumerate(sorted(self.graph.nodes)):
            mapping[current] = correct

        nx.relabel_nodes(self.graph, mapping, copy=False)
        self.set_node_attributes()
667951
@Override
    public void removeAllResourses() throws Exception {
        synchronized (this) {
            if (!this.started) {
                throw new Exception(String.format("Management=%s not started", this.name));
            }

            if (this.associations.size() == 0 && this.servers.size() == 0)
                // no resources allocated - nothing to do
                return;

            if (logger.isInfoEnabled()) {
                logger.info(String.format("Removing allocated resources: Servers=%d, Associations=%d", this.servers.size(),
                        this.associations.size()));
            }

            // Remove all associations
            ArrayList<String> lst = new ArrayList<String>();
            for (FastMap.Entry<String, Association> n = this.associations.head(), end = this.associations.tail(); (n = n
                    .getNext()) != end;) {
                lst.add(n.getKey());
            }
            for (String n : lst) {
                this.stopAssociation(n);
                this.removeAssociation(n);
            }

            // Remove all servers
            lst.clear();
            for (FastList.Node<Server> n = this.servers.head(), end = this.servers.tail(); (n = n.getNext()) != end;) {
                lst.add(n.getValue().getName());
            }
            for (String n : lst) {
                this.stopServer(n);
                this.removeServer(n);
            }

            // We store the cleared state
            this.store();

            for (ManagementEventListener lstr : managementEventListeners) {
                try {
                    lstr.onRemoveAllResources();
                } catch (Throwable ee) {
                    logger.error("Exception while invoking onRemoveAllResources", ee);
                }
            }
        }

    }
44218
public static base_responses delete(nitro_service client, route resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			route deleteresources[] = new route[resources.length];
			for (int i=0;i<resources.length;i++){
				deleteresources[i] = new route();
				deleteresources[i].network = resources[i].network;
				deleteresources[i].netmask = resources[i].netmask;
				deleteresources[i].gateway = resources[i].gateway;
				deleteresources[i].td = resources[i].td;
			}
			result = delete_bulk_request(client, deleteresources);
		}
		return result;
	}
207962
public void clearResourceSet(final ResourceSet resourceSet) {
    final boolean wasDeliver = resourceSet.eDeliver();
    try {
      resourceSet.eSetDeliver(false);
      resourceSet.getResources().clear();
    } finally {
      resourceSet.eSetDeliver(wasDeliver);
    }
  }
464147
def delete_network(kwargs=None, call=None):
    '''
    
    '''
    if call != 'function':
        raise SaltCloudSystemExit(
            'The delete_network function must be called with -f or --function.'
        )

    if not kwargs or 'name' not in kwargs:
        log.error(
            'A name must be specified when deleting a network.'
        )
        return False

    name = kwargs['name']
    conn = get_conn()

    __utils__['cloud.fire_event'](
        'event',
        'deleting network',
        'salt/cloud/net/deleting',
        args={
            'name': name,
        },
        sock_dir=__opts__['sock_dir'],
        transport=__opts__['transport']
    )

    try:
        result = conn.ex_destroy_network(
            conn.ex_get_network(name)
        )
    except ResourceNotFoundError as exc:
        log.error(
            'Nework %s was not found. Exception was: %s',
            name, exc, exc_info_on_loglevel=logging.DEBUG
        )
        return False

    __utils__['cloud.fire_event'](
        'event',
        'deleted network',
        'salt/cloud/net/deleted',
        args={
            'name': name,
        },
        sock_dir=__opts__['sock_dir'],
        transport=__opts__['transport']
    )
    return result
747573
def del_node(self, node):
        
        for each in list(self.neighbors(node)):
            if (each != node):
                self.del_edge((each, node))
        del(self.node_neighbors[node])
        del(self.node_attr[node])
569444
def delete_all( name )
      rv = []
      each_attribute { |attribute| 
        rv << attribute if attribute.expanded_name == name
      }
      rv.each{ |attr| attr.remove }
      return rv
    end