github.com/altoros/juju-vmware@v0.0.0-20150312064031-f19ae857ccca/cmd/juju/machine/machine.go (about) 1 // Copyright 2014 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package machine 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.machine") 14 15 const machineCommandDoc = ` 16 "juju machine" provides commands to add and remove machines in the Juju environment. 17 ` 18 19 const machineCommandPurpose = "manage machines" 20 21 // NewSuperCommand creates the user supercommand and registers the subcommands 22 // that it supports. 23 func NewSuperCommand() cmd.Command { 24 machineCmd := cmd.NewSuperCommand(cmd.SuperCommandParams{ 25 Name: "machine", 26 Doc: machineCommandDoc, 27 UsagePrefix: "juju", 28 Purpose: machineCommandPurpose, 29 }) 30 machineCmd.Register(envcmd.Wrap(&AddCommand{})) 31 machineCmd.Register(envcmd.Wrap(&RemoveCommand{})) 32 return machineCmd 33 }