%PDF- %PDF-
Mini Shell

Mini Shell

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

�
�ac@sTdZddlmZddlZddlZddlZdefd��YZdS(s)DNS nodes.  A node is a set of rdatasets.i����(tStringIONtNodecBs�eZdZdgZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
ejj
ed	�Zejj
ed
�Zejj
d�Zd�ZRS(
sA Node is a set of rdatasets.t	rdatasetscCs
g|_dS(N(R(tself((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/node.pyt__init__!scKsft�}xL|jD]A}t|�dkr|j|j||��|jd�qqW|j�d S(s&Convert a node to text format.

        Each rdataset at the node is printed.  Any keyword arguments
        to this method are passed on to the rdataset's to_text() method.

        *name*, a ``dns.name.Name`` or ``text``, the owner name of the rdatasets.

        Returns a ``text``.
        iu
i����(RRtlentwritetto_texttgetvalue(Rtnametkwtstrds((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/node.pyR%s	cCsdtt|��dS(Ns
<DNS node t>(tstrtid(R((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/node.pyt__repr__7scCsRx$|jD]}||jkr
tSq
Wx$|jD]}||jkr1tSq1WtS(N(RtFalsetTrue(Rtothertrd((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/node.pyt__eq__:scCs|j|�S(N(R(RR((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/node.pyt__ne__FscCs
t|j�S(N(RR(R((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/node.pyt__len__IscCs
t|j�S(N(titerR(R((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/node.pyt__iter__LscCsex*|jD]}|j|||�r
|Sq
W|s<t�ntjj||�}|jj|�|S(s�Find an rdataset matching the specified properties in the
        current node.

        *rdclass*, an ``int``, the class of the rdataset.

        *rdtype*, an ``int``, the type of the rdataset.

        *covers*, an ``int``, the covered type.  Usually this value is
        dns.rdatatype.NONE, but if the rdtype is dns.rdatatype.SIG or
        dns.rdatatype.RRSIG, then the covers value will be the rdata
        type the SIG/RRSIG covers.  The library treats the SIG and RRSIG
        types as if they were a family of
        types, e.g. RRSIG(A), RRSIG(NS), RRSIG(SOA).  This makes RRSIGs much
        easier to work with than if RRSIGs covering different rdata
        types were aggregated into a single RRSIG rdataset.

        *create*, a ``bool``.  If True, create the rdataset if it is not found.

        Raises ``KeyError`` if an rdataset of the desired type and class does
        not exist and *create* is not ``True``.

        Returns a ``dns.rdataset.Rdataset``.
        (RtmatchtKeyErrortdnstrdatasettRdatasettappend(RtrdclasstrdtypetcoverstcreateR((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/node.pyt
find_rdatasetOs	cCs:y|j||||�}Wntk
r5d}nX|S(s�Get an rdataset matching the specified properties in the
        current node.

        None is returned if an rdataset of the specified type and
        class does not exist and *create* is not ``True``.

        *rdclass*, an ``int``, the class of the rdataset.

        *rdtype*, an ``int``, the type of the rdataset.

        *covers*, an ``int``, the covered type.  Usually this value is
        dns.rdatatype.NONE, but if the rdtype is dns.rdatatype.SIG or
        dns.rdatatype.RRSIG, then the covers value will be the rdata
        type the SIG/RRSIG covers.  The library treats the SIG and RRSIG
        types as if they were a family of
        types, e.g. RRSIG(A), RRSIG(NS), RRSIG(SOA).  This makes RRSIGs much
        easier to work with than if RRSIGs covering different rdata
        types were aggregated into a single RRSIG rdataset.

        *create*, a ``bool``.  If True, create the rdataset if it is not found.

        Returns a ``dns.rdataset.Rdataset`` or ``None``.
        N(R$RtNone(RR R!R"R#R((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/node.pytget_rdatasetrs


cCs8|j|||�}|dk	r4|jj|�ndS(sDDelete the rdataset matching the specified properties in the
        current node.

        If a matching rdataset does not exist, it is not an error.

        *rdclass*, an ``int``, the class of the rdataset.

        *rdtype*, an ``int``, the type of the rdataset.

        *covers*, an ``int``, the covered type.
        N(R&R%Rtremove(RR R!R"R((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/node.pytdelete_rdataset�s
cCsTt|tjj�s$td��n|j|j|j|j�|j	j
|�dS(s�Replace an rdataset.

        It is not an error if there is no rdataset matching *replacement*.

        Ownership of the *replacement* object is transferred to the node;
        in other words, this method does not store a copy of *replacement*
        at the node, it stores *replacement* itself.

        *replacement*, a ``dns.rdataset.Rdataset``.

        Raises ``ValueError`` if *replacement* is not a
        ``dns.rdataset.Rdataset``.
        sreplacement is not an rdatasetN(t
isinstanceRRRt
ValueErrorR(R R!R"RR(Rtreplacement((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/node.pytreplace_rdataset�s

(t__name__t
__module__t__doc__t	__slots__RRRRRRRRt	rdatatypetNONERR$R&R(R,(((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/node.pyRs									"	(	R/tioRtdns.rdatasetRt
dns.rdatatypetdns.renderertobjectR(((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/node.pyt<module>s


Zerion Mini Shell 1.0