Viewing File: /usr/lib/python2.7/site-packages/euca2ools/commands/ec2/structures.pyo

ó
¡ôXc@s`ddlZddlZddlZddlZdefd„ƒYZdefd„ƒYZdS(iÿÿÿÿNtImportManifestcBsJeZdd„Zed„ƒZed„ƒZed„Zed„Z	RS(cCsdtj|jjƒ|_|dk	r3||j_nd|_d|_d|_	d|_
g|_dS(N(tloggingt	getLoggert	__class__t__name__tlogtNonetleveltfile_formattself_destruct_urlt
image_sizetvolume_sizetimage_parts(tselftloglevel((sE/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/structures.pyt__init__#s				cCs&t|ƒ}|j|ƒSWdQXdS(N(topentread_from_fileobj(tclstmanifest_filenametmanifest_fileobj((sE/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/structures.pytread_from_file-scCsbtjj|ƒjƒ}|ƒ}|dj|_|dj|_t|djƒ|_	t|ddƒ|_
dgt|ddjdƒƒ|_
xÆ|dddD]²}t|jdƒƒ}tƒ}||_t|d	jd
ƒƒ|_t|d	jdƒƒ|_|dj|_|d
j|_|dj|_|dj|_||j
|<q¨W|S(Nsfile-formatsself-destruct-urltimportsvolume-sizetpartstcounttparttindexs
byte-rangetstarttendtkeyshead-urlsget-urls
delete-url(tlxmlt	objectifytparsetgetrootttextRR	tinttsizeR
RRtgetRtImportImagePartRRRRthead_urltget_urlt
delete_url(RRtxmltmanifestRt
part_indextpart_obj((sE/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/structures.pyR2s(			c
Cs´tjjdƒ}d|_|j|d<d|_d|j_tj	|j_d|j_
|j|d<d|d<|j|dd<|j
|dd	<d|dd
<|dd
jdtt|jƒƒƒx,|jD]!}|dd
j|jƒƒqÐWtjj|dtƒtjj|ƒ|jjd
ditd6ƒtjj|dtƒjƒ}|jjd|ditd6ƒ|jjdƒtjj|d|dddtdtƒjƒS(NR+s
2010-11-15sfile-formatt	euca2oolsisself-destruct-urlRR$svolume-sizeRRtxsi_nils-- manifest content --
textratappendtpretty_prints%ss-- end of manifest content --tencodingsUTF-8t
standalonetxml_declaration(RRtElementtversionRRtimportertnameR.t__version__treleaseR	R
RtsettstrtlenRR1tdump_to_xmlt
deannotatetTruetetreetcleanup_namespacesRtdebugttostringtstrip(R
R2R*Rtpretty_manifest((sE/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/structures.pytdump_to_strKs0	
	

' cCs|j|jd|ƒƒdS(NR2(twriteRH(R
tfileobjR2((sE/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/structures.pytdump_to_fileobjosN(
Rt
__module__RRtclassmethodRRtFalseRHRK(((sE/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/structures.pyR"s

$R&cBseZd„Zd„ZRS(cCsCd|_d|_d|_d|_d|_d|_d|_dS(N(RRRRRR'R(R)(R
((sE/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/structures.pyRts						cCstjjddt|jƒƒ}d|d<|djdt|jƒƒ|djdt|jƒƒ|j	|d<|j
|d<|j|d<|j|d	<|S(
NRRs
byte-rangeRRRshead-urlsget-urls
delete-url(
RRR6R=RRR<RRRR'R(R)(R
R*((sE/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/structures.pyR?}s!




(RRLRR?(((sE/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/structures.pyR&ss		(Rt
lxml.etreeRtlxml.objectifyR.tobjectRR&(((sE/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/structures.pyt<module>s
Q
Back to Directory File Manager