�
��Xc@stddlZddlZddlZddlmZmZddlmZddlm Z defd��YZ
dS(i����N(tArgtMutuallyExclusiveArgList(tBaseCommand(t Euca2oolstReleaseRolecBskeZdZeZeeddddd
dddd�ed dd
dd
dddd��gZd�Z RS(s Release IAM role credentials
The %(prog)s utility removes the credentials created by
euare-assumerole(1) by outputting shellcode that deletes
the environment variables it creates. Use it inside an eval
command to make this process seamless:
$ eval `euare-releaserole`
Note that if the credentials used to initially assume the role
were supplied in the form of environment variables those
environment variables will need to be reset:
$ source eucarcs-ctdestt
csh_outputtroute_totactiont
store_truethelpsfgenerate C-shell commands on
stdout (default if SHELL looks like a csh-style shells-st sh_outputs�generate Bourne shell
commands on stdout (default if SHELL does not look
like a csh-style shellcCs�xkdD]c}|jjd�sM|jjd
�rVtjdd�jd�rVd}nd}|j|�GHqWHdGHdjdjd�tjD���GHdS(NtAWS_ACCESS_KEY_IDtAWS_ACCESS_KEYtEC2_ACCESS_KEYtAWS_SECRET_ACCESS_KEYtAWS_SECRET_KEYtEC2_SECRET_KEYtAWS_SESSION_TOKENtAWS_SECURITY_TOKENtAWS_CREDENTIAL_EXPIRATIONtEC2_USER_IDtAWS_CREDENTIAL_FILERRtSHELLttcshs
unsetenv {0};s
unset {0};s5# If you can read this, rerun this program with eval:s# eval `{0}`t css|]}tj|�VqdS(N(tpipestquote(t.0targ((sG/usr/lib/python2.7/site-packages/euca2ools/commands/misc/releaserole.pys <genexpr>Os(RR
RRRRRRRRR( targstgettostgetenvtendswithtformattjointsystargv(tselft_tvartfmt((sG/usr/lib/python2.7/site-packages/euca2ools/commands/misc/releaserole.pytprint_result>s
N(
t__name__t
__module__tDESCRIPTIONRtSUITERRtNonetARGSR,(((sG/usr/lib/python2.7/site-packages/euca2ools/commands/misc/releaserole.pyR$s(R!RR&trequestbuilderRRtrequestbuilder.commandRteuca2ools.commandsRR(((sG/usr/lib/python2.7/site-packages/euca2ools/commands/misc/releaserole.pyt<module>s |