ó
    ÌÅLgÓ/  ã                   ó@  • S r SSKJrJrJrJr  SSKrSSKrSSK	rSSK
rSSKrSSKrSSKrSSKr " S S\R                  R                   5      r " S S\R$                  R&                  5      r\r\R,                  r\R.                  r\R0                  r\R2                  rg)zDNS Dynamic Update Supporté    )ÚAnyÚListÚOptionalÚUnionNc                   ó8   • \ rS rSrSrSrSrSrSr\	S 5       r
Srg	)
ÚUpdateSectioné    zUpdate sectionsr   é   é   é   c                 ó   • g)Nr   © )Úclss    Ú,/usr/lib/python3/dist-packages/dns/update.pyÚ_maximumÚUpdateSection._maximum(   s   € àó    r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__ÚZONEÚPREREQÚUPDATEÚ
ADDITIONALÚclassmethodr   Ú__static_attributes__r   r   r   r   r       s+   † Ùà€DØ€FØ€FØ€Jàñó ór   r   c                   ót  ^ • \ rS rSr\rS\R                  R                  SS\R                  R                  S4S\\\R                  R                  \4      S\R                  R                   S\\   S\\R                  R                     S\\R                  R                  \4   S\\   4U 4S	 jjjr\S
\\R,                  R.                     4S j5       r\R2                  S 5       r\S
\\R,                  R.                     4S j5       r\R2                  S 5       r\S
\\R,                  R.                     4S j5       r\R2                  S 5       rSS jrS rS\\R                  R                  \4   S\S
S4S jrS\\R                  R                  \4   S\S
S4S jrS\\R                  R                  \4   S\S
S4S jr S\\R                  R                  \4   S\S
S4S jr! SS\\R                  R                  \4   S\\\RD                  RF                  \4      S
S4S jjr$S r%S r&Sr'U =r($ ) ÚUpdateMessageé-   NÚzoneÚrdclassÚkeyringÚkeynameÚkeyalgorithmÚidc           	      óP  >• [         TU ]  US9  U =R                  [        R                  R                  [        R                  R                  5      -  sl        [        U[        5      (       a  [        R                  R                  U5      nXl        [        R                  R                  R                  U5      nX l        U R                  (       a@  U R!                  U R"                  U R                  U[        R$                  R&                  SSS9  Ub  U R)                  X4US9  gg)a(  Initialize a new DNS Update object.

See the documentation of the Message class for a complete
description of the keyring dictionary.

*zone*, a ``dns.name.Name``, ``str``, or ``None``, the zone
which is being updated.  ``None`` should only be used by dnspython's
message constructors, as a zone is required for the convenience
methods like ``add()``, ``replace()``, etc.

*rdclass*, an ``int`` or ``str``, the class of the zone.

The *keyring*, *keyname*, and *keyalgorithm* parameters are passed to
``use_tsig()``; see its documentation for details.
)r'   T)ÚcreateÚforce_uniqueN)Ú	algorithm)ÚsuperÚ__init__ÚflagsÚdnsÚopcodeÚto_flagsr   Ú
isinstanceÚstrÚnameÚ	from_textÚoriginÚ
rdataclassÚ
RdataClassÚmakeÚzone_rdclassÚ
find_rrsetr"   Ú	rdatatypeÚSOAÚuse_tsig)Úselfr"   r#   r$   r%   r&   r'   Ú	__class__s          €r   r-   ÚUpdateMessage.__init__1   sÛ   ø€ ô0 	‰Ñ˜BÐÑØ�
Š
”c—j‘j×)Ñ)¬#¯*©*×*;Ñ*;Ó<Ñ<�
Ü�dœC× Ñ Ü—8‘8×%Ñ% dÓ+ˆDØŒÜ—.‘.×+Ñ+×0Ñ0°Ó9ˆØ#ÔØ�;�;Ø�O‰OØ—	‘	Ø—‘ØÜ—‘×!Ñ!ØØ!ð ñ ð ÑØ�M‰M˜'°lˆMÒCð r   Úreturnc                 ó    • U R                   S   $ )zThe zone section.r   ©Úsections©r?   s    r   r"   ÚUpdateMessage.zone\   ó   € ð �}‰}˜QÑÐr   c                 ó    • XR                   S'   g )Nr   rD   ©r?   Úvs     r   r"   rG   a   ó   € à�‰�aÒr   c                 ó    • U R                   S   $ )zThe prerequisite section.r
   rD   rF   s    r   ÚprerequisiteÚUpdateMessage.prerequisitee   rH   r   c                 ó    • XR                   S'   g )Nr
   rD   rJ   s     r   rN   rO   j   rL   r   c                 ó    • U R                   S   $ )zThe update section.r   rD   rF   s    r   ÚupdateÚUpdateMessage.updaten   rH   r   c                 ó    • XR                   S'   g )Nr   rD   rJ   s     r   rR   rS   s   rL   r   c           
      ó¸   • Uc  U R                   nUR                  5       nU R                  XQU R                  UR                  XdSS5      nUR                  X25        g)z&Add a single RR to the update section.NT)rR   Úcoversr;   r:   ÚrdtypeÚadd)r?   r4   ÚttlÚrdÚdeletingÚsectionrV   Úrrsets           r   Ú_add_rrÚUpdateMessage._add_rrw   sQ   € ð ‰?Ø—k‘kˆGØ—‘“ˆØ—‘Ø˜4×,Ñ,¨b¯i©i¸È4ÐQUó
