Current 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						cCs�tjjddt|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