github.com/cloud-green/juju@v0.0.0-20151002100041-a00291338d3d/cmd/juju/system/system.go (about) 1 // Copyright 2015 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package system 5 6 import ( 7 "github.com/juju/cmd" 8 "github.com/juju/loggo" 9 10 "github.com/juju/juju/cmd/envcmd" 11 "github.com/juju/juju/juju" 12 ) 13 14 var logger = loggo.GetLogger("juju.cmd.juju.system") 15 16 const commandDoc = ` 17 18 A Juju system is a Juju environment that runs the API servers, and manages the 19 underlying database used by Juju. The initial environment that is created when 20 bootstrapping is called a "system". 21 22 The "juju system" command provides the commands to create, use, and destroy 23 environments running withing a Juju system. 24 25 System commands also allow the user to connect to an existing system using the 26 "login" command, and to use an environment that already exists in the current 27 system through the "use-environment" command. 28 29 see also: 30 juju help juju-systems 31 ` 32 33 // NewSuperCommand creates the system supercommand and registers the 34 // subcommands that it supports. 35 func NewSuperCommand() cmd.Command { 36 systemCmd := cmd.NewSuperCommand(cmd.SuperCommandParams{ 37 Name: "system", 38 Doc: commandDoc, 39 UsagePrefix: "juju", 40 Purpose: "manage systems", 41 }) 42 43 systemCmd.Register(&ListCommand{}) 44 systemCmd.Register(&LoginCommand{}) 45 systemCmd.Register(&DestroyCommand{}) 46 systemCmd.Register(&KillCommand{apiDialerFunc: juju.NewAPIFromName}) 47 systemCmd.Register(envcmd.WrapSystem(&ListBlocksCommand{})) 48 systemCmd.Register(envcmd.WrapSystem(&EnvironmentsCommand{})) 49 systemCmd.Register(envcmd.WrapSystem(&CreateEnvironmentCommand{})) 50 systemCmd.Register(envcmd.WrapSystem(&RemoveBlocksCommand{})) 51 systemCmd.Register(envcmd.WrapSystem(&UseEnvironmentCommand{})) 52 53 return systemCmd 54 }