Current File : //usr/lib/python2.7/site-packages/euca2ools/commands/iam/deleteuser.pyc
�
��Xc@sddlZddlmZddlmZmZmZddlmZddl	m
Z
ddlmZddl
mZddlmZdd	lmZdd
lmZddlmZddlmZdd
lmZddlmZdefd��YZdS(i����N(tArg(t
IAMRequestt
AS_ACCOUNTtarg_user(tDeleteAccessKey(tDeleteLoginProfile(tDeleteSigningCertificate(tDeleteUserPolicy(tGetLoginProfile(tListAccessKeys(tListGroupsForUser(tListSigningCertificates(tListUserPolicies(tRemoveUserFromGroup(tAWSErrort
DeleteUserc
Bs�eZdZedd�edddddddd�ed	d
dddd
dddej�edddddddd�egZ	d�Z
d�ZRS(s
Delete a userthelps%name of the user to delete (required)s-rs--recursivetactiont
store_truetroute_tosOremove all IAM resources associated with the user
                        firsts-Rs--recursive-eucatdesttIsRecursivetstore_consttconstttrues-ps	--pretendsolist the resources that would be deleted instead of
                        actually deleting them. Implies -r.cCsr|jds|jdr�tj|d|jdd|jd�}|j�jdg�}tj|d|jdd|jd�}|j�jdg�}tj|d|jdd|jd�}|j�jdg�}tj|d|jdd|jd�}|j�jdg�}t	j|d|jdd|jd�}y|j�t
}Wq�tk
r�}|jd	kr�t
}q��q�Xng}g}g}g}t
}|jdr�i|d
6|d6|d6|d
6|d6S|jdrdxK|D]C}tj|d|jdd|dd|jd�}|j�q�WxG|D]?}	tj|d|jdd|	d|jd�}|j�qCWxK|D]C}
tj|d|jdd|
dd|jd�}|j�q�WxN|D]F}tj|d|jdgd|dd|jd�}|j�q�W|rdtj|d|jdd|jd�}|j�qdn|j�SdS(Nt	recursivetpretendtUserNametDelegateAccounttAccessKeyMetadatatPolicyNamestCertificatestGroupstNoSuchEntitytkeystpoliciestcertificatestgroupsthas_login_profiletAccessKeyIdt
PolicyNamet
CertificateIdt
user_namest	GroupName(targsR	t
from_othertparamstmaintgetRRR
RtTrueRtcodetFalseRRRR
Rtsend(tselftreqR"R#tcertsR%R&terrtkeytpolicytcerttgroup((sE/usr/lib/python2.7/site-packages/euca2ools/commands/iam/deleteuser.pyR/;s�

	









cCs�|jdr�dGHx|dD]}d|dGHqWdGHx|dD]}d|GHqDWdGHx|dD]}d|dGHqgWd	GHx"|d	D]}d|d
GHq�WndS(NRt
accesskeysR"s	R'R#R$R)R%tArn(R,(R5tresultR9R:R;R<((sE/usr/lib/python2.7/site-packages/euca2ools/commands/iam/deleteuser.pytprint_result�s

N(t__name__t
__module__tDESCRIPTIONRRtNonetargparsetSUPPRESSRtARGSR/R@(((sE/usr/lib/python2.7/site-packages/euca2ools/commands/iam/deleteuser.pyR.s		M(REtrequestbuilderRteuca2ools.commands.iamRRRt&euca2ools.commands.iam.deleteaccesskeyRt)euca2ools.commands.iam.deleteloginprofileRt/euca2ools.commands.iam.deletesigningcertificateRt'euca2ools.commands.iam.deleteuserpolicyRt&euca2ools.commands.iam.getloginprofileRt%euca2ools.commands.iam.listaccesskeysR	t(euca2ools.commands.iam.listgroupsforuserR
t.euca2ools.commands.iam.listsigningcertificatesRt'euca2ools.commands.iam.listuserpoliciesRt*euca2ools.commands.iam.removeuserfromgroupR
teuca2ools.exceptionsRR(((sE/usr/lib/python2.7/site-packages/euca2ools/commands/iam/deleteuser.pyt<module>s