Current File : //lib/python2.7/site-packages/euca2ools/commands/iam/createuser.pyo
�
��Xc@s�ddlZddlmZmZddlmZmZmZddlm	Z	ddl
mZddlm
Z
defd��YZdS(	i����N(tArgtMutuallyExclusiveArgList(t
IAMRequestt
AS_ACCOUNTtarg_user(tAddUserToGroup(tCreateAccessKey(tGetGroupt
CreateUsercBseZdZedd�edddddd�edd	d
d"dd�edd
dd
d"dd�eddd
dd
d"dd�eeddd
dd
d"dd�eddd
dd
d"dd��eddd
d"dd�eddd
dd
d"dd�eg	Zd�Z	d �Z
d!�ZRS(#sCreate a new userthelpsname of the new user (required)s-ps--pathtdesttPaths$path for the new user (default: "/")s-gs--group-nametroute_tos also add the new user to a groups--verifytactiont
store_truesKensure the group given with -g exists before doing
                anythings-ks--create-accesskeys6also create an access key for the new user and show its-vs	--verboses show the new user's ARN and GUIDs-ws--write-configs�output access keys and region information in the
                    form of a euca2ools.ini(5) configuration file instead of
                    by themselves (implies -k)s-ds--domains�the DNS domain to
                use for region information in configuration file output
                (default: based on IAM URL)s-ls--set-default-users�set this user as the default user for the region
                in euca2ools.ini(5) configuration file output.  This
                option is only useful when used with -w.cCs^|jjd�rZ|jjd�rZtj|d|jdd|jd�}|j�ndS(Ntverifyt
group_namet	GroupNametDelegateAccount(targstgetRt
from_othertparamstmain(tselftobj((sE/usr/lib/python2.7/site-packages/euca2ools/commands/iam/createuser.pyt
preprocess@s
$cCs�|jjd�rUtj|d|jdd|jdd|jd�}|j�n|jjd�sy|jjd�r�tj|d|jdd|jdd|jjd�d|jjd�d|jjd��}|j�}|j|�ndS(	NRtUserNameRRtcreate_accesskeytwrite_configtdomaintset_default_user(RRRRRRRtupdate(RtresultRt
key_result((sE/usr/lib/python2.7/site-packages/euca2ools/commands/iam/createuser.pytpostprocessHs

$
cCs�|jjd�r)|djtj�nS|jdrS|ddGH|ddGHnd|kr||ddGH|dd	GHndS(
NRt
configfiletverbosetUsertArntUserIdt	AccessKeytAccessKeyIdtSecretAccessKey(RRtwritetsyststdout(RR!((sE/usr/lib/python2.7/site-packages/euca2ools/commands/iam/createuser.pytprint_resultYs


N(t__name__t
__module__tDESCRIPTIONRRtNoneRRtARGSRR#R/(((sE/usr/lib/python2.7/site-packages/euca2ools/commands/iam/createuser.pyR$s.				(R-trequestbuilderRRteuca2ools.commands.iamRRRt%euca2ools.commands.iam.addusertogroupRt&euca2ools.commands.iam.createaccesskeyRteuca2ools.commands.iam.getgroupRR(((sE/usr/lib/python2.7/site-packages/euca2ools/commands/iam/createuser.pyt<module>s