Current File : //usr/lib/python2.7/site-packages/euca2ools/commands/iam/deleterole.pyo
�
��Xc@s�ddlmZddlmZmZmZddlmZddlm	Z	ddl
mZddlm
Z
defd��YZd	S(
i����(tArg(t
IAMRequestt
AS_ACCOUNTtarg_role(tDeleteRolePolicy(tListInstanceProfilesForRole(tListRolePolicies(tRemoveRoleFromInstanceProfilet
DeleteRolecBsqeZdZedd�edddddddd�ed	d
dddddd�egZd�Zd
�Z	RS(s
Delete a rolethelps%name of the role to delete (required)s-cs--recursivetactiont
store_truetroute_tosGremove all IAM resources associated with the role
                firsts-ps	--pretendshlist the resources that would be deleted instead of
                actually deleting them.  Implies -c.c
Cs|jjd�s$|jjd�r!tj|d|jdd|jjd��}|j�}g}xJ|jd�pygD]3}|ji|jd�d6|jd�d	6�qzWtj|d|jdd|jjd��}|j�}g}x9|jd
�pgD]}|j|�qWng}g}|jjd�rQi|d6|d6S|jjd�rxP|D]H}tj|d|jdd|d	d|jjd��}|j�qjWxO|D]D}tj|d|jdd
|d|jjd��}|j�q�Wn|j	�S(Nt	recursivetpretendtRoleNametDelegateAccounttInstanceProfilestArntarntInstanceProfileNametnametPolicyNamestinstance_profilestpoliciest
PolicyName(
targstgetRt
from_othertmaintappendRRRtsend(tselftreqtresponseRtprofileRtpolicy((sE/usr/lib/python2.7/site-packages/euca2ools/commands/iam/deleterole.pyR0sH$



cCsc|jjd�r_dGHx|dD]}d|dGHq"WdGHx|dD]}d|GHqIWndS(NRsinstance profilesRs	RR(RR(R tresultR#R$((sE/usr/lib/python2.7/site-packages/euca2ools/commands/iam/deleterole.pytprint_result[sN(
t__name__t
__module__tDESCRIPTIONRRtNoneRtARGSRR&(((sE/usr/lib/python2.7/site-packages/euca2ools/commands/iam/deleterole.pyR%s		+N(trequestbuilderRteuca2ools.commands.iamRRRt'euca2ools.commands.iam.deleterolepolicyRt2euca2ools.commands.iam.listinstanceprofilesforroleRt'euca2ools.commands.iam.listrolepoliciesRt4euca2ools.commands.iam.removerolefrominstanceprofileRR(((sE/usr/lib/python2.7/site-packages/euca2ools/commands/iam/deleterole.pyt<module>s