ó ¡ôXc@sLddlZddlmZmZddlmZdefd„ƒYZdS(iÿÿÿÿN(tArgtMutuallyExclusiveArgList(t EC2RequesttDescribeInstanceAttributecBsåeZdZedddddƒeedddd d d d d ddƒeddd d d d dddƒeddd d d d dddƒedddd d d d dddƒedddd d d d dddƒeddd d d d dddƒed d!dd d d d d"dd#ƒed$dd d d d d%dd&ƒed'dd d d d d(dd)ƒed*dd d d d d+dd,ƒed-dd d d d d.dd/ƒed0dd d d d d1dd2ƒƒ jƒgZd ddgZd3„ZRS(4s^Show one of an instance's attributes. Note that exactly one attribute may be shown at a time.t InstanceIdtmetavartINSTANCEthelps.ID of the instance to show info for (required)s-bs--block-device-mappingtdestt Attributetactiont store_consttconsttblockDeviceMappingsshow block device mappingss--disable-api-terminationtdisableApiTerminations$show whether termination is disableds--ebs-optimizedt ebsOptimizedsIshow whether the root volume is optimized for EBS I/Os-gs --group-idtgroupSets0show the security groups the instance belongs tos-ps--product-codet productCodess!show any associated product codess&--instance-initiated-shutdown-behaviort!instanceInitiatedShutdownBehaviorsPshow whether the instance stops or terminates when shut downs-ts--instance-typet instanceTypesshow the instance's types--kerneltkernelsPshow the ID of the kernel image associated with the instances --ramdisktramdisksQshow the ID of the ramdisk image associated with the instances--root-device-nametrootDeviceNamesRshow the name of the instance's root device (e.g. '/dev/sda1')s--source-dest-checktsourceDestChecksc[VPC only] show whether source/destination checking is enabled for the instances --user-datatuserDatasshow the instance's user-datacCs-|jddkr†x|jdgƒD]Y}|jdiƒ}|jd|jdƒ|jdƒ|jdƒ|jdƒfƒGHq&Wn£|jdd krád „|jd gƒDƒ}|jd |jd ƒd j|ƒfƒGHnH|jdd kr<d„|jd gƒDƒ}|jd |jd ƒd j|ƒfƒGHní|jddkrÄtj|jdiƒjddƒƒ}|r¡|jd|jd ƒfƒGH|GHq)|jd|jd ƒdfƒGHne|j|jdƒ}t|tƒrd|kr|d}n|j|jd|jd ƒ|fƒGHdS(NR R tebst BLOCKDEVICEt deviceNametvolumeIdt attachTimetdeleteOnTerminationRcss-|]#}|jdƒp$|jdƒVqdS(tgroupIdt groupNameN(tget(t.0tgroup((sT/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/describeinstanceattribute.pys ^st instanceIds, Rcss|]}|jdƒVqdS(t productCodeN(R!(R"tcode((sT/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/describeinstanceattribute.pys esRtvaluet( targsR!ttabifytjointbase64t b64decodetNonet isinstancetdict(tselftresulttmappingRtgroupstcodestuserdatatattr((sT/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/describeinstanceattribute.pyt print_resultQs8# ( t__name__t __module__t DESCRIPTIONRRtrequiredtARGSt LIST_TAGSR8(((sT/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/describeinstanceattribute.pyR!sT      (R,trequestbuilderRRteuca2ools.commands.ec2RR(((sT/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/describeinstanceattribute.pyts