Documentation ¶
Overview ¶
The controller package groups various commands that are based on talking directly to the controller, and not environments in the controller.
Index ¶
- func NewCreateModelCommand() cmd.Command
- func NewDestroyCommand() cmd.Command
- func NewKillCommand() cmd.Command
- func NewListBlocksCommand() cmd.Command
- func NewListControllersCommand() cmd.Command
- func NewListModelsCommand() cmd.Command
- func NewRegisterCommand() cmd.Command
- func NewRemoveBlocksCommand() cmd.Command
- func NewShowControllerCommand() cmd.Command
- type AccountDetails
- type BootstrapConfig
- type ControllerDetails
- type ControllerItem
- type ControllerSet
- type CreateModelAPI
- type ModelDetails
- type ModelManagerAPI
- type ModelSet
- type ModelsSysAPI
- type ShowControllerDetails
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCreateModelCommand ¶
NewCreateModelCommand returns a command to create an model.
func NewDestroyCommand ¶
NewDestroyCommand returns a command to destroy a controller.
func NewKillCommand ¶
NewKillCommand returns a command to kill a controller. Killing is a forceful destroy.
func NewListBlocksCommand ¶
NewListBlocksCommand returns a command to list the blocks in a controller.
func NewListControllersCommand ¶
NewListControllersCommand returns a command to list registered controllers.
func NewListModelsCommand ¶
NewListModelsCommand returns a command to list models.
func NewRegisterCommand ¶
NewRegisterCommand returns a command to allow the user to register a controller.
func NewRemoveBlocksCommand ¶
NewRemoveBlocksCommand returns a command that allows a controller admin to remove blocks from the controller.
func NewShowControllerCommand ¶
NewShowControllerCommand returns a command to show details of the desired controllers.
Types ¶
type AccountDetails ¶
type AccountDetails struct { // User is the username for the account. User string `yaml:"user" json:"user"` // Password is the password for the account. Password string `yaml:"password,omitempty" json:"password,omitempty"` // Models is a collection of all models for this controller. Models map[string]ModelDetails `yaml:"models,omitempty" json:"models,omitempty"` // CurrentModel is the name of the current model for this controller CurrentModel string `yaml:"current-model,omitempty" json:"current-model,omitempty"` }
AccountDetails holds details of an account to show.
type BootstrapConfig ¶
type BootstrapConfig struct { Config map[string]interface{} `yaml:"config,omitempty" json:"config,omitempty"` Cloud string `yaml:"cloud" json:"cloud"` CloudType string `yaml:"cloud-type" json:"cloud-type"` CloudRegion string `yaml:"region,omitempty" json:"region,omitempty"` CloudEndpoint string `yaml:"endpoint,omitempty" json:"endpoint,omitempty"` CloudStorageEndpoint string `yaml:"storage-endpoint,omitempty" json:"storage-endpoint,omitempty"` Credential string `yaml:"credential,omitempty" json:"credential,omitempty"` }
BootstrapConfig holds the configuration used to bootstrap a controller.
type ControllerDetails ¶
type ControllerDetails struct { // ControllerUUID is the unique ID for the controller. ControllerUUID string `yaml:"uuid" json:"uuid"` // APIEndpoints is the collection of API endpoints running in this controller. APIEndpoints []string `yaml:"api-endpoints,flow" json:"api-endpoints"` // CACert is a security certificate for this controller. CACert string `yaml:"ca-cert" json:"ca-cert"` }
ControllerDetails holds details of a controller to show.
type ControllerItem ¶
type ControllerItem struct { ModelName string `yaml:"current-model,omitempty" json:"current-model,omitempty"` User string `yaml:"user,omitempty" json:"user,omitempty"` Server string `yaml:"recent-server,omitempty" json:"recent-server,omitempty"` ControllerUUID string `yaml:"uuid" json:"uuid"` APIEndpoints []string `yaml:"api-endpoints,flow" json:"api-endpoints"` CACert string `yaml:"ca-cert" json:"ca-cert"` }
ControllerItem defines the serialization behaviour of controller information.
type ControllerSet ¶
type ControllerSet struct { Controllers map[string]ControllerItem `yaml:"controllers" json:"controllers"` CurrentController string `yaml:"current-controller" json:"current-controller"` }
ControllerSet contains the set of controllers known to the client, and name of the current controller.
type CreateModelAPI ¶
type ModelDetails ¶
type ModelDetails struct { // ModelUUID holds the details of a model. ModelUUID string `yaml:"uuid" json:"uuid"` }
ModelDetails holds details of a model to show.
type ModelManagerAPI ¶
type ModelManagerAPI interface { Close() error ListModels(user string) ([]base.UserModel, error) ModelInfo([]names.ModelTag) ([]params.ModelInfoResult, error) }
ModelManagerAPI defines the methods on the model manager API that the models command calls.
type ModelSet ¶
type ModelSet struct { Models []common.ModelInfo `yaml:"models" json:"models"` CurrentModel string `yaml:"current-model,omitempty" json:"current-model,omitempty"` }
ModelSet contains the set of models known to the client, and UUID of the current model.
type ModelsSysAPI ¶
ModelsSysAPI defines the methods on the controller manager API that the list models command calls.
type ShowControllerDetails ¶
type ShowControllerDetails struct { // Details contains the same details that client store caches for this controller. Details ControllerDetails `yaml:"details,omitempty" json:"details,omitempty"` // Accounts is a collection of accounts for this controller. Accounts map[string]*AccountDetails `yaml:"accounts,omitempty" json:"accounts,omitempty"` // CurrentAccount is the name of the current account for this controller. CurrentAccount string `yaml:"current-account,omitempty" json:"current-account,omitempty"` // BootstrapConfig contains the bootstrap configuration for this controller. // This is only available on the client that bootstrapped the controller. BootstrapConfig *BootstrapConfig `yaml:"bootstrap-config,omitempty" json:"bootstrap-config,omitempty"` // Errors is a collection of errors related to accessing this controller details. Errors []string `yaml:"errors,omitempty" json:"errors,omitempty"` }