Viewing File: /usr/lib/python2.7/site-packages/euca2ools/commands/euimage/installpackedimage.pyc

ó
¡ôXc@s¶ddlZddlZddlZddlmZddlmZddlmZm	Z	ddl
Z
ddlmZddl
mZddlmZdeee	fd	„ƒYZdS(
iÿÿÿÿN(tArg(t
HmacV4Auth(tFileTransferProgressBarMixintTabifyingMixin(tEC2(t	ImagePack(t	S3RequesttInstallPackedImagecBs+eZdZedddddƒedddƒedd	dd
ddƒeddd
ƒedddddƒedddddƒedddddƒedddddƒedddddƒedddddƒedddƒeddejƒeddejƒg
Zd „Zd!„Zd"„Z	RS(#s9***TECH PREVIEW***

Install a packed image into the cloudt
pack_filenametmetavartFILEthelpsthe pack to install (required)s	--profilesMwhich of the image's profiles to
                install (default: "default")s-bs--bucketsBUCKET[/PREFIX]s(bucket to upload the image to (required)s
--locations location constraint of the destination
                bucket (default: inferred from s3-location-constraint in
                configuration, or otherwise nones--privatekeysÙfile containing
                your private key to sign the bundle's manifest with.  This
                private key will also be required to unbundle the bundle in
                the future.  (instance-store only)s--certsLfile containing your
                X.509 certificate (instance-store only)s	--ec2certsSfile containing the
                cloud's X.509 certificate (instance-store only)s--usertACCOUNTs%your account ID (instance-store only)s--kerneltIMAGEs^ID of the kernel image to
                associate with this machine image (paravirtual only)s	--ramdisks_ID of the ramdisk image
                to associate with this machine image (paravirtual only)s	--ec2-urlscompute service endpoint URLs
--ec2-auths
--ec2-servicecCs¡tj|ƒ|jjdƒsMtj|jd|jjdƒƒ|jd<n|jjdƒs{tj|jƒ|jd<n|jjdƒsd|jd<ndS(Ntec2_serviceturltec2_urltec2_authtprofiletdefault(	Rt	configuretargstgetRt
from_othertserviceRtauth(tself((sQ/usr/lib/python2.7/site-packages/euca2ools/commands/euimage/installpackedimage.pyRIs
(c

Csúii|jd6|jd6d6i|jdd6|jdd6d6}tjƒ}tj|jdƒŽ}|jd|jjkr¹t	d	j
|jdd
j|jjjƒƒƒƒ‚n|j
ƒ«}tjƒ}d}|jdd
d|jjƒ}|jƒx]tra|jtjƒ}|s'Pn|j|ƒ|j|ƒ|t|ƒ7}|j|ƒqW|jƒWdQX|jƒ|jjkr«td|jj|jƒƒ‚n|jdƒ|jj |jd|||jj|jƒ}	|j!ƒWdQX|	S(NRRts3RRtec2RRs(no such profile: "{0}" (choose from {1})s, itlabelt
Decompressingtmaxvals?image appears to be corrupt (expected SHA256: {0}, actual: {1})("RRRttempfilet
TemporaryFileRtopentimage_mdtprofilest
ValueErrortformattjointkeyst
open_imagethashlibtsha256tget_progressbartpack_mdt
image_sizetstarttTruetreadt	euca2oolstBUFSIZEtupdatetwritetlentfinisht	hexdigesttimage_sha256sumtRuntimeErrortseektinstall_profiletclose(
Rtservicestunpacked_imagetpacktimagetdigestt
bytes_writtentpbartchunktimage_id((sQ/usr/lib/python2.7/site-packages/euca2ools/commands/euimage/installpackedimage.pytmainTsF
$
	

	
	cCs|jd|fƒGHdS(NR
(ttabify(RRF((sQ/usr/lib/python2.7/site-packages/euca2ools/commands/euimage/installpackedimage.pytprint_result€s(
t__name__t
__module__tDESCRIPTIONRtargparsetSUPPRESStARGSRRGRI(((sQ/usr/lib/python2.7/site-packages/euca2ools/commands/euimage/installpackedimage.pyR(s6				,(RMR*R trequestbuilderRtrequestbuilder.auth.awsRtrequestbuilder.mixinsRRR2teuca2ools.commands.ec2Rteuca2ools.commands.euimage.packRteuca2ools.commands.s3RR(((sQ/usr/lib/python2.7/site-packages/euca2ools/commands/euimage/installpackedimage.pyt<module>s	
Back to Directory File Manager