github.com/makyo/juju@v0.0.0-20160425123129-2608902037e9/apiserver/params/controller.go (about) 1 // Copyright 2016 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package params 5 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"` 12 } 13 14 // ModelBlockInfo holds information about an model and its 15 // current blocks. 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"` 21 } 22 23 // ModelBlockInfoList holds information about the blocked models 24 // for a controller. 25 type ModelBlockInfoList struct { 26 Models []ModelBlockInfo `json:"models,omitempty"` 27 } 28 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 { 33 All bool `json:"all"` 34 } 35 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"` 43 } 44 45 // ModelStatusResults holds status information about a group of models. 46 type ModelStatusResults struct { 47 Results []ModelStatus `json:"models"` 48 }