Documentation ¶
Index ¶
- type Client
- func (c *Client) AllModels() ([]base.UserModel, error)
- func (c *Client) DestroyController(destroyModels bool) error
- func (c *Client) GUIArchives() ([]params.GUIArchiveVersion, error)
- func (c *Client) GetControllerAccess(user string) (permission.Access, error)
- func (c *Client) GrantController(user, access string) error
- func (c *Client) HostedModelConfigs() ([]HostedConfig, error)
- func (c *Client) InitiateMigration(spec MigrationSpec) (string, error)
- func (c *Client) ListBlockedModels() ([]params.ModelBlockInfo, error)
- func (c *Client) ModelConfig() (map[string]interface{}, error)
- func (c *Client) ModelStatus(tags ...names.ModelTag) ([]base.ModelStatus, error)
- func (c *Client) RemoveBlocks() error
- func (c *Client) RevokeController(user, access string) error
- func (c *Client) SelectGUIVersion(vers version.Number) error
- func (c *Client) UploadGUIArchive(r io.ReadSeeker, hash string, size int64, vers version.Number) (current bool, err error)
- func (c *Client) WatchAllModels() (*api.AllWatcher, error)
- type HostedConfig
- type MigrationSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { base.ClientFacade *common.ControllerConfigAPI *cloudspec.CloudSpecAPI // contains filtered or unexported fields }
Client provides methods that the Juju client command uses to interact with the Juju controller.
func NewClient ¶
func NewClient(st base.APICallCloser) *Client
NewClient creates a new `Client` based on an existing authenticated API connection.
func (*Client) AllModels ¶
AllModels allows controller administrators to get the list of all the models in the controller.
func (*Client) DestroyController ¶
DestroyController puts the controller model into a "dying" state, and removes all non-manager machine instances. Underlying DestroyModel calls will fail if there are any manually-provisioned non-manager machines in state.
func (*Client) GUIArchives ¶
func (c *Client) GUIArchives() ([]params.GUIArchiveVersion, error)
GUIArchives retrieves information about Juju GUI archives currently present in the Juju controller.
func (*Client) GetControllerAccess ¶
func (c *Client) GetControllerAccess(user string) (permission.Access, error)
GetControllerAccess returns the access level the user has on the controller.
func (*Client) GrantController ¶
GrantController grants a user access to the controller.
func (*Client) HostedModelConfigs ¶
func (c *Client) HostedModelConfigs() ([]HostedConfig, error)
HostedModelsConfig returns all model settings for the controller model.
func (*Client) InitiateMigration ¶
func (c *Client) InitiateMigration(spec MigrationSpec) (string, error)
InitiateMigration attempts to start a migration for the specified model, returning the migration's ID.
The API server supports starting multiple migrations in one request but we don't need that at the client side yet (and may never) so this call just supports starting one migration at a time.
func (*Client) ListBlockedModels ¶
func (c *Client) ListBlockedModels() ([]params.ModelBlockInfo, error)
ListBlockedModels returns a list of all models within the controller which have at least one block in place.
func (*Client) ModelConfig ¶
ModelConfig returns all model settings for the controller model.
func (*Client) ModelStatus ¶
func (c *Client) ModelStatus(tags ...names.ModelTag) ([]base.ModelStatus, error)
ModelStatus returns a status summary for each model tag passed in.
func (*Client) RemoveBlocks ¶
RemoveBlocks removes all the blocks in the controller.
func (*Client) RevokeController ¶
RevokeController revokes a user's access to the controller.
func (*Client) SelectGUIVersion ¶
SelectGUIVersion selects which version of the Juju GUI is served by the controller.
func (*Client) UploadGUIArchive ¶
func (c *Client) UploadGUIArchive(r io.ReadSeeker, hash string, size int64, vers version.Number) (current bool, err error)
UploadGUIArchive uploads a GUI archive to the controller over HTTPS, and reports about whether the upload updated the current GUI served by Juju.
func (*Client) WatchAllModels ¶
func (c *Client) WatchAllModels() (*api.AllWatcher, error)
WatchAllModels returns an AllWatcher, from which you can request the Next collection of Deltas (for all models).
type HostedConfig ¶
type HostedConfig struct { Name string Owner names.UserTag Config map[string]interface{} CloudSpec environs.CloudSpec Error error }
HostedConfig contains the model config and the cloud spec for that model such that direct access to the provider can be used.
type MigrationSpec ¶
type MigrationSpec struct { ModelUUID string TargetControllerUUID string TargetAddrs []string TargetCACert string TargetUser string TargetPassword string TargetMacaroons []macaroon.Slice ExternalControl bool SkipInitialPrechecks bool }
MigrationSpec holds the details required to start the migration of a single model.
func (*MigrationSpec) Validate ¶
func (s *MigrationSpec) Validate() error
Validate performs sanity checks on the migration configuration it holds.