def absent(name, zone, data=None, rdtype=None, **kwargs):
    '''
    Ensures that the named DNS record is absent.

    name
        The host portion of the DNS record, e.g., 'webserver'. Name and zone
        are concatenated when the entry is created unless name includes a
        trailing dot, so make sure that information is not duplicated in these
        two arguments.

    zone
        The zone to check

    data
        Data for the DNS record. E.g., the IP address for an A record. If omitted,
        all records matching name (and rdtype, if provided) will be purged.

    rdtype
        DNS resource type. If omitted, all types will be purged.

    ``**kwargs``
        Additional arguments the ddns.update function may need (e.g.
        nameserver, keyfile, keyname).  Note that the nsupdate key file can’t
        be reused by this function, the keyfile and other arguments must
        follow the `dnspython <http://www.dnspython.org/>`_ spec.
    '''
    ret = {'name': name,
           'changes': {},
           'result': False,
           'comment': ''}

    if __opts__['test']:
        ret['result'] = None
        ret['comment'] = '{0} record "{1}" will be deleted'.format(rdtype, name)
        return ret

    status = __salt__['ddns.delete'](zone, name, rdtype, data, **kwargs)

    if status is None:
        ret['result'] = True
        ret['comment'] = 'No matching DNS record(s) present'
    elif status:
        ret['result'] = True
        ret['comment'] = 'Deleted DNS record(s)'
        ret['changes'] = {'Deleted': {'name': name,
                                      'zone': zone
                                     }
                         }
    else:
        ret['result'] = False
        ret['comment'] = 'Failed to delete DNS record(s)'
    return ret
def absent ( name , zone , data = None , rdtype = None , ** kwargs ) : ret = { 'name' : name , 'changes' : { } , 'result' : False , 'comment' : '' } if __opts__ [ 'test' ] : ret [ 'result' ] = None ret [ 'comment' ] = '{0} record "{1}" will be deleted' . format ( rdtype , name ) return ret status = __salt__ [ 'ddns.delete' ] ( zone , name , rdtype , data , ** kwargs ) if status is None : ret [ 'result' ] = True ret [ 'comment' ] = 'No matching DNS record(s) present' elif status : ret [ 'result' ] = True ret [ 'comment' ] = 'Deleted DNS record(s)' ret [ 'changes' ] = { 'Deleted' : { 'name' : name , 'zone' : zone } } else : ret [ 'result' ] = False ret [ 'comment' ] = 'Failed to delete DNS record(s)' return ret
Ensures that the named DNS record is absent.

    name
        The host portion of the DNS record, e.g., 'webserver'. Name and zone
        are concatenated when the entry is created unless name includes a
        trailing dot, so make sure that information is not duplicated in these
        two arguments.

    zone
        The zone to check

    data
        Data for the DNS record. E.g., the IP address for an A record. If omitted,
        all records matching name (and rdtype, if provided) will be purged.

    rdtype
        DNS resource type. If omitted, all types will be purged.

    ``**kwargs``
        Additional arguments the ddns.update function may need (e.g.
        nameserver, keyfile, keyname).  Note that the nsupdate key file can’t
        be reused by this function, the keyfile and other arguments must
        follow the `dnspython <http://www.dnspython.org/>`_ spec.