%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3/dist-packages/dns/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3/dist-packages/dns/__pycache__/rrset.cpython-312.pyc

�

5��e�#���dZddlmZmZmZmZmZmZddlZ	ddl
Z	ddlZ	ddlZ	Gd�de	jj�Z				ddee	j j"efdedee	j(j*efd	ee	j,j.efd
eedee	j j0dee	j j"d
edee	j j"defd�Zdee	j j"efdedee	j(j*efd	ee	j,j.efd
edefd�Z	ddee	j j"efdedee	j8j:dee	j j0def
d�Zdee	j j"efdededefd�Zy)z)DNS RRsets (an RRset is a named rdataset)�)�Any�
Collection�Dict�Optional�Union�castNc
���eZdZdZddgZejjdfdejjdejjdejjdejjde
ejjf
�fd�
Z�fd	�Zd
�Zd�Z�fd�Zd
ededef�fd�Z	ddejjdejjdejjdejjde
ejjdef�fd�
Z		dde
ejjdedeeefdef�fd�
Z		ddede
ejj4de
ejjdeeefdef
�fd�
Zdej:j<fd�Z�xZ S)�RRseta6A DNS RRset (named rdataset).

    RRset inherits from Rdataset, and RRsets can be treated as
    Rdatasets in most cases.  There are, however, a few notable
    exceptions.  RRsets have different to_wire() and to_text() method
    arguments, reflecting the fact that RRsets always have an owner
    name.
    �name�deletingN�rdclass�rdtype�coversc�D��t�|�|||�||_||_y)zCreate a new RRset.N)�super�__init__rr��selfrr
rrr�	__class__s      ��+/usr/lib/python3/dist-packages/dns/rrset.pyrzRRset.__init__(s$���	����&�&�1���	� ��
�c�h��t�|��}|j|_|j|_|S�N)r�_clonerr)r�objrs  �rrzRRset._clone6s*����g�n����9�9����}�}����
rc��|jdk(rd}n/dtjj|j�zdz}|j�-dtj
j|j�z}nd}dt
|j�zdztj
j|j�zdztjj|j�z|z|zdz|j�zd	zS)
Nr��(�)z delete=z<DNS � z RRset: �>)r�dns�	rdatatype�to_textr�
rdataclass�strrr
r�_rdata_repr)r�ctext�dtexts   r�__repr__zRRset.__repr__<s���;�;�!���E��#�-�-�/�/����<�<�s�B�E��=�=�$�����!7�!7��
�
�!F�F�E��E���$�)�)�n�
��
��n�n�$�$�T�\�\�2�
3��	
�
�m�m�#�#�D�K�K�0�
1��

��
��
���� �	
!��

�	
rc�"�|j�Sr)r$�rs r�__str__z
RRset.__str__Ss���|�|�~�rc���t|t�r|j|jk7r&yt|tjj
�syt�|�|�S)NF)�
isinstancer
rr"�rdataset�Rdatasetr�__eq__)r�otherrs  �rr2zRRset.__eq__VsF����e�U�#��y�y�E�J�J�&���E�3�<�<�#8�#8�9���w�~�e�$�$r�args�kwargs�returnc���t|dtjj�r|j|i|��St�|�|i|��S)a�Does this rrset match the specified attributes?

        Behaves as :py:func:`full_match()` if the first argument is a
        ``dns.name.Name``, and as :py:func:`dns.rdataset.Rdataset.match()`
        otherwise.

        (This behavior fixes a design mistake where the signature of this
        method became incompatible with that of its superclass.  The fix
        makes RRsets matchable as Rdatasets while preserving backwards
        compatibility.)
        r)r/r"r�Name�
full_matchr�match)rr4r5rs   �rr:zRRset.match^sE����d�1�g�s�x�x�}�}�-�"�4�?�?�D�3�F�3�3��7�=�$�1�&�1�1rc�h��t�|�|||�sy|j|k7s|j|k7ryy)ztReturns ``True`` if this rrset matches the specified name, class,
        type, covers, and deletion state.
        FT)rr:rrrs      �rr9zRRset.full_matchos5����w�}�W�f�f�5���9�9����
�
�� 9��r�origin�
relativize�kwc�R��t�|�|j|||jfi|��S)a�Convert the RRset into DNS zone file format.

        See ``dns.name.Name.choose_relativity`` for more information
        on how *origin* and *relativize* determine the way names
        are emitted.

        Any additional keyword arguments are passed on to the rdata
        ``to_text()`` method.

        *origin*, a ``dns.name.Name`` or ``None``, the origin for relative
        names.

        *relativize*, a ``bool``.  If ``True``, names will be relativized
        to *origin*.
        )rr$rr)rr<r=r>rs    �rr$z
RRset.to_text�s/���,�w���I�I�v�z�4�=�=�
�<>�
�	
r�file�compressc�T��t�|�|j||||jfi|��S)z�Convert the RRset to wire format.

        All keyword arguments are passed to ``dns.rdataset.to_wire()``; see
        that function for details.

        Returns an ``int``, the number of records emitted.
        )r�to_wirerr)rr@rAr<r>rs     �rrCz
RRset.to_wire�s1����w���I�I�t�X�v�t�}�}�
�@B�
�	
rc�h�tjj|jt	|��S)zYConvert an RRset into an Rdataset.

        Returns a ``dns.rdataset.Rdataset``.
        )r"r0�from_rdata_list�ttl�listr,s r�to_rdatasetzRRset.to_rdataset�s#��
�|�|�+�+�D�H�H�d�4�j�A�Arr)NT)NN)!�__name__�
__module__�__qualname__�__doc__�	__slots__r"r#�NONErr8r%�
RdataClass�	RdataTyperrrr*r-r2r�boolr:r9rr&r$�CompressType�intrCr0r1rH�
__classcell__)rs@rr
r
s�������$�I�+.�-�-�*<�*<�8<�
!��h�h�m�m�!����*�*�!��
�
�'�'�	!�
�
�
�'�'�!��3�>�>�4�4�5�
!��
�.�%�2�3�2�#�2�$�2�.9=�
��h�h�m�m�����*�*���
�
�'�'�	�
�
�
�'�'���3�>�>�4�4�5�
�
��*+/��
�������'�
��
��3��8�n�	
�


�
�:59�*.�	
��
��3�8�8�0�0�1�
�������'�	
�
�3��8�n�
�

�

�*B�S�\�\�2�2�Brr
rrFr
r�text_rdatas�
idna_codecr<r=�
relativize_tor6c	
���t|t�r"tjj	|d|��}tj
jj|�}tjjj|�}t|||�}	|	j|�|D]L}
tjj	|	j|	j|
||||�}|	j|��N|	S)ayCreate an RRset with the specified name, TTL, class, and type, and with
    the specified list of rdatas in text format.

    *idna_codec*, a ``dns.name.IDNACodec``, specifies the IDNA
    encoder/decoder to use; if ``None``, the default IDNA 2003
    encoder/decoder is used.

    *origin*, a ``dns.name.Name`` (or ``None``), the
    origin to use for relative names.

    *relativize*, a ``bool``.  If true, name will be relativized.

    *relativize_to*, a ``dns.name.Name`` (or ``None``), the origin to use
    when relativizing names.  If not set, the *origin* value will be used.

    Returns a ``dns.rrset.RRset`` object.
    N�rV)r/r&r"r�	from_textr%rO�maker#rPr
�
update_ttl�rdatar
r�add)rrFr
rrUrVr<r=rW�r�t�rds            r�from_text_listrb�s���:�$����x�x�!�!�$���!�D���n�n�'�'�,�,�W�5�G�
�]�]�
$�
$�
)�
)�&�
1�F�
�d�G�V�$�A��L�L���
���
�Y�Y�
 �
 �
�I�I�q�x�x��F�J�
�z�
��	
���b�	�	�

�Hrc
�J�t||||ttt|��S)z�Create an RRset with the specified name, TTL, class, and type and with
    the specified rdatas in text format.

    Returns a ``dns.rrset.RRset`` object.
    )rbrrr&)rrFr
rrUs     rrZrZ�s'����c�7�F�D��C��+�$F��r�rdatasc�@�t|t�r"tjj	|d|��}t|�dk(rt
d��d}|D]G}|�2t||j|j�}|j|�|j|��I|�J�|S)a/Create an RRset with the specified name and TTL, and with
    the specified list of rdata objects.

    *idna_codec*, a ``dns.name.IDNACodec``, specifies the IDNA
    encoder/decoder to use; if ``None``, the default IDNA 2003
    encoder/decoder is used.

    Returns a ``dns.rrset.RRset`` object.

    NrYrzrdata list must not be empty)r/r&r"rrZ�len�
ValueErrorr
r
rr\r^)rrFrdrVr_ras      rrErE�s���"�$����x�x�!�!�$���!�D��
�6�{�a���7�8�8��A�����9��d�B�J�J��	�	�2�A�
�L�L���	���b�	�	�

�=��=��Hrc�n�t||tttjj
|��S)z�Create an RRset with the specified name and TTL, and with
    the specified rdata objects.

    Returns a ``dns.rrset.RRset`` object.
    )rErrr"r]�Rdata)rrFrds   r�
from_rdatarjs'���4��d�:�c�i�i�o�o�+F��&O�P�Pr)NNTNr) rL�typingrrrrrr�dns.namer"�dns.rdataclass�dns.rdataset�dns.rendererr0r1r
rr8r&rSr%rOr#rP�	IDNACodecrQrbrZr]rirErj�rr�<module>rrs(��$0�?�?�����ZB�C�L�L�!�!�ZB�F04�&*��-1�(
�
����
�
�s�"�
#�(
�	�(
��3�>�>�,�,�c�1�
2�(
�
�#�-�-�)�)�3�.�/�	(
�
�C��(
�����+�+�,�
(
�
�S�X�X�]�]�#�(
��(
��C�H�H�M�M�*�(
��(
�V�
����
�
�s�"�
#��	���3�>�>�,�,�c�1�
2��
�#�-�-�)�)�3�.�/�	�
���
�,04�	
�
����
�
�s�"�
#�
�	�
�
�s�y�y���'�
�����+�+�,�	
�
�
�@Q�U�3�8�8�=�=�#�-�.�Q�S�Q�3�Q�5�Qr

Zerion Mini Shell 1.0