launchpad.net/~rogpeppe/juju-core/500-errgo-fix@v0.0.0-20140213181702-000000002356/cmd/juju/authorisedkeys.go (about) 1 // Copyright 2012, 2013 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package main 5 6 import ( 7 "launchpad.net/gnuflag" 8 9 "launchpad.net/juju-core/cmd" 10 ) 11 12 var authKeysDoc = ` 13 "juju authorized-keys" is used to manage the ssh keys allowed to log on to 14 nodes in the Juju environment. 15 16 ` 17 18 type AuthorisedKeysCommand struct { 19 *cmd.SuperCommand 20 } 21 22 func NewAuthorisedKeysCommand() cmd.Command { 23 sshkeyscmd := &AuthorisedKeysCommand{ 24 SuperCommand: cmd.NewSuperCommand(cmd.SuperCommandParams{ 25 Name: "authorised-keys", 26 Doc: authKeysDoc, 27 UsagePrefix: "juju", 28 Purpose: "manage authorised ssh keys", 29 }), 30 } 31 sshkeyscmd.Register(&AddKeysCommand{}) 32 sshkeyscmd.Register(&DeleteKeysCommand{}) 33 sshkeyscmd.Register(&ImportKeysCommand{}) 34 sshkeyscmd.Register(&ListKeysCommand{}) 35 return sshkeyscmd 36 } 37 38 func (c *AuthorisedKeysCommand) SetFlags(f *gnuflag.FlagSet) { 39 c.SetCommonFlags(f) 40 }