ó ”ōXc@svddlmZddlmZmZmZddlmZddlm Z ddl m Z defd„ƒYZ dS( i’’’’(tArg(t IAMRequestt AS_ACCOUNTt arg_iprofile(t DeleteRole(tGetInstanceProfile(tRemoveRoleFromInstanceProfiletDeleteInstanceProfilec BsqeZdZeddƒeddddddddƒed d dddddd ƒegZd „Zd „Z RS(szDelete an instance profile This will break any running instances that depend upon access to the deleted instance profile.thelps1name of the instance profile to delete (required)s-rs --recursivetactiont store_truetroute_tosSremove all IAM resources associated with the instance profile firsts-ps --pretendshlist the resources that would be deleted instead of actually deleting them. Implies -r.c CsŠ|jjdƒs$|jjdƒrĄtj|d|jdd|jjdƒƒ}|jƒ}g}x_|jdiƒjdƒp…gD]3}|ji|jdƒd6|jd ƒd 6ƒq†Wng}|jjdƒrći|d 6S|jjdƒr€xˆ|D]}}tj|d |d d|jdd|jjdƒƒ}|jƒtj|d |d d|jjdƒƒ}|jƒqüWn|jƒS( Nt recursivetpretendtInstanceProfileNametDelegateAccounttInstanceProfiletRolestArntarntRoleNametnametroles( targstgetRt from_othertmaintappendRRtsend(tselftreqtresponseRtrole((sP/usr/lib/python2.7/site-packages/euca2ools/commands/iam/deleteinstanceprofile.pyR1s0$ (    cCs@|jjdƒr<dGHx"|dD]}d|dGHq"WndS(NR Rs R(RR(RtresultR ((sP/usr/lib/python2.7/site-packages/euca2ools/commands/iam/deleteinstanceprofile.pyt print_resultWsN( t__name__t __module__t DESCRIPTIONRRtNoneRtARGSRR"(((sP/usr/lib/python2.7/site-packages/euca2ools/commands/iam/deleteinstanceprofile.pyR#s  &N( trequestbuilderRteuca2ools.commands.iamRRRt!euca2ools.commands.iam.deleteroleRt)euca2ools.commands.iam.getinstanceprofileRt4euca2ools.commands.iam.removerolefrominstanceprofileRR(((sP/usr/lib/python2.7/site-packages/euca2ools/commands/iam/deleteinstanceprofile.pyts