Viewing File: /usr/lib64/python2.7/site-packages/dns/rrset.pyc

ó
!`Nc@szdZddlZddlZddlZddlZdejjfd„ƒYZd„Z	d„Z
d„Zd„ZdS(	s)DNS RRsets (an RRset is a named rdataset)iÿÿÿÿNtRRsetcBs†eZdZddgZejjdd„Zd„Z	d„Z
d„Zd„Zdd„Z
ded	„Zddd
„Zd„ZRS(
s6A 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.
    tnametdeletingcCs2tt|ƒj|||ƒ||_||_dS(sCreate a new RRset.N(tsuperRt__init__RR(tselfRtrdclasstrdtypetcoversR((s//usr/lib64/python2.7/site-packages/dns/rrset.pyR#s	cCs1tt|ƒjƒ}|j|_|j|_|S(N(RRt_cloneRR(Rtobj((s//usr/lib64/python2.7/site-packages/dns/rrset.pyR	+scCs±|jdkrd}ndtjj|jƒd}|jdk	r`dtjj|jƒ}nd}dt|jƒdtjj|j	ƒdtjj|j
ƒ||dS(	Nitt(t)s delete=s<DNS t s RRset>(Rtdnst	rdatatypetto_textRtNonet
rdataclasststrRRR(Rtctexttdtext((s//usr/lib64/python2.7/site-packages/dns/rrset.pyt__repr__1s	cCs
|jƒS(N(R(R((s//usr/lib64/python2.7/site-packages/dns/rrset.pyt__str__>scCs?t|tƒstS|j|jkr)tStt|ƒj|ƒS(scTwo RRsets are equal if they have the same name and the same
        rdataset

        @rtype: bool(t
isinstanceRtFalseRRt__eq__(Rtother((s//usr/lib64/python2.7/site-packages/dns/rrset.pyRAs
cCsHtt|ƒj|||ƒs"tS|j|ks@|j|krDtStS(saReturns True if this rrset matches the specified class, type,
        covers, and deletion state.(RRtmatchRRRtTrue(RRRRRR((s//usr/lib64/python2.7/site-packages/dns/rrset.pyRLs
cKs(tt|ƒj|j|||j|S(sûConvert the RRset into DNS master file format.

        @see: L{dns.name.Name.choose_relativity} for more information
        on how I{origin} and I{relativize} determine the way names
        are emitted.

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

        @param origin: The origin for relative names, or None.
        @type origin: dns.name.Name object
        @param relativize: True if names should names be relativized
        @type relativize: bool(RRRRR(Rtorigint
relativizetkw((s//usr/lib64/python2.7/site-packages/dns/rrset.pyRVscKs+tt|ƒj|j||||j|S(s!Convert the RRset to wire format.(RRtto_wireRR(RtfiletcompressRR!((s//usr/lib64/python2.7/site-packages/dns/rrset.pyR"hscCstjj|jt|ƒƒS(sYConvert an RRset into an Rdataset.

        @rtype: dns.rdataset.Rdataset object
        (Rtrdatasettfrom_rdata_listtttltlist(R((s//usr/lib64/python2.7/site-packages/dns/rrset.pytto_rdatasetnsN(t__name__t
__module__t__doc__t	__slots__RRtNONERRR	RRRRRRR"R)(((s//usr/lib64/python2.7/site-packages/dns/rrset.pyRs			
		
cCsàt|ttfƒr-tjj|dƒ}nt|ttfƒrWtjj|ƒ}nt|ttfƒrtjj|ƒ}nt	|||ƒ}|j
|ƒx9|D]1}tjj|j|j
|ƒ}|j|ƒq§W|S(s¡Create an RRset with the specified name, TTL, class, and type, and with
    the specified list of rdatas in text format.

    @rtype: dns.rrset.RRset object
    N(RRtunicodeRRt	from_textRRRRt
update_ttltrdataRRtadd(RR'RRttext_rdatastrtttrd((s//usr/lib64/python2.7/site-packages/dns/rrset.pytfrom_text_listvs

cGst|||||ƒS(s˜Create an RRset with the specified name, TTL, class, and type and with
    the specified rdatas in text format.

    @rtype: dns.rrset.RRset object
    (R8(RR'RRR4((s//usr/lib64/python2.7/site-packages/dns/rrset.pyR0ŠscCs°t|ttfƒr-tjj|dƒ}nt|ƒdkrNtdƒ‚nd}xU|D]M}|dkr›t	||j
|jƒ}|j|ƒt
}n|j|ƒq[W|S(s‹Create an RRset with the specified name and TTL, and with
    the specified list of rdata objects.

    @rtype: dns.rrset.RRset object
    isrdata list must not be emptyN(RRR/RRR0Rtlent
ValueErrorRRRR1RR3(RR'trdatasR5R7t
first_time((s//usr/lib64/python2.7/site-packages/dns/rrset.pyR&“s

	cGst|||ƒS(sƒCreate an RRset with the specified name and TTL, and with
    the specified rdata objects.

    @rtype: dns.rrset.RRset object
    (R&(RR'R;((s//usr/lib64/python2.7/site-packages/dns/rrset.pyt
from_rdata¨s(
R,tdns.nameRtdns.rdatasettdns.rdataclasstdns.rendererR%tRdatasetRR8R0R&R=(((s//usr/lib64/python2.7/site-packages/dns/rrset.pyt<module>s_				
Back to Directory File Manager