Remove a DNS record
497189
def del_record(self, dns_record_type, host):
        """"""
        rec = self.get_record(dns_record_type, host)
        if rec:
            self._entries = list(set(self._entries) - set([rec]))
        return True
558071
def remove_network(self, net_id):
        
        url = self._url("/networks/{0}", net_id)
        res = self._delete(url)
        self._raise_for_status(res)
957677
def switch_delete_record_for_nic(self, userid, interface):
        """"""
        with get_network_conn() as conn:
            conn.execute("DELETE FROM switch WHERE userid=? and interface=?",
                         (userid, interface))
            LOG.debug("Switch record for user %s with nic %s is removed from "
                      "switch table" % (userid, interface))
572431
def delete_domain(self, domain, params=None):
        ''' 
        '''
        params = update_params(params, {'domain': domain})
        return self.request('/v1/dns/delete_domain', params, 'POST')
398576
def _RemoveForwardedIps(self, forwarded_ips, interface):
    
    for address in forwarded_ips:
      self.ip_forwarding_utils.RemoveForwardedIp(address, interface)
626622
def remove_host_mapping(interface, nexus_ip):
    """"""

    LOG.debug("remove_host_mapping() called")
    session = bc.get_writer_session()
    try:
        mapping = _lookup_one_host_mapping(
                      session=session,
                      if_id=interface,
                      switch_ip=nexus_ip)
        session.delete(mapping)
        session.flush()
    except c_exc.NexusHostMappingNotFound:
        pass
684087
def RemoveForwardedIp(self, address, interface):
    
    ip = netaddr.IPNetwork(address)
    self._RunIfconfig(args=[interface, '-alias', str(ip.ip)])
838681
def get_dyndns_records(login, password):
    """"""
    params = dict(action='getdyndns', sha=get_auth_key(login, password))
    response = requests.get('http://freedns.afraid.org/api/', params=params, timeout=timeout)
    raw_records = (line.split('|') for line in response.content.split())

    try:
        records = frozenset(DnsRecord(*record) for record in raw_records)
    except TypeError:
        raise ApiError("Couldn't parse the server's response",
                response.content)

    return records
139772
def floating_ip_disassociate(self, server_name, floating_ip):
        '''
        
        '''
        nt_ks = self.compute_conn
        server_ = self.server_by_name(server_name)
        server = nt_ks.servers.get(server_.__dict__['id'])
        server.remove_floating_ip(floating_ip)
        return self.floating_ip_list()[floating_ip]
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)
74677
def deleteMetadata(self, remote, address, key):
        """"""
        try:
            return self.proxies["%s-%s" % (self._interface_id, remote)].deleteMetadata(address, key)
        except Exception as err:
            LOG.debug("ServerThread.deleteMetadata: Exception: %s" % str(err))
255619
def parse_delete(prs, conn):
    
    prs_delete = prs.add_parser(
        'delete', help='delete a record of specific zone')
    set_option(prs_delete, 'domain')
    conn_options(prs_delete, conn)
    prs_delete.set_defaults(func=delete)
251531
def delete_record(self, domain, record):
        
        uri = "/domains/%s/records/%s" % (utils.get_id(domain),
                utils.get_id(record))
        resp, resp_body = self._async_call(uri, method="DELETE",
                error_class=exc.DomainRecordDeletionFailed, has_response=False)
        return resp_body
341476
def remove(self):
        '''
        
        '''
        print 'remove'
        if self.exists():
            print 'cleaning', self.venv
            run('rm -rf {}'.format(self.venv))
398364
def _delete_record(self, identifier=None, rtype=None, name=None, content=None):
        """"""
        return self._change_record_sets('DELETE', rtype, name, content)
559678
def remove_address(self, fqdn, address):
        " "

        # Get a list of addresses.
        for record in self.list_address(fqdn):
            if record.address == address:
                record.delete()
                break
1132328
def _delete_record(self, identifier=None, rtype=None, name=None, content=None):
        
        if not identifier:
            records = self._list_records(rtype, name, content)
            identifiers = [record["id"] for record in records]
        else:
            identifiers = [identifier]

        LOGGER.debug("delete_records: %s", identifiers)

        for record_id in identifiers:
            self._delete(
                "/v1/domains/{0}/records/{1}".format(
                    self.domain, record_id
                )
            )
            LOGGER.debug("delete_record: %s", record_id)

        LOGGER.debug("delete_record: %s", True)
        return True