github.com/cloud-green/juju@v0.0.0-20151002100041-a00291338d3d/cmd/juju/user/user.go (about) 1 // Copyright 2014 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package user 5 6 import ( 7 "github.com/juju/cmd" 8 "github.com/juju/loggo" 9 10 "github.com/juju/juju/cmd/envcmd" 11 ) 12 13 var logger = loggo.GetLogger("juju.cmd.juju.user") 14 15 const userCommandDoc = ` 16 "juju user" is used to manage the user accounts and access control in 17 the Juju environment. 18 19 See Also: 20 juju help users 21 ` 22 23 const userCommandPurpose = "manage user accounts and access control" 24 25 // NewSuperCommand creates the user supercommand and registers the subcommands 26 // that it supports. 27 func NewSuperCommand() cmd.Command { 28 usercmd := cmd.NewSuperCommand(cmd.SuperCommandParams{ 29 Name: "user", 30 Doc: userCommandDoc, 31 UsagePrefix: "juju", 32 Purpose: userCommandPurpose, 33 }) 34 usercmd.Register(envcmd.WrapSystem(&AddCommand{})) 35 usercmd.Register(envcmd.WrapSystem(&ChangePasswordCommand{})) 36 usercmd.Register(envcmd.WrapSystem(&CredentialsCommand{})) 37 usercmd.Register(envcmd.WrapSystem(&InfoCommand{})) 38 usercmd.Register(envcmd.WrapSystem(&DisableCommand{})) 39 usercmd.Register(envcmd.WrapSystem(&EnableCommand{})) 40 usercmd.Register(envcmd.WrapSystem(&ListCommand{})) 41 return usercmd 42 } 43 44 // UserCommandBase is a helper base structure that has a method to get the 45 // user manager client. 46 type UserCommandBase struct { 47 envcmd.SysCommandBase 48 }