ˆð 	�	‰	�"Õr   c           	      óÀ  • [        U[        5      (       a   [        R                  R	                  US5      n[        US   [        R
                  R                  5      (       aO  U HH  nU(       a  U R                  X5R                  5        U H  nU R                  X5R                  XbS9  M     MJ     g[        U5      n[        UR                  S5      5      n[        US   [        R                  R                  5      (       a?  U(       a  U R                  X4S   R                  5        U H  nU R                  X7XbS9  M     g[        R                   R"                  R%                  UR                  S5      5      nU(       a  U R                  X85        U HH  n	[        R                  R	                  U R&                  X‰U R(                  5      nU R                  X7XbS9  MJ     g)ah  Add records.

*replace* is the replacement 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\   )r2   r3   r/   r4   r5   ÚrdatasetÚRdatasetÚdeleterW   r^   rY   ÚlistÚintÚpopÚrdataÚRdatar<   Ú	RdataTyper9   r:   r6   )
r?   Úreplacer\   r4   ÚargsÚrdsrZ   rY   rW   Úss
             r   Ú_addÚUpdateMessage._add‚   sS  € ô  �dœC× Ñ Ü—8‘8×%Ñ% d¨DÓ1ˆDÜ�d˜1‘gœsŸ|™|×4Ñ4×5Ñ5Û�ÞØ—K‘K §j¡jÔ1Û�BØ—L‘L §w¡w°�LÓDó ò ô ˜“:ˆDÜ�d—h‘h˜q“kÓ"ˆCÜ˜$˜q™'¤3§9¡9§?¡?×3Ñ3ÞØ—K‘K ¨1¡g§n¡nÔ5Û�BØ—L‘L ¨B�LÓ@ò ô Ÿ™×0Ñ0×5Ñ5°d·h±h¸q³kÓB�ÞØ—K‘K Ô-Û�AÜŸ™×,Ñ,¨T×->Ñ->ÀÈ4Ï;É;ÓW�BØ—L‘L ¨B�LÓ@ò r   r4   rk   c                 óB   • U R                   " SU R                  U/UQ76   g)z¢Add records.

The first argument is always a name.  The other
arguments can be:

        - rdataset...

        - ttl, rdata...

        - ttl, rdtype, string...
FN©rn   rR   ©r?   r4   rk   s      r   rX   ÚUpdateMessage.addª   s   € ð 	�	Š	�%˜Ÿ™ dÐ2¨TÔ2r   c           
      ó`  • [        U[        5      (       a   [        R                  R	                  US5      n[        U5      S:X  aƒ  U R                  U R                  U[        R                  R                  [        R                  R                  [        R                  R                  [        R                  R                  SS5        g[        US   [        R                  R                  5      (       a?  U H8  nU H/  nU R                  USU[        R                  R                  5        M1     M:     g[        U5      n[        US   [        R                   R"                  5      (       a6  U H/  nU R                  USU[        R                  R                  5        M1     g[        R                  R$                  R'                  UR)                  S5      5      n[        U5      S:X  a]  U R                  U R                  UU R*                  U[        R                  R                  [        R                  R                  SS5        gU He  n[        R                   R	                  U R*                  UUU R,                  5      nU R                  USU[        R                  R                  5        Mg     g)z°Delete records.

The first argument is always a name.  The other
arguments can be:

        - *empty*

        - rdataset...

        - rdata...

        - rdtype, [string...]
Nr   T)r2   r3   r/   r4   r5   Úlenr;   rR   r7   ÚANYr<   ÚNONEra   rb   r^   rd   rg   rh   ri   r9   rf   r:   r6   )r?   r4   rk   rl   rZ   ÚlargsrW   rm   s           r   rc   ÚUpdateMessage.delete¹   sÞ  € ô �dœC× Ñ Ü—8‘8×%Ñ% d¨DÓ1ˆDÜˆt‹9˜‹>Ø�O‰OØ—‘ØÜ—‘×"Ñ"Ü—‘×!Ñ!Ü—‘×"Ñ"Ü—‘×"Ñ"ØØõ	ô ˜˜Q™¤§¡×!6Ñ!6×7Ñ7Û�Û�BØ—L‘L  q¨"¬c¯n©n×.AÑ.AÖBó ò ô ˜“JˆEÜ˜% ™(¤C§I¡I§O¡O×4Ñ4Û�BØ—L‘L  q¨"¬c¯n©n×.AÑ.AÖBò  ô Ÿ™×0Ñ0×5Ñ5°e·i±iÀ³lÓC�Ü�u“: “?Ø—O‘OØŸ™ØØ×)Ñ)ØÜŸ™×*Ñ*ÜŸ™×*Ñ*ØØõ	ó #˜Ü ŸY™Y×0Ñ0Ø ×-Ñ-Ø"ØØ ŸK™Kó	˜ð Ÿ™ T¨1¨b´#·.±.×2EÑ2EÖFò #r   c                 óB   • U R                   " SU R                  U/UQ76   g)a"  Replace 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.
TNrq   rr   s      r   rj   ÚUpdateMessage.replaceõ   s   € ð  	�	Š	�$˜Ÿ™ TÐ1¨DÔ1r   c           
      ó>  • [        U[        5      (       a   [        R                  R	                  US5      n[        U5      S:X  ak  U R                  U R                  U[        R                  R                  [        R                  R                  [        R                  R                  SSS5        g[        US   [        R                  R                  5      (       d;  [        US   [        R                  R                  5      (       d  [        U5      S:”  a‰  [        US   [        R                  R                  5      (       d=  [!        U5      nUR#                  SS5        U R$                  " SU R                  U/UQ76   gU R$                  " SU R                  U/UQ76   g[        R                  R&                  R)                  US   5      nU R                  U R                  U[        R                  R                  U[        R                  R                  SSS5        g)a  Require 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...
Nr   Tr
   F)r2   r3   r/   r4   r5   ru   r;   rN   r7   rv   r<   rw   ra   rb   rg   rh   rd   Úinsertrn   ri   r9   )r?   r4   rk   rx   rW   s        r   ÚpresentÚUpdateMessage.present  s  € ô �dœC× Ñ Ü—8‘8×%Ñ% d¨DÓ1ˆDÜˆt‹9˜‹>Ø�O‰OØ×!Ñ!ØÜ—‘×"Ñ"Ü—‘×!Ñ!Ü—‘×"Ñ"ØØØõ	ô �t˜A‘w¤§¡× 5Ñ 5×6Ñ6Ü˜$˜q™'¤3§9¡9§?¡?×3Ñ3Ü�4‹y˜1‹}ä˜d 1™g¤s§|¡|×'<Ñ'<×=Ñ=ä˜T›
�Ø—‘˜Q Ô"Ø—	’	˜% ×!2Ñ!2°DÐA¸5ÔAà—	’	˜% ×!2Ñ!2°DÐ@¸4Ô@ä—]‘]×,Ñ,×1Ñ1°$°q±'Ó:ˆFØ�O‰OØ×!Ñ!ØÜ—‘×"Ñ"ØÜ—‘×"Ñ"ØØØõ	r   rW   c           
      ó@  • [        U[        5      (       a   [        R                  R	                  US5      nUck  U R                  U R                  U[        R                  R                  [        R                  R                  [        R                  R                  SSS5        g[        R                  R                  R                  U5      nU R                  U R                  U[        R                  R                  U[        R                  R                  SSS5        g)zzRequire that an owner name (and optionally an rdata type) does
not exist as a prerequisite to the execution of the update.NT)r2   r3   r/   r4   r5   r;   rN   r7   rw   r<   rv   ri   r9   )r?   r4   rW   s      r   ÚabsentÚUpdateMessage.absent<  sÎ   € ô �dœC× Ñ Ü—8‘8×%Ñ% d¨DÓ1ˆDØ‰>Ø�O‰OØ×!Ñ!ØÜ—‘×#Ñ#Ü—‘×!Ñ!Ü—‘×"Ñ"ØØØõ	ô —]‘]×,Ñ,×1Ñ1°&Ó9ˆFØ�O‰OØ×!Ñ!ØÜ—‘×#Ñ#ØÜ—‘×"Ñ"ØØØõ	r   c                 ó   • g)NTr   )r?   Úvalues     r   Ú_get_one_rr_per_rrsetÚ#UpdateMessage._get_one_rr_per_rrset^  s   € àr   c                 ó€  • S nSnU[         R                  :X  an  [        R                  R	                  U5      (       d/  U[        R
                  R                  :w  d  U R                  (       a  [        R                  R                  eOµU R                  (       d  [        R                  R                  eU[        R                  R                  [        R                  R                  4;   aR  UnU R                  S   R                  nU[        R                  R                  :H  =(       d    U[         R                  :H  nX4XV4$ )NFr   )r   r   r/   r7   Úis_metaclassr<   r=   r"   Ú	exceptionÚ	FormErrorrv   rw   r#   r   )r?   r\   r4   r#   rW   r[   Úemptys          r   Ú_parse_rr_headerÚUpdateMessage._parse_rr_headerb  sã   € ØˆØˆØ”m×(Ñ(Ó(ä—‘×+Ñ+¨G×4Ñ4ØœSŸ]™]×.Ñ.Ó.Ø—9—9ä—m‘m×-Ñ-Ð-ð ð —9—9Ü—m‘m×-Ñ-Ð-Øœ3Ÿ>™>×-Ñ-¬s¯~©~×/BÑ/BÐCÓCØ"�ØŸ)™) A™,×.Ñ.�à¤§¡× 2Ñ 2Ñ2×U°gÄ×AUÑAUÑ6Uð ð  Ð1Ð1r   )r6   r:   )NN)N))r   r   r   r   r   Ú_section_enumr/   r7   ÚINÚtsigÚdefault_algorithmr   r   r4   ÚNamer3   r8   r   re   r-   Úpropertyr   r]   ÚRRsetr"   ÚsetterrN   rR   r^   rn   rX   rc   rj   r~   r<   ri   r�   r…   rŒ   r   Ú__classcell__)r@   s   @r   r    r    -   s¬  ø† à!€Mð 59Ø-0¯^©^×->Ñ->Ø!%Ø+/Ø25·(±(×2LÑ2LØ ñ)Dà�u˜SŸX™XŸ]™]¨CÐ/Ñ0Ñ1ð)Dð —‘×*Ñ*ð)Dð ˜#‘ð	)Dð
 ˜#Ÿ(™(Ÿ-™-Ñ(ð)Dð ˜CŸH™HŸM™M¨3Ð.Ñ/ð)Dð �S‰M÷)Dð )DðV ð �d˜3Ÿ9™9Ÿ?™?Ñ+ó  ó ð ð 
‡[�[ñó ðð ð ˜d 3§9¡9§?¡?Ñ3ó  ó ð ð ×Ññó ðð ð ˜˜SŸY™YŸ_™_Ñ-ó  ó ð ð ‡]�]ñó ðô	ò&AðP3˜˜cŸh™hŸm™m¨SÐ0Ñ1ð 3¸#ð 3À$ô 3ð:G˜5 §¡§¡°Ð!3Ñ4ð :G¸Sð :GÀTô :Gðx2˜E #§(¡(§-¡-°Ð"4Ñ5ð 2¸cð 2Àdô 2ð$3˜E #§(¡(§-¡-°Ð"4Ñ5ð 3¸cð 3Àdô 3ðp AEñ à�C—H‘H—M‘M 3Ð&Ñ'ð ð ˜˜sŸ}™}×6Ñ6¸Ð;Ñ<Ñ=ð ð 
õ	 òD÷2ð 2r   r    )r   Útypingr   r   r   r   Údns.messager/   Údns.nameÚ
dns.opcodeÚ	dns.rdataÚdns.rdataclassÚdns.rdatasetÚdns.rdatatypeÚdns.tsigÚenumÚIntEnumr   ÚmessageÚMessager    ÚUpdater   r   r   r   r   r   r   Ú<module>r¥      sŒ   ðñ$ !ç -Ó -ã Û Û Û Û Û Û Û ô
�C—H‘H×$Ñ$ô 
ôH2�C—K‘K×'Ñ'ô H2ðX
 
€ð ×Ñ€Ø	×	Ñ	€Ø	×	Ñ	€Ø×%Ñ%�
r   