Current File : //usr/lib/python2.7/site-packages/euca2ools/commands/iam/deleteinstanceprofile.pyo
�
��Xc@svddlmZddlmZmZmZddlmZddlm	Z	ddl
mZdefd��YZdS(	i����(tArg(t
IAMRequestt
AS_ACCOUNTtarg_iprofile(t
DeleteRole(tGetInstanceProfile(tRemoveRoleFromInstanceProfiletDeleteInstanceProfilecBsqeZdZedd�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|d6S|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__tDESCRIPTIONRRtNoneRtARGSRR"(((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.pyt<module>s