�
��Xc@s�ddlZddlmZddlmZmZmZddlmZddl m
Z
ddlmZddl
mZdefd ��YZdS(
i����N(tArg(t
IAMRequestt
AS_ACCOUNTt arg_group(tDeleteGroupPolicy(tGetGroup(tListGroupPolicies(tRemoveUserFromGrouptDeleteGroupc
Bs�eZdZedd�edddddddd�ed d
dddd
dddej�edddddddd�egZ d�Z
d�ZRS(sDelete a groupthelps&name of the group to delete (required)s-rs--recursivetactiont
store_truetroute_tosXremove all user memberships and policies associated
with the group firsts-Rs--recursive-eucatdesttIsRecursivetstore_consttconstttrues-ps --pretends{list the user memberships and policies that would be
deleted instead of actually deleting them. Implies -r.cCs�|jds|jdr�tj|d|jdd|jd�}|j�jdg�}tj|d|jdd|jd�}|j�jdg�}ng}g}|jdr�ig|D]}|d^q�d6|d 6S|jdr�g|D]}|d
^q�}tj|d|jdd|d|jd�}|j�xJ|D]?}tj|d|jdd|d|jd�}|j�qKWn|j �SdS(
Nt recursivetpretendt GroupNametDelegateAccounttUserstPolicyNamestArntmemberstpoliciestUserNamet
user_namest
PolicyName(
targsRt
from_othertparamstmaintgetRRRtsend(tselftreqRRtmembertmember_namestpolicy((sF/usr/lib/python2.7/site-packages/euca2ools/commands/iam/deletegroup.pyR!2s8
!
cCsZ|jdrVdGHx|dD]}d|GHqWdGHx|dD]}d|GHq@WndS(NRtusersRs R(R(R$tresulttarnR(((sF/usr/lib/python2.7/site-packages/euca2ools/commands/iam/deletegroup.pytprint_resultTs
N(t__name__t
__module__tDESCRIPTIONRRtNonetargparsetSUPPRESSRtARGSR!R,(((sF/usr/lib/python2.7/site-packages/euca2ools/commands/iam/deletegroup.pyR%s "(R1trequestbuilderRteuca2ools.commands.iamRRRt(euca2ools.commands.iam.deletegrouppolicyRteuca2ools.commands.iam.getgroupRt(euca2ools.commands.iam.listgrouppoliciesRt*euca2ools.commands.iam.removeuserfromgroupRR(((sF/usr/lib/python2.7/site-packages/euca2ools/commands/iam/deletegroup.pyt<module>s |