1
// Copyright 2016 Canonical Ltd.
2
// Licensed under the AGPLv3, see LICENCE file for details.
6
// DestroyControllerArgs holds the arguments for destroying a controller.
7
type DestroyControllerArgs struct {
8
// DestroyModels specifies whether or not the hosted models
9
// should be destroyed as well. If this is not specified, and there are
10
// other hosted models, the destruction of the controller will fail.
11
DestroyModels bool `json:"destroy-models"`
14
// ModelBlockInfo holds information about an model and its
16
type ModelBlockInfo struct {
17
Name string `json:"name"`
18
UUID string `json:"model-uuid"`
19
OwnerTag string `json:"owner-tag"`
20
Blocks []string `json:"blocks"`
23
// ModelBlockInfoList holds information about the blocked models
25
type ModelBlockInfoList struct {
26
Models []ModelBlockInfo `json:"models,omitempty"`
29
// RemoveBlocksArgs holds the arguments for the RemoveBlocks command. It is a
30
// struct to facilitate the easy addition of being able to remove blocks for
31
// individual models at a later date.
32
type RemoveBlocksArgs struct {
36
// ModelStatus holds information about the status of a juju model.
37
type ModelStatus struct {
38
ModelTag string `json:"model-tag"`
39
Life Life `json:"life"`
40
HostedMachineCount int `json:"hosted-machine-count"`
41
ServiceCount int `json:"service-count"`
42
OwnerTag string `json:"owner-tag"`
45
// ModelStatusResults holds status information about a group of models.
46
type ModelStatusResults struct {
47
Results []ModelStatus `json:"models"`
50
// InitiateModelMigrationArgs holds the details required to start one
51
// or more model migrations.
52
type InitiateModelMigrationArgs struct {
53
Specs []ModelMigrationSpec `json:"specs"`
56
// ModelMigrationSpec holds the details required to start the
57
// migration of a single model.
58
type ModelMigrationSpec struct {
59
ModelTag string `json:"model-tag"`
60
TargetInfo ModelMigrationTargetInfo `json:"target-info"`
63
// ModelMigrationTargetInfo holds the details required to connect to
64
// and authenticate with a remote controller for model migration.
65
type ModelMigrationTargetInfo struct {
66
ControllerTag string `json:"controller-tag"`
67
Addrs []string `json:"addrs"`
68
CACert string `json:"ca-cert"`
69
AuthTag string `json:"auth-tag"`
70
Password string `json:"password"`
73
// InitiateModelMigrationResults is used to return the result of one
74
// or more attempts to start model migrations.
75
type InitiateModelMigrationResults struct {
76
Results []InitiateModelMigrationResult `json:"results"`
79
// InitiateModelMigrationResult is used to return the result of one
80
// model migration initiation attempt.
81
type InitiateModelMigrationResult struct {
82
ModelTag string `json:"model-tag"`
83
Error *Error `json:"error"`
84
Id string `json:"id"` // the ID for the migration attempt