Remove all records for the host.

        :param str hostname: Hostname to remove
        :rtype: bool
483343
def delete_old_host(self, hostname):
        
        host = Host(self.session, name=hostname)
        return host.delete()
957695
def destroy_dns_records(fqdn):
    '''
    
    '''
    domain = '.'.join(fqdn.split('.')[-2:])
    hostname = '.'.join(fqdn.split('.')[:-2])
    # TODO: remove this when the todo on 754 is available
    try:
        response = query(method='domains', droplet_id=domain, command='records')
    except SaltCloudSystemExit:
        log.debug('Failed to find domains.')
        return False
    log.debug("found DNS records: %s", pprint.pformat(response))
    records = response['domain_records']

    if records:
        record_ids = [r['id'] for r in records if r['name'].decode() == hostname]
        log.debug("deleting DNS record IDs: %s", record_ids)
        for id_ in record_ids:
            try:
                log.info('deleting DNS record %s', id_)
                ret = query(
                    method='domains',
                    droplet_id=domain,
                    command='records/{0}'.format(id_),
                    http_method='delete'
                )
            except SaltCloudSystemExit:
                log.error('failed to delete DNS domain %s record ID %s.', domain, hostname)
            log.debug('DNS deletion REST call returned: %s', pprint.pformat(ret))

    return False
300367
def vhost_remove(cls, name):
        
        oper = cls.call('hosting.rproxy.vhost.delete', name)
        cls.echo('Deleting your virtual host %s' % name)
        cls.display_progress(oper)
        cls.echo('Your virtual host have been removed')
        return oper
211527
def clear_host_port(self):
        
        if self.host_port:
            self._adb.forward(['--remove', 'tcp:%d' % self.host_port])
            self.host_port = None
367854
def uninstall_host(trg_queue, *hosts, **kwargs):
    ''''''
    # immediately down the queue
    item_user = kwargs.pop('item_user', None)
    item_group = kwargs.pop('item_group', None)
    item_mode = kwargs.pop('item_mode', None)
    for host in hosts:
    # immediately down the queue
        try:
            down_host(trg_queue, host, user=item_user, group=item_group,
                 mode=(_c.FSQ_ITEM_MODE if item_mode is None else item_mode))
        except FSQError, e:
            raise FSQInstallError(e.errno, wrap_io_os_err(e))
        tmp_full, tmp_queue = _tmp_trg(host, fsq_path.hosts(trg_queue))
        _remove_dir(fsq_path.base(trg_queue, host), tmp_full, trg_queue)
10923
private void removeForeignHost(final int hostId) {
        ImmutableCollection<ForeignHost> fhs = m_foreignHosts.get(hostId);
        synchronized (m_mapLock) {
            m_foreignHosts = ImmutableMultimap.<Integer, ForeignHost>builder()
                    .putAll(Multimaps.filterKeys(m_foreignHosts, not(equalTo(hostId))))
                    .build();

            Predicate<Long> hostIdNotEqual = new Predicate<Long>() {
                @Override
                public boolean apply(Long intput) {
                    return CoreUtils.getHostIdFromHSId(intput) != hostId;
                }
            };

            m_fhMapping = ImmutableMap.<Long, ForeignHost>builder()
                    .putAll(Maps.filterKeys(m_fhMapping, hostIdNotEqual))
                    .build();
        }
        assert(Thread.holdsLock(this)); // Make sure m_zombieForeignHosts is protected
        ArrayList<ForeignHost> picoNetworkZombies = m_picoZombieForeignHosts.get(hostId);
        ArrayList<ForeignHost> zookeeperZombies = new ArrayList<>(fhs.size());
        for (ForeignHost fh : fhs) {
            if (picoNetworkZombies != null && picoNetworkZombies.contains(fh)) {
                picoNetworkZombies.remove(fh);
            }
            else {
                zookeeperZombies.add(fh);
            }
            fh.close();
        }
        if (picoNetworkZombies != null && picoNetworkZombies.isEmpty()) {
            m_picoZombieForeignHosts.remove(hostId);
        }
        if (!zookeeperZombies.isEmpty()) {
            m_zkZombieForeignHosts.put(hostId, zookeeperZombies);
        }
    }
733004
def delete_host(mac=None, name=None):
    '''
    
    '''
    if not (mac or name):
        raise TypeError('At least one argument is required')
    o = _conn()
    msg = omapi.OmapiMessage.open(b'host')
    if mac:
        msg.obj.append((b'hardware-address', omapi.pack_mac(mac)))
        msg.obj.append((b'hardware-type', struct.pack(b'!I', 1)))
    if name:
        msg.obj.append((b'name', salt.utils.stringutils.to_bytes(name)))
    response = o.query_server(msg)
    if response.opcode != omapi.OMAPI_OP_UPDATE:
        return None
    if response.handle == 0:
        return False
    response = o.query_server(omapi.OmapiMessage.delete(response.handle))
    if response.opcode != omapi.OMAPI_OP_STATUS:
        return False
    return True
1111613
def delete_records(self, zone_name, record_type, subdomain):
        
        records = self._client.get('/domain/zone/{}/record'.format(zone_name),
                                   fieldType=record_type, subDomain=subdomain)
        for record in records:
            self.delete_record(zone_name, record)
1289032
def _get_host(self, hostname):
        
        if hostname not in self.hosts:
            self.hosts[hostname] = {
                'groups': set(),
                'hostvars': {}
            }
        return self.hosts[hostname]
879055
def remove(cls, name):
        

        client = Client.instance()

        new_current_database = None

        if client.database != name:
            new_current_database = name

        # Deletions are only possible from the system database
        client.set_database(name=SYSTEM_DATABASE)

        api = client.api
        api.database(name).delete()

        if new_current_database:
            client.set_database(name=new_current_database)
1090360
def purge_table(self, name):
        
        if name in self._table_cache:
            del self._table_cache[name]

        proxy = StorageProxy(self._storage, name)
        proxy.purge_table()
1134392
def index_delete(index, hosts=None, profile=None):
    '''
    
    '''
    es = _get_instance(hosts, profile)

    try:
        result = es.indices.delete(index=index)

        return result.get('acknowledged', False)
    except elasticsearch.exceptions.NotFoundError:
        return True
    except elasticsearch.TransportError as e:
        raise CommandExecutionError("Cannot delete index {0}, server returned code {1} with message {2}".format(index, e.status_code, e.error))
1163087
def delete(*keys, **connection_args):
    '''
    
    '''
    # Get connection args from keywords if set
    conn_args = {}
    for arg in ['host', 'port', 'db', 'password']:
        if arg in connection_args:
            conn_args[arg] = connection_args[arg]

    server = _connect(**conn_args)
    return server.delete(*keys)
360453
def unset(self, host, *args):
        
        self.__check_host_args(host, args)
        remove_idx = [idx for idx, x in enumerate(self.lines_)
                      if x.host == host and x.key.lower() in args]
        for idx in reversed(sorted(remove_idx)):
            del self.lines_[idx]
882248
@Override
	public synchronized void removeHost(Host host) {

        if( log.isDebugEnabled() )
            log.debug("Removing host[" + host.getName() + "]");

        // Is this Host actually among those that are defined?
        boolean found = false;
        for (int i = 0; i < engines.length; i++) {
            Container hosts[] = engines[i].findChildren();
            for (int j = 0; j < hosts.length; j++) {
                if (host == (Host) hosts[j]) {
                    found = true;
                    break;

                }
            }
            if (found)
                break;
        }
        if (!found)
            return;

        // Remove this Host from the associated Engine
        if( log.isDebugEnabled() )
            log.debug(" Removing this Host");
        host.getParent().removeChild(host);

    }
943950
def remove_all_static_host_mappings():
    """"""

    LOG.debug("remove_host_mapping() called")
    session = bc.get_writer_session()
    try:
        mapping = _lookup_all_host_mappings(
                      session=session,
                      is_static=True)
        for host in mapping:
            session.delete(host)
        session.flush()
    except c_exc.NexusHostMappingNotFound:
        pass
770294
def delete_table(self, tablename):
        
        self.tables = filter(lambda x: x.name != tablename, self.tables)