1
// Copyright 2016 Canonical Ltd.
2
// Licensed under the AGPLv3, see LICENCE file for details.
4
// Package commands provides functionality for registering all the romulus commands.
9
"github.com/juju/juju/cmd/modelcmd"
11
"github.com/juju/romulus/cmd/agree"
12
"github.com/juju/romulus/cmd/allocate"
13
"github.com/juju/romulus/cmd/createbudget"
14
"github.com/juju/romulus/cmd/listagreements"
15
"github.com/juju/romulus/cmd/listbudgets"
16
"github.com/juju/romulus/cmd/listplans"
17
"github.com/juju/romulus/cmd/setbudget"
18
"github.com/juju/romulus/cmd/setplan"
19
"github.com/juju/romulus/cmd/showbudget"
20
"github.com/juju/romulus/cmd/updateallocation"
23
type commandRegister interface {
27
// RegisterAll registers all romulus commands with the
28
// provided command registry.
29
func RegisterAll(r commandRegister) {
30
register := func(c cmd.Command) {
31
switch c := c.(type) {
32
case modelcmd.ModelCommand:
33
r.Register(modelcmd.Wrap(c))
34
case modelcmd.CommandBase:
35
r.Register(modelcmd.WrapBase(c))
41
register(agree.NewAgreeCommand())
42
register(listagreements.NewListAgreementsCommand())
43
register(allocate.NewAllocateCommand())
44
register(listbudgets.NewListBudgetsCommand())
45
register(createbudget.NewCreateBudgetCommand())
46
register(listplans.NewListPlansCommand())
47
register(setbudget.NewSetBudgetCommand())
48
register(setplan.NewSetPlanCommand())
49
register(showbudget.NewShowBudgetCommand())
50
register(updateallocation.NewUpdateAllocationCommand())