Current File : //lib/python2.7/site-packages/euca2ools/commands/ec2/modifyimageattribute.pyo
�
��Xc@sPddlmZmZddlmZddlmZdefd��YZdS(i����(tArgtMutuallyExclusiveArgList(t
ArgumentError(t
EC2RequesttModifyImageAttributecBs�eZdZeddddd�eeddddd	dd
�edddd
dddddd�edddddd!dd��j�edddddddgdd!dd�edddddddgdd!dd�gZd�Zd �Z	RS("sModify an attribute of an imagetImageIdtmetavartIMAGEthelpsimage to modifys
--descriptiontdestsDescription.ValuetDESCschange the image's descriptions-ps--product-codetProductCodetCODEtactiontappendsIproduct code to add to the given
                    instance-store images-ls--launch-permissiont
store_truetroute_tos*grant/revoke launch permissions with -a/-rs-as--addtENTITYtdefaultsMaccount to grant launch permission, or
                "all" for all accountss-rs--removesSaccount to remove launch
                permission from, or "all" for all accountscCsa|jjd�ri}xl|jjdg�D]U}|jdg�|dkrk|dji|d6�q.|dji|d6�q.Wxl|jjdg�D]U}|jdg�|dkr�|dji|d6�q�|dji|d6�q�W|std	��n||jd
<nB|jjd�r<td��n|jjd�r]td��ndS(
Ntlaunch_permissiontaddtAddtalltGrouptUserIdtremovetRemovesBat least one entity must be specified with -a/--add or -r/--removetLaunchPermissions>argument -a/--add may only be used with -l/--launch-permissionsAargument -r/--remove may only be used with -l/--launch-permission(targstgett
setdefaultRRtparams(tselftlpermtentity((sO/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/modifyimageattribute.pyt
preprocess5s&cCsn|jjd�r=|jd|jdd|jdf�GHn|jjd�r�x9|jdD]'}|jd|jdd|f�GHq]Wn|jjd�rjxb|jdjd	g�D]G}x>|j�D]0\}}|jd
|jdd||f�GHq�Wq�Wxe|jdjdg�D]G}x>|j�D]0\}}|jd
|jdd
||f�GHq/WqWndS(NsDescription.ValuetdescriptionRRtproductcodestproductCodeRRRtlaunchPermissiontADDRtREMOVE(RRttabifytNoneRtitems(R t_tcodeRtentity_typetentity_name((sO/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/modifyimageattribute.pytprint_resultPs$ 	
 	
N(
t__name__t
__module__tDESCRIPTIONRRR+trequiredtARGSR#R1(((sO/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/modifyimageattribute.pyR s&	N(trequestbuilderRRtrequestbuilder.exceptionsRteuca2ools.commands.ec2RR(((sO/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/modifyimageattribute.pyt<module>s