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

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