Viewing File: /usr/lib/python2.7/site-packages/euca2ools/commands/iam/deleterole.pyc

ó
¡ô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
Back to Directory File Manager