Current File : //lib/python2.7/site-packages/euca2ools/commands/ec2/modifysnapshotattribute.pyc
�
��Xc@sJddlmZddlmZddlmZdefd��YZdS(i����(t
EC2Request(tArg(t
ArgumentErrortModifySnapshotAttributecBs�eZdZeddddd�edddd	d
edddd�ed
ddddddgdddd�edddddddgdddd�gZd�Zd�ZRS(s!Modify an attribute of a snapshott
SnapshotIdtmetavartSNAPSHOTthelpsID of the snapshot to modifys-cs--create-volume-permissiontactiont
store_truetrequiredtroute_tos2grant/revoke volume creation permission with -a/-rs-as--addtENTITYtappendtdefaults6account to grant permission, or "all" for all accountss-rs--removesLaccount to remove 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(
Ntcreate_volume_permissiontaddtAddtalltGrouptUserIdtremovetRemovesBat least one entity must be specified with -a/--add or -r/--removetCreateVolumePermissionsEargument -a/--add may only be used with -c/--create-volume-permissionsHargument -r/--remove may only be used with -c/--create-volume-permission(targstgett
setdefaultR
Rtparams(tselftcvpermtentity((sR/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/modifysnapshotattribute.pyt
preprocess.s&cCs�|jjd�r�xb|jdjdg�D]G}x>|j�D]0\}}|jd|jdd||f�GHq?Wq,Wxe|jdjdg�D]G}x>|j�D]0\}}|jd|jdd||f�GHq�Wq�WndS(	NRRRtcreateVolumePermissionRtADDRtREMOVE(RRRtitemsttabify(Rt_Rtentity_typetentity_name((sR/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/modifysnapshotattribute.pytprint_resultIs 	
 	
N(	t__name__t
__module__tDESCRIPTIONRtTruetNonetARGSRR((((sR/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/modifysnapshotattribute.pyRs	N(teuca2ools.commands.ec2RtrequestbuilderRtrequestbuilder.exceptionsRR(((sR/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/modifysnapshotattribute.pyt<module>s