~juju-qa/ubuntu/xenial/juju/xenial-2.0-beta3

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/cmd/juju/storage/storage.go

  • Committer: Martin Packman
  • Date: 2016-03-30 19:31:08 UTC
  • mfrom: (1.1.41)
  • Revision ID: martin.packman@canonical.com-20160330193108-h9iz3ak334uk0z5r
Merge new upstream source 2.0~beta3

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
package storage
8
8
 
9
9
import (
10
 
        "github.com/juju/cmd"
11
10
        "github.com/juju/errors"
12
 
        "github.com/juju/loggo"
13
11
        "github.com/juju/names"
14
12
 
15
13
        "github.com/juju/juju/api/storage"
18
16
        "github.com/juju/juju/cmd/modelcmd"
19
17
)
20
18
 
21
 
var logger = loggo.GetLogger("juju.cmd.juju.storage")
22
 
 
23
 
const storageCmdDoc = `
24
 
"juju storage" is used to manage storage instances in
25
 
 the Juju model.
26
 
`
27
 
 
28
 
const storageCmdPurpose = "manage storage instances"
29
 
 
30
 
// NewSuperCommand creates the storage supercommand and
31
 
// registers the subcommands that it supports.
32
 
func NewSuperCommand() cmd.Command {
33
 
        storagecmd := cmd.NewSuperCommand(
34
 
                cmd.SuperCommandParams{
35
 
                        Name:        "storage",
36
 
                        Doc:         storageCmdDoc,
37
 
                        UsagePrefix: "juju",
38
 
                        Purpose:     storageCmdPurpose,
39
 
                })
40
 
        storagecmd.Register(newShowCommand())
41
 
        storagecmd.Register(newListCommand())
42
 
        storagecmd.Register(newAddCommand())
43
 
        storagecmd.Register(newPoolSuperCommand())
44
 
        storagecmd.Register(newVolumeSuperCommand())
45
 
        storagecmd.Register(NewFilesystemSuperCommand())
46
 
        return storagecmd
47
 
}
48
 
 
49
19
// StorageCommandBase is a helper base structure that has a method to get the
50
20
// storage managing client.
51
21
type StorageCommandBase struct {