%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/plesk/python/2.7/lib/python2.7/site-packages/dns/
Upload File :
Create Path :
Current File : //opt/plesk/python/2.7/lib/python2.7/site-packages/dns/rdataset.pyc

�
�ac@sdZddlZddlmZddlZddlZddlZddlZddl	Zddl
ZddlmZej
jZdejjfd��YZdejjfd	��YZd
ej
jfd��YZd�Zd
�Zd�Zd�ZdS(sHDNS rdatasets (an rdataset is a set of rdatas of a given type and class)i����N(tStringIOi(tstring_typestDifferingCoverscBseZdZRS(s~An attempt was made to add a DNS SIG/RRSIG whose covered type
    is not the same as that of the other rdatas in the rdataset.(t__name__t
__module__t__doc__(((sA/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/rdataset.pyR#stIncompatibleTypescBseZdZRS(s?An attempt was made to add DNS RR data of an incompatible type.(RRR(((sA/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/rdataset.pyR(stRdatasetcBs�eZdZddddgZejjdd�Zd�Zd�Z	dd	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zddedd�Zddded�Zd�ZRS(sA DNS rdataset.trdclasstrdtypetcoverstttlicCs;tt|�j�||_||_||_||_dS(s�Create a new rdataset of the specified class and type.

        *rdclass*, an ``int``, the rdataclass.

        *rdtype*, an ``int``, the rdatatype.

        *covers*, an ``int``, the covered rdatatype.

        *ttl*, an ``int``, the TTL.
        N(tsuperRt__init__RR	R
R(tselfRR	R
R((sA/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/rdataset.pyR
2s
			cCsItt|�j�}|j|_|j|_|j|_|j|_|S(N(RRt_cloneRR	R
R(Rtobj((sA/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/rdataset.pyRDscCs=t|�dkr||_n||jkr9||_ndS(s�Perform TTL minimization.

        Set the TTL of the rdataset to be the lesser of the set's current
        TTL or the specified TTL.  If the set contains no rdatas, set the TTL
        to the specified TTL.

        *ttl*, an ``int``.
        iN(tlenR(RR((sA/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/rdataset.pyt
update_ttlLs
cCs|j|jks$|j|jkr-t�n|dk	rI|j|�n|jtjjkss|jtjjkr�|j	�}t
|�dkr�|j	tjjkr�||_	q�|j	|kr�t�q�ntjj
|j�rt
|�dkr|j�ntt|�j|�dS(s!Add the specified rdata to the rdataset.

        If the optional *ttl* parameter is supplied, then
        ``self.update_ttl(ttl)`` will be called prior to adding the rdata.

        *rd*, a ``dns.rdata.Rdata``, the rdata

        *ttl*, an ``int``, the TTL.

        Raises ``dns.rdataset.IncompatibleTypes`` if the type and class
        do not match the type and class of the rdataset.

        Raises ``dns.rdataset.DifferingCovers`` if the type is a signature
        type and the covered type does not match that of the rdataset.
        iN(RR	RtNoneRtdnst	rdatatypetRRSIGtSIGR
RtNONERtis_singletontclearRRtadd(RtrdRR
((sA/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/rdataset.pyR$	''
cCs*|j|j�tt|�j|�dS(N(RRRRtunion_update(Rtother((sA/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/rdataset.pyR�scCs*|j|j�tt|�j|�dS(N(RRRRtintersection_update(RR((sA/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/rdataset.pyR�scCs*|j|j�tt|�j|�dS(s�Add all rdatas in other to self.

        *other*, a ``dns.rdataset.Rdataset``, the rdataset from which
        to update.
        N(RRRRtupdate(RR((sA/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/rdataset.pyR �scCsk|jdkrd}ndtjj|j�d}dtjj|j�dtjj|j�|dS(Nitt(t)s<DNS t s
 rdataset>(R
RRtto_textt
rdataclassRR	(Rtctext((sA/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/rdataset.pyt__repr__�s	cCs
|j�S(N(R%(R((sA/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/rdataset.pyt__str__�scCsct|t�stS|j|jksI|j|jksI|j|jkrMtStt|�j|�S(N(t
isinstanceRtFalseRR	R
Rt__eq__(RR((sA/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/rdataset.pyR,�scCs|j|�S(N(R,(RR((sA/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/rdataset.pyt__ne__�scKs*|d	k	r3|j||�}t|�}d}nd}d}t�}|d	k	r]|}	n	|j}	t|�dkr�|jdj||tj	j
|	�tjj
|j���ngxd|D]\}
|jd|||j
tj	j
|	�tjj
|j�|
j
d|d||�f�q�W|j�d S(
sdConvert the rdataset into DNS master 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.

        *name*, a ``dns.name.Name``.  If name is not ``None``, emit RRs with
        *name* as the owner name.

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

        *relativize*, a ``bool``.  If ``True``, names will be relativized
        to *origin*.
        R$R!iu
{}{}{} {}
u%s%s%d %s %s %s
torigint
relativizei����N(Rtchoose_relativitytstrRRRtwritetformatRR&R%RR	Rtgetvalue(RtnameR.R/toverride_rdclasstkwtntexttpadtsRR((sA/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/rdataset.pyR%�s*				
	c
Cs�|dk	r|}t}n	|j}|jdd�t|�dkr�|j|||�tjd|j|dd�}|j	|�dS|r�t
|�}	tj|	�n|}	x�|	D]�}
|j|||�tjd|j||j
d�}|j	|�|j�}|
j|||�|j�}||dks?t�|j|d�tjd||�}|j	|�|jdd�q�Wt|�SdS(stConvert the rdataset to wire format.

        *name*, a ``dns.name.Name`` is the owner name to use.

        *file* is the file where the name is emitted (typically a
        BytesIO file).

        *compress*, a ``dict``, is the compression table to use.  If
        ``None`` (the default), names will not be compressed.

        *origin* is a ``dns.name.Name`` or ``None``.  If the name is
        relative and origin is not ``None``, then *origin* will be appended
        to it.

        *override_rdclass*, an ``int``, is used as the class instead of the
        class of the rdataset.  This is useful when rendering rdatasets
        associated with dynamic updates.

        *want_shuffle*, a ``bool``.  If ``True``, then the order of the
        Rdatas within the Rdataset will be shuffled before rendering.

        Returns an ``int``, the number of records emitted.
        iis!HHIHiis!HN(RR+RtseekRtto_wiretstructtpackR	R2tlisttrandomtshuffleRttelltAssertionError(
RR5tfiletcompressR.R6twant_shuffleRtstufftlRtstarttend((sA/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/rdataset.pyR<�s8		



cCs5|j|kr1|j|kr1|j|kr1tStS(saReturns ``True`` if this rdataset matches the specified class,
        type, and covers.
        (RR	R
tTrueR+(RRR	R
((sA/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/rdataset.pytmatchs
N(RRRt	__slots__RRRR
RRRRRRR R(R)R,R-RKR%R<RL(((sA/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/rdataset.pyR,s$		&			
						59cCs�t|t�r$tjj|�}nt|t�rHtjj|�}nt||�}|j|�x9|D]1}tjj|j	|j
|�}|j|�qkW|S(s�Create an rdataset with the specified class, type, and TTL, and with
    the specified list of rdatas in text format.

    Returns a ``dns.rdataset.Rdataset`` object.
    (R*RRR&t	from_textRRRtrdataRR	R(RR	Rttext_rdatastrttR((sA/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/rdataset.pytfrom_text_list%s

cGst||||�S(s�Create an rdataset with the specified class, type, and TTL, and with
    the specified rdatas in text format.

    Returns a ``dns.rdataset.Rdataset`` object.
    (RS(RR	RRP((sA/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/rdataset.pyRN8scCszt|�dkr!td��nd}xL|D]D}|dkret|j|j�}|j|�n|j|�q.W|S(s�Create an rdataset with the specified TTL, and with
    the specified list of rdata objects.

    Returns a ``dns.rdataset.Rdataset`` object.
    isrdata list must not be emptyN(Rt
ValueErrorRRRR	RR(RtrdatasRQR((sA/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/rdataset.pytfrom_rdata_listBs
cGs
t||�S(s�Create an rdataset with the specified TTL, and with
    the specified rdata objects.

    Returns a ``dns.rdataset.Rdataset`` object.
    (RV(RRU((sA/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/rdataset.pyt
from_rdataTs(RR@tioRR=t
dns.exceptionRt
dns.rdatatypetdns.rdataclasst	dns.rdatatdns.sett_compatRtsettSett	SimpleSett	exceptiontDNSExceptionRRRRSRNRVRW(((sA/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/rdataset.pyt<module>s"�		
	

Zerion Mini Shell 1.0