juju: github.com/juju/juju/api/controller Index | Files

package controller

import "github.com/juju/juju/api/controller"

Index

Package Files

controller.go gui.go identity_url.go mongo.go

type Client Uses

type Client struct {
    base.ClientFacade

    *common.ControllerConfigAPI
    *common.ModelStatusAPI
    *cloudspec.CloudSpecAPI
    // contains filtered or unexported fields
}

Client provides methods that the Juju client command uses to interact with the Juju controller.

func NewClient Uses

func NewClient(st base.APICallCloser) *Client

NewClient creates a new `Client` based on an existing authenticated API connection.

func (*Client) AllModels Uses

func (c *Client) AllModels() ([]base.UserModel, error)

AllModels allows controller administrators to get the list of all the models in the controller.

func (*Client) CloudSpec Uses

func (c *Client) CloudSpec(modelTag names.ModelTag) (environs.CloudSpec, error)

CloudSpec returns a CloudSpec for the specified model.

func (*Client) ConfigSet Uses

func (c *Client) ConfigSet(values map[string]interface{}) error

ConfigSet updates the passed controller configuration values. Any settings that aren't passed will be left with their previous values.

func (*Client) ControllerVersion Uses

func (c *Client) ControllerVersion() (ControllerVersion, error)

ControllerVersion fetches the controller version information.

func (*Client) DestroyController Uses

func (c *Client) DestroyController(args DestroyControllerParams) error

DestroyController puts the controller model into a "dying" state, and removes all non-manager machine instances.

func (*Client) GUIArchives Uses

func (c *Client) GUIArchives() ([]params.GUIArchiveVersion, error)

GUIArchives retrieves information about Juju GUI archives currently present in the Juju controller.

func (*Client) GetControllerAccess Uses

func (c *Client) GetControllerAccess(user string) (permission.Access, error)

GetControllerAccess returns the access level the user has on the controller.

func (*Client) GrantController Uses

func (c *Client) GrantController(user, access string) error

GrantController grants a user access to the controller.

func (*Client) HostedModelConfigs Uses

func (c *Client) HostedModelConfigs() ([]HostedConfig, error)

HostedModelsConfig returns all model settings for the controller model.

func (*Client) IdentityProviderURL Uses

func (c *Client) IdentityProviderURL() (string, error)

IdentityProviderURL returns the URL of the configured external identity provider for this controller or an empty string if no external identity provider has been configured when the controller was bootstrapped.

func (*Client) InitiateMigration Uses

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 Uses

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 Uses

func (c *Client) ModelConfig() (map[string]interface{}, error)

ModelConfig returns all model settings for the controller model.

func (*Client) MongoVersion Uses

func (c *Client) MongoVersion() (string, error)

MongoVersion returns the mongo version associated with the state session.

func (*Client) RemoveBlocks Uses

func (c *Client) RemoveBlocks() error

RemoveBlocks removes all the blocks in the controller.

func (*Client) RevokeController Uses

func (c *Client) RevokeController(user, access string) error

RevokeController revokes a user's access to the controller.

func (*Client) SelectGUIVersion Uses

func (c *Client) SelectGUIVersion(vers version.Number) error

SelectGUIVersion selects which version of the Juju GUI is served by the controller.

func (*Client) UploadGUIArchive Uses

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 Uses

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 ControllerVersion Uses

type ControllerVersion struct {
    Version   string
    GitCommit string
}

type DestroyControllerParams Uses

type DestroyControllerParams struct {
    // DestroyModels controls whether or not all hosted models should be
    // destroyed. If this is false, and there are non-empty hosted models,
    // an error with the code params.CodeHasHostedModels will be returned.
    DestroyModels bool

    // DestroyStorage controls whether or not storage in the model (and
    // hosted models, if DestroyModels is true) should be destroyed.
    //
    // This is ternary: nil, false, or true. If nil and there is persistent
    // storage in the model (or hosted models), an error with the code
    // params.CodeHasPersistentStorage will be returned.
    DestroyStorage *bool
}

DestroyControllerParams controls the behaviour of destroying the controller.

type HostedConfig Uses

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 Uses

type MigrationSpec struct {
    ModelUUID             string
    TargetControllerUUID  string
    TargetControllerAlias string
    TargetAddrs           []string
    TargetCACert          string
    TargetUser            string
    TargetPassword        string
    TargetMacaroons       []macaroon.Slice
}

MigrationSpec holds the details required to start the migration of a single model.

func (*MigrationSpec) Validate Uses

func (s *MigrationSpec) Validate() error

Validate performs sanity checks on the migration configuration it holds.

Package controller imports 17 packages (graph) and is imported by 119 packages. Updated 2019-12-09. Refresh now. Tools for package owners.