Current File : //lib/python2.7/site-packages/euca2ools/commands/ec2/describeimages.pyo
�
��Xc@sbddlmZmZmZddlmZddlZddlmZdefd��YZ	dS(i����(tArgtFiltertGenericTagFilter(t
ArgumentErrorN(t
EC2RequesttDescribeImagesc Bs`eZdZeddddddd�edd	d
dddUdd
�eddddddd
ddd�eddddddd
ddd�gZeddd�eddd�eddd�eddd �ed!dd"�ed#dd$�ed%dd&�ed'dd(�ed)�ed*dd+�ed,dd-�ed.�ed/�ed0�ed1dd2�ed3dd4�ed5dd6�ed7dd8�ed9dd:�ed;�ed<�ed=dd>�ed?dd@�edAddB�edCddD�edEddF�edGddH�edIddJ�edKddL�gZdMdNdOdPgZ	dQ�Z
dR�ZdS�ZdT�Z
RS(Vs�Show information about images

By default, only images your account owns and images for which your account has explicit launch permissions are shown.tImageIdtmetavartIMAGEtnargst*thelps limit results to specific imagess-as--alltactiont
store_truetroute_tosdescribe all imagess-os--ownertdesttOwnertACCOUNTtappends,describe images owned by the specified owners-xs--executable-bytExecutableBys_describe images for which the specified account has
                explicit launch permissionstarchitecturesCPU architectures*block-device-mapping.delete-on-terminationsKwhether a volume is deleted upon instance
                      terminations block-device-mapping.device-names,device name for a volume mapped to the images block-device-mapping.snapshot-ids,snapshot ID for a volume mapped to the images block-device-mapping.volume-sizes,volume size for a volume mapped to the images block-device-mapping.volume-types,volume type for a volume mapped to the imagetdescriptionsimage descriptiont
hypervisorsimage's hypervisor typesimage-ids
image-types.image type ("machine", "kernel", or "ramdisk")s	is-publicswhether the image is publics	kernel-idsmanifest-locationtnamesowner-aliassimage owner's account aliassowner-idsimage owner's account IDtplatforms"windows" for Windows imagessproduct-codes&product code associated with the imagesproduct-code.types^type of product code
                      associated with the image ("devpay", "marketplace")s
ramdisk-idsroot-device-namesroot-device-types,root device type ("ebs" or "instance-store")tstatesGimage state ("available", "pending", or
                      "failed")sstate-reason-codes,reason code for the most recent state changesstate-reason-messages(message for the most recent state changestag-keys"key of a tag assigned to the images	tag-values$value of a tag assigned to the imagestag:KEYs"specific tag key/value combinationsvirtualization-types,virtualization type ("paravirtual" or "hvm")t	imagesSettproductCodestblockDeviceMappingttagSetcCs�tj|�|jjdt�r�|jjd�rCtd��n|jjd�rdtd��n|jjd�r�td��q�ndS(NtallRs4argument -a/--all: not allowed with a list of imagesRs?argument -a/--all: not allowed with argument -x/--executable-byRs7argument -a/--all: not allowed with argument -o/--owner(Rt	configuretargstgettFalseR(tself((sI/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/describeimages.pyR`s
cs�t�fd�dD��s�dg�jd<�j�}�jd=dg�jd<�j�}�jd=|jdg�|jdg�|d<|S�j�SdS(	Nc3s!|]}�jj|�VqdS(N(R R!(t.0titem(R#(sI/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/describeimages.pys	<genexpr>nsRRRRR#R(sallsImageIdsExecutableBysOwner(tanytparamstsendR!(R#townedt
executable((R#sI/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/describeimages.pytmainms


cCsni}x.|jdg�D]}|j|d|�qWx0ttj|��D]\}}|j|�qMWdS(NRtimageId(R!t
setdefaulttsortedtsixt	iteritemstprint_image(R#tresulttimagestimaget_((sI/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/describeimages.pytprint_result}s
"cCsz|jd�dkr'|jd�}n*dj|jdd�|jd�f�}|jd|jd	�||jd
�p�|jd�|jd�|jd�d
kr�dnd|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�f�GHx'|jdg�D]}|j|�q)Wx3|jdg�D]}|j||jd	��qSWdS(NtrootDeviceTypesinstance-storet
imageLocationt/timageOwnerIdtRRR,timageOwnerAliast
imageStatetisPublicttruetpublictprivateRt	imageTypetkernelIdt	ramdiskIdRtvirtualizationTypeRRR(R!tjointtabifytprint_blockdevice_mappingtprint_resource_tag(R#R4t	imagenametmappingttag((sI/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/describeimages.pyR1�s" N(t__name__t
__module__tDESCRIPTIONRtNonetARGSRRtFILTERSt	LIST_TAGSRR+R6R1(((sI/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/describeimages.pyR!sx																						
		(
trequestbuilderRRRtrequestbuilder.exceptionsRR/teuca2ools.commands.ec2RR(((sI/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/describeimages.pyt<module>s