juju: github.com/wallyworld/juju/api/modelmanager Index | Files

package modelmanager

import "github.com/wallyworld/juju/api/modelmanager"


Package Files


type Client Uses

type Client struct {

    // contains filtered or unexported fields

Client provides methods that the Juju client command uses to interact with models stored in the Juju Server.

func NewClient Uses

func NewClient(st base.APICallCloser) *Client

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

func (*Client) ChangeModelCredential Uses

func (c *Client) ChangeModelCredential(model names.ModelTag, credential names.CloudCredentialTag) error

ChangeModelCredential replaces cloud credential for a given model with the provided one.

func (*Client) CreateModel Uses

func (c *Client) CreateModel(
    name, owner, cloud, cloudRegion string,
    cloudCredential names.CloudCredentialTag,
    config map[string]interface{},
) (base.ModelInfo, error)

CreateModel creates a new model using the model config, cloud region and credential specified in the args.

func (*Client) DestroyModel Uses

func (c *Client) DestroyModel(tag names.ModelTag, destroyStorage, force *bool, maxWait *time.Duration) error

DestroyModel puts the specified model into a "dying" state, which will cause the model's resources to be cleaned up, after which the model will be removed.

func (*Client) DumpModel Uses

func (c *Client) DumpModel(model names.ModelTag, simplified bool) (map[string]interface{}, error)

DumpModel returns the serialized database agnostic model representation.

func (*Client) DumpModelDB Uses

func (c *Client) DumpModelDB(model names.ModelTag) (map[string]interface{}, error)

DumpModelDB returns all relevant mongo documents for the model.

func (*Client) GrantModel Uses

func (c *Client) GrantModel(user, access string, modelUUIDs ...string) error

GrantModel grants a user access to the specified models.

func (*Client) ListModelSummaries Uses

func (c *Client) ListModelSummaries(user string, all bool) ([]base.UserModelSummary, error)

func (*Client) ListModels Uses

func (c *Client) ListModels(user string) ([]base.UserModel, error)

ListModels returns the models that the specified user has access to in the current server. Only that controller owner can list models for any user (at this stage). Other users can only ask about their own models.

func (*Client) ModelDefaults Uses

func (c *Client) ModelDefaults(cloud string) (config.ModelDefaultAttributes, error)

ModelDefaults returns the default values for various sources used when creating a new model on the specified cloud.

func (*Client) ModelInfo Uses

func (c *Client) ModelInfo(tags []names.ModelTag) ([]params.ModelInfoResult, error)

func (*Client) RevokeModel Uses

func (c *Client) RevokeModel(user, access string, modelUUIDs ...string) error

RevokeModel revokes a user's access to the specified models.

func (*Client) SetModelDefaults Uses

func (c *Client) SetModelDefaults(cloud, region string, config map[string]interface{}) error

SetModelDefaults updates the specified default model config values.

func (*Client) UnsetModelDefaults Uses

func (c *Client) UnsetModelDefaults(cloud, region string, keys ...string) error

UnsetModelDefaults removes the specified default model config values.

Package modelmanager imports 13 packages (graph). Updated 2020-08-11. Refresh now. Tools for package owners.