/usr/lib/python3.6/site-packages/dns/__pycache__
NameSizeModeActions
dnssec.cpython-36.opt-1.pyc108440644editdlrm
dnssec.cpython-36.pyc109150644editdlrm
e164.cpython-36.opt-1.pyc26630644editdlrm
e164.cpython-36.pyc26630644editdlrm
edns.cpython-36.opt-1.pyc44070644editdlrm
edns.cpython-36.pyc44070644editdlrm
entropy.cpython-36.opt-1.pyc32830644editdlrm
entropy.cpython-36.pyc32830644editdlrm
exception.cpython-36.opt-1.pyc36970644editdlrm
exception.cpython-36.pyc39080644editdlrm
flags.cpython-36.opt-1.pyc21700644editdlrm
flags.cpython-36.pyc21700644editdlrm
grange.cpython-36.opt-1.pyc9040644editdlrm
grange.cpython-36.pyc9620644editdlrm
hash.cpython-36.opt-1.pyc4750644editdlrm
hash.cpython-36.pyc4750644editdlrm
inet.cpython-36.opt-1.pyc23160644editdlrm
inet.cpython-36.pyc23160644editdlrm
ipv4.cpython-36.opt-1.pyc13580644editdlrm
ipv4.cpython-36.pyc13580644editdlrm
ipv6.cpython-36.opt-1.pyc29880644editdlrm
ipv6.cpython-36.pyc29880644editdlrm
message.cpython-36.opt-1.pyc326220644editdlrm
message.cpython-36.pyc326220644editdlrm
name.cpython-36.opt-1.pyc271260644editdlrm
name.cpython-36.pyc271260644editdlrm
namedict.cpython-36.opt-1.pyc28550644editdlrm
namedict.cpython-36.pyc28550644editdlrm
node.cpython-36.opt-1.pyc55340644editdlrm
node.cpython-36.pyc55340644editdlrm
opcode.cpython-36.opt-1.pyc20500644editdlrm
opcode.cpython-36.pyc20500644editdlrm
query.cpython-36.opt-1.pyc137480644editdlrm
query.cpython-36.pyc137480644editdlrm
rcode.cpython-36.opt-1.pyc24870644editdlrm
rcode.cpython-36.pyc24870644editdlrm
rdata.cpython-36.opt-1.pyc143550644editdlrm
rdata.cpython-36.pyc143550644editdlrm
rdataclass.cpython-36.opt-1.pyc25080644editdlrm
rdataclass.cpython-36.pyc25080644editdlrm
rdataset.cpython-36.opt-1.pyc95110644editdlrm
rdataset.cpython-36.pyc95500644editdlrm
rdatatype.cpython-36.opt-1.pyc45010644editdlrm
rdatatype.cpython-36.pyc45010644editdlrm
renderer.cpython-36.opt-1.pyc97400644editdlrm
renderer.cpython-36.pyc98270644editdlrm
resolver.cpython-36.opt-1.pyc357760644editdlrm
resolver.cpython-36.pyc357760644editdlrm
reversename.cpython-36.opt-1.pyc25930644editdlrm
reversename.cpython-36.pyc25930644editdlrm
rrset.cpython-36.opt-1.pyc52390644editdlrm
rrset.cpython-36.pyc52390644editdlrm
set.cpython-36.opt-1.pyc79030644editdlrm
set.cpython-36.pyc79030644editdlrm
tokenizer.cpython-36.opt-1.pyc145070644editdlrm
tokenizer.cpython-36.pyc145070644editdlrm
tsig.cpython-36.opt-1.pyc62090644editdlrm
tsig.cpython-36.pyc62090644editdlrm
tsigkeyring.cpython-36.opt-1.pyc10550644editdlrm
tsigkeyring.cpython-36.pyc10550644editdlrm
ttl.cpython-36.opt-1.pyc13200644editdlrm
ttl.cpython-36.pyc13200644editdlrm
update.cpython-36.opt-1.pyc70940644editdlrm
update.cpython-36.pyc70940644editdlrm
version.cpython-36.opt-1.pyc4500644editdlrm
version.cpython-36.pyc4500644editdlrm
wiredata.cpython-36.opt-1.pyc23210644editdlrm
wiredata.cpython-36.pyc23210644editdlrm
zone.cpython-36.opt-1.pyc301370644editdlrm
zone.cpython-36.pyc301370644editdlrm
_compat.cpython-36.opt-1.pyc12990644editdlrm
_compat.cpython-36.pyc12990644editdlrm
__init__.cpython-36.opt-1.pyc5850644editdlrm
__init__.cpython-36.pyc5850644editdlrm
Edit: /usr/lib/python3.6/site-packages/dns/__pycache__/update.cpython-36.pyc (7094B)
3 bW'@s`dZddlZddlZddlZddlZddlZddlZddlZddl m Z Gdddej j Z dS)zDNS Dynamic Update SupportN) string_typescsxeZdZejjddejjffdd ZdddZ ddZ dd Z d d Z d d Z ddZdddZdfdd ZZS)UpdateNcstt|j|jtjjtjjO_t|t r>tj j |}||_ t|t rZtj j |}||_|j|j|j |tjjddd|dk r|j|||ddS)aInitialize a new DNS Update object. @param zone: The zone which is being updated. @type zone: A dns.name.Name or string @param rdclass: The class of the zone; defaults to dns.rdataclass.IN. @type rdclass: An int designating the class, or a string whose value is the name of a class. @param keyring: The TSIG keyring to use; defaults to None. @type keyring: dict @param keyname: The name of the TSIG key to use; defaults to None. The key must be defined in the keyring. If a keyring is specified but a keyname is not, then the key used will be the first key in the keyring. Note that the order of keys in a dictionary is not defined, so applications should supply a keyname when a keyring is used, unless they know the keyring contains only one key. @type keyname: dns.name.Name or string @param keyalgorithm: The TSIG algorithm to use; defaults to dns.tsig.default_algorithm. Constants for TSIG algorithms are defined in dns.tsig, and the currently implemented algorithms are HMAC_MD5, HMAC_SHA1, HMAC_SHA224, HMAC_SHA256, HMAC_SHA384, and HMAC_SHA512. @type keyalgorithm: string T)ZcreateZ force_uniqueN) algorithm)superr__init__flagsdnsZopcodeZto_flagsZUPDATE isinstancername from_textorigin rdataclass zone_rdclass find_rrsetZquestion rdatatypeZSOAZuse_tsig)selfZzoneZrdclassZkeyringZkeynameZ keyalgorithm) __class__/usr/lib/python3.6/update.pyrs     zUpdate.__init__c CsB|dkr|j}|j}|j|||j|j||dd}|j||dS)z&Add a single RR to the update section.NT) authoritycoversrrrdtypeadd)rr ttlrdZdeletingsectionrZrrsetrrr_add_rrEs  zUpdate._add_rrc Gs:t|trtjj|d}t|dtjjrnx@|D]8}|rF|j||jx |D]}|j ||j ||dqLWq0Wnt |}t |j d}t|dtjjr|r|j||djx|D]}|j ||||dqWnh|j d}t|trtjj|}|r|j||x6|D].} tjj|j|| |j}|j ||||dqWdS)aAdd records. The first argument is the replace mode. If false, RRs are added to an existing RRset; if true, the RRset is replaced with the specified contents. The second argument is the section to add to. The third argument is always a name. The other arguments can be: - rdataset... - ttl, rdata... - ttl, rdtype, string...Nr)r)r rr r r rdatasetRdatasetdeleterrrlistintpoprdataRdatarrr ) rreplacerr argsrdsrrrsrrr_addOs0         z Update._addcGs|jd|j|f|dS)zAdd records. The first argument is always a name. The other arguments can be: - rdataset... - ttl, rdata... - ttl, rdtype, string...FN)r*r)rr r'rrrrws z Update.addc Gsft|trtjj|d}t|dkrR|j|j|tjj tj j tj j tj j ddnt|dtj j rx|D]&}x |D]}|j|d|tjj qtWqjWnt|}t|dtjjrx|D]}|j|d|tjj qWn|jd}t|trtj j|}t|dkr(|j|j||j|tj j tjj ddn:x8|D]0}tjj|j|||j}|j|d|tjj q.WdS)zDelete records. The first argument is always a name. The other arguments can be: - I{nothing} - rdataset... - rdata... - rdtype, [string...]NrT)r rr r r lenrrrANYrNONErrrr!r$r%r#rr )rr r'r(rrr)rrrr s6            z Update.deletecGs|jd|j|f|dS)aQReplace records. The first argument is always a name. The other arguments can be: - rdataset... - ttl, rdata... - ttl, rdtype, string... Note that if you want to replace the entire node, you should do a delete of the name followed by one or more calls to add.TN)r*r)rr r'rrrr&s zUpdate.replacec Gst|trtjj|d}t|dkrL|j|j|tjj tj j tj j dddnt|dtj j s|t|dtjjs|t|dkrt|dtj j st|}|jdd|jd|j|f|n@|d}t|trtj j|}|j|j|tjj |tj j ddddS)aBRequire that an owner name (and optionally an rdata type, or specific rdataset) exists as a prerequisite to the execution of the update. The first argument is always a name. The other arguments can be: - rdataset... - rdata... - rdtype, string...NrTrF)r rr r r r+ranswerrr,rr-rrr$r%r!insertr*)rr r'rrrrpresents*          zUpdate.presentc Cst|trtjj|d}|dkrH|j|j|tjjtj j tj jdddn8t|tr^tj j|}|j|j|tjj|tj jddddS)zRequire that an owner name (and optionally an rdata type) does not exist as a prerequisite to the execution of the update.NT) r rr r r rr.rr-rr,)rr rrrrabsents       z Update.absentcs |dkr|j}tt|j||S)zcReturn a string containing the update in DNS compressed wire format. @rtype: stringN)r rrto_wire)rr Zmax_size)rrrr3szUpdate.to_wire)NN)N)Nr2)__name__ __module__ __qualname__r rINZtsigZdefault_algorithmrrr*rr r&r0r1r3 __classcell__rr)rrrs% ( +$ r)__doc__Z dns.messager Zdns.nameZ dns.opcodeZ dns.rdataZdns.rdataclassZ dns.rdatasetZdns.tsigZ_compatrmessageZMessagerrrrrs