ó FRTc@s^ddddddddgZdd lmZd efd „ƒYZd efd „ƒYZdS(tAtAAAAtTXTtCNAMEtMXtPTRtSRVtSPFiÿÿÿÿ(t ResultSettResourceRecordSetsc Bs†eZdZdZdZd d d d„Zd„Zdd d d d d d d d d„ Zd„Z d„Z d „Z d „Z d „Z RS( sà A list of resource records. :ivar hosted_zone_id: The ID of the hosted zone. :ivar comment: A comment that will be stored with the change. :ivar changes: A list of changes. s@ %(comment)s %(changes)s sM %(action)s %(record)s cCsb||_||_||_g|_d|_d|_d|_tt |ƒj dt fgƒdS(NtResourceRecordSet( t connectionthosted_zone_idtcommenttchangestNonetnext_record_nametnext_record_typetnext_record_identifiertsuperR t__init__tRecord(tselfR R R ((s@/opt/freeware/lib/python2.7/site-packages/boto/route53/record.pyR4s       cCsp|jr7djg|jD]}|jƒ^qƒ}n(djg|D]}|jƒ^qDƒ}d|j|fS(Nt,ss  .( iXc Cs\t|||d|d|d|d|d| d| d| d| ƒ} |jj|| gƒ| S( sÔ Add a change request to the set. :type action: str :param action: The action to perform ('CREATE'|'DELETE'|'UPSERT') :type name: str :param name: The name of the domain you want to perform the action on. :type type: str :param type: The DNS record type. Valid values are: * A * AAAA * CNAME * MX * NS * PTR * SOA * SPF * SRV * TXT :type ttl: int :param ttl: The resource record cache time to live (TTL), in seconds. :type alias_hosted_zone_id: str :param alias_dns_name: *Alias resource record sets only* The value of the hosted zone ID, CanonicalHostedZoneNameId, for the LoadBalancer. :type alias_dns_name: str :param alias_hosted_zone_id: *Alias resource record sets only* Information about the domain to which you are redirecting traffic. :type identifier: str :param identifier: *Weighted and latency-based resource record sets only* An identifier that differentiates among multiple resource record sets that have the same combination of DNS name and type. :type weight: int :param weight: *Weighted resource record sets only* Among resource record sets that have the same combination of DNS name and type, a value that determines what portion of traffic for the current resource record set is routed to the associated location :type region: str :param region: *Latency-based resource record sets only* Among resource record sets that have the same combination of DNS name and type, a value that determines which region this should be associated with for the latency-based routing :type alias_evaluate_target_health: Boolean :param alias_evaluate_target_health: *Required for alias resource record sets* Indicates whether this Resource Record Set should respect the health status of any health checks associated with the ALIAS target record which it is linked to. :type health_check: str :param health_check: Health check to associate with this record :type failover: str :param failover: *Failover resource record sets only* Whether this is the primary or secondary resource record set. talias_hosted_zone_idtalias_dns_namet identifiertweighttregiontalias_evaluate_target_healtht health_checktfailover(RRtappend(RtactiontnamettypetttlRRRR R!R"R#R$tchange((s@/opt/freeware/lib/python2.7/site-packages/boto/route53/record.pyt add_changeFsE  cCs|jj||gƒdS(s@Add an existing record to a change set with the specified actionN(RR%(RR&R*((s@/opt/freeware/lib/python2.7/site-packages/boto/route53/record.pytadd_change_record”scCsod}xD|jD]9}i|dd6|djƒd6}||j|7}qWi|jd6|d6}|j|S(scConvert this ResourceRecordSet into XML to be saved via the ChangeResourceRecordSetsRequesttiR&iRR R(Rtto_xmlt ChangeXMLR tChangeResourceRecordSetsBody(Rt changesXMLR*t changeParamstparams((s@/opt/freeware/lib/python2.7/site-packages/boto/route53/record.pyR.™s "cCsC|js'ddl}|jƒ|_n|jj|j|jƒƒS(sCommit this changeiÿÿÿÿN(R tbototconnect_route53t change_rrsetsR R.(RR4((s@/opt/freeware/lib/python2.7/site-packages/boto/route53/record.pytcommit£s  cCsh|dkr||_nL|dkr0||_n4|dkrH||_ntt|ƒj|||ƒSdS(snOverwritten to also add the NextRecordName, NextRecordType and NextRecordIdentifier to the base objecttNextRecordNametNextRecordTypetNextRecordIdentifierN(RRRRR t endElement(RR'tvalueR ((s@/opt/freeware/lib/python2.7/site-packages/boto/route53/record.pyR;ªs      ccs™tt|ƒjƒ}|j}xt|r”x|D] }|Vq.W|jr‚t|_|jj|jd|jd|j d|j ƒ}q!d}||_q!WdS(s,Override the next function to support pagingR'R(RN( RR t__iter__t is_truncatedtFalseR tget_all_rrsetsR RRRR(Rtresultst truncatedtobj((s@/opt/freeware/lib/python2.7/site-packages/boto/route53/record.pyR=¶s       N(t__name__t __module__t__doc__R0R/RRRR+R,R.R7R;R=(((s@/opt/freeware/lib/python2.7/site-packages/boto/route53/record.pyR s   K   Rc Bs³eZdZdZdZdZdZdZdZdZ dZ d Z ddd dddddddddd „ Z d „Zd „Zed„Zd„Zd„Zd„Zd„ZRS(sAn individual ResourceRecordSets!%s %(name)s %(type)s %(weight)s %(body)s %(health_check)s s_ %(identifier)s %(weight)s s_ %(identifier)s %(region)s se %(identifier)s %(failover)s sh %(ttl)s %(records)s s@ %s %(hosted_zone_id)s %(dns_name)s %(eval_target_health)s s/%siXc Cs…||_||_||_|dkr0g}n||_||_||_||_||_| |_ | |_ | |_ | |_ dS(N( R'R(R)Rtresource_recordsRRRR R!R"R#R$( RR'R(R)RGRRRR R!R"R#R$((s@/opt/freeware/lib/python2.7/site-packages/boto/route53/record.pyRõs             cCsd|j|j|jƒfS(Ns(R'R(tto_print(R((s@/opt/freeware/lib/python2.7/site-packages/boto/route53/record.pyRscCs|jj|ƒdS(sAdd a resource record valueN(RGR%(RR<((s@/opt/freeware/lib/python2.7/site-packages/boto/route53/record.pyt add_value scCs||_||_||_dS(s&Make this an alias resource record setN(RRR"(RRRR"((s@/opt/freeware/lib/python2.7/site-packages/boto/route53/record.pyt set_aliass  cCsô|jdk r}|jdk r}|jdk rL|j|jrBdnd}nd}|ji|jd6|jd6|d6}nId}x"|jD]}||j|7}qW|ji|j d6|d6}d}|j dk r|j dk r|j i|j d 6|j d 6}n„|j dk rP|j dk rP|ji|j d 6|j d 6}nB|j dk r’|jdk r’|ji|j d 6|jd 6}nd}|jdk rº|j|j}ni|jd 6|jd6|d 6|d6|d6}|j|S(s(Spit this resource record set out as XMLttruetfalseR-R tdns_nameteval_target_healthR)trecordsRR R!R$R'R(tbodyR#N(RRRR"tEvaluateTargetHealtht AliasBodyRGtResourceRecordBodytResourceRecordsBodyR)RR tWRRBodyR!tRRRBodyR$t FailoverBodyR#tHealthCheckBodyR'R(tXMLBody(RRNRPROtrR R#R3((s@/opt/freeware/lib/python2.7/site-packages/boto/route53/record.pyR.sB       cCs)d}|jdk rb|jdk rbd|jd|j}|jdk rt|d|j7}qtndj|jƒ}|jdk r¯|jdk r¯|d|j|jf7}nv|jdk rê|jdk rê|d|j|jf7}n;|jdk r%|j dk r%|d|j|j f7}n|S( NR-sALIAS t s (EvalTarget %s)Rs (WRR id=%s, w=%s)s (LBR id=%s, region=%s)s (FAILOVER id=%s, failover=%s)( RRRR"RRGRR R!R$(Rtrr((s@/opt/freeware/lib/python2.7/site-packages/boto/route53/record.pyRHGscCs7|dkr||_n|dkr0||_n|dkrH||_në|dkrg|jj|ƒnÌ|dkr||_n´|dkr—||_nœ|dkr¯||_n„|dkrÓ|jƒd k|_ n`|d krë||_ nH|d kr||_ n0|d kr||_ n|d kr3||_ ndS(NtNametTypetTTLtValuet HostedZoneIdtDNSNamet SetIdentifierRQRKtWeighttRegiontFailovert HealthCheckId(R'R(R)RGR%RRRtlowerR"R R!R$R#(RR'R<R ((s@/opt/freeware/lib/python2.7/site-packages/boto/route53/record.pyR;[s0                     cCsdS(N(R(RR'tattrsR ((s@/opt/freeware/lib/python2.7/site-packages/boto/route53/record.pyt startElementusN(RDRERFRXRYRURVRWRTRSRRRQRRRRIR?RJR.RHR;Rj(((s@/opt/freeware/lib/python2.7/site-packages/boto/route53/record.pyRÇs*       1  N(t RECORD_TYPEStboto.resultsetRR tobjectR(((s@/opt/freeware/lib/python2.7/site-packages/boto/route53/record.pyts©