juju: github.com/juju/juju/apiserver/facades/client/modelmanager Index | Files

package modelmanager

import "github.com/juju/juju/apiserver/facades/client/modelmanager"

Package modelmanager defines an API end point for functions dealing with models. Creating, listing and sharing models. This facade is available at the root of the controller API, and as such, there is no implicit Model assocated.

Index

Package Files

modelmanager.go

type ConfigSource Uses

type ConfigSource interface {
    Config() (*config.Config, error)
}

ConfigSource describes a type that is able to provide config. Abstracted primarily for testing.

type ModelManagerAPI Uses

type ModelManagerAPI struct {
    *common.ModelStatusAPI
    // contains filtered or unexported fields
}

ModelManagerAPI implements the model manager interface and is the concrete implementation of the api end point.

func NewFacadeV8 Uses

func NewFacadeV8(ctx facade.Context) (*ModelManagerAPI, error)

NewFacadeV8 is used for API registration.

func NewModelManagerAPI Uses

func NewModelManagerAPI(
    st common.ModelManagerBackend,
    ctlrSt common.ModelManagerBackend,
    configGetter environs.EnvironConfigGetter,
    getBroker newCaasBrokerFunc,
    authorizer facade.Authorizer,
    m common.Model,
    callCtx context.ProviderCallContext,
) (*ModelManagerAPI, error)

NewModelManagerAPI creates a new api server endpoint for managing models.

func (*ModelManagerAPI) ChangeModelCredential Uses

func (m *ModelManagerAPI) ChangeModelCredential(args params.ChangeModelCredentialsParams) (params.ErrorResults, error)

ChangeModelCredentials changes cloud credential reference for models. These new cloud credentials must already exist on the controller.

func (*ModelManagerAPI) CreateModel Uses

func (m *ModelManagerAPI) CreateModel(args params.ModelCreateArgs) (params.ModelInfo, error)

CreateModel creates a new model using the account and model config specified in the args.

func (*ModelManagerAPI) DestroyModels Uses

func (m *ModelManagerAPI) DestroyModels(args params.DestroyModelsParams) (params.ErrorResults, error)

DestroyModels will try to destroy the specified models. If there is a block on destruction, this method will return an error. From ModelManager v7 onwards, DestroyModels gains 'force' and 'max-wait' parameters.

func (*ModelManagerAPI) DumpModels Uses

func (m *ModelManagerAPI) DumpModels(args params.DumpModelRequest) params.StringResults

DumpModels will export the models into the database agnostic representation. The user needs to either be a controller admin, or have admin privileges on the model itself.

func (*ModelManagerAPI) DumpModelsDB Uses

func (m *ModelManagerAPI) DumpModelsDB(args params.Entities) params.MapResults

DumpModelsDB will gather all documents from all model collections for the specified model. The map result contains a map of collection names to lists of documents represented as maps.

func (*ModelManagerAPI) ListModelSummaries Uses

func (m *ModelManagerAPI) ListModelSummaries(req params.ModelSummariesRequest) (params.ModelSummaryResults, error)

ListModelSummaries returns models that the specified user has access to in the current server. Controller admins (superuser) can list models for any user. Other users can only ask about their own models.

func (*ModelManagerAPI) ListModels Uses

func (m *ModelManagerAPI) ListModels(user params.Entity) (params.UserModelList, error)

ListModels returns the models that the specified user has access to in the current server. Controller admins (superuser) can list models for any user. Other users can only ask about their own models.

func (*ModelManagerAPI) ModelDefaultsForClouds Uses

func (m *ModelManagerAPI) ModelDefaultsForClouds(args params.Entities) (params.ModelDefaultsResults, error)

ModelDefaults returns the default config values for the specified clouds.

func (*ModelManagerAPI) ModelInfo Uses

func (m *ModelManagerAPI) ModelInfo(args params.Entities) (params.ModelInfoResults, error)

ModelInfo returns information about the specified models.

func (*ModelManagerAPI) ModifyModelAccess Uses

func (m *ModelManagerAPI) ModifyModelAccess(args params.ModifyModelAccessRequest) (result params.ErrorResults, _ error)

ModifyModelAccess changes the model access granted to users.

func (*ModelManagerAPI) SetModelDefaults Uses

func (m *ModelManagerAPI) SetModelDefaults(args params.SetModelDefaults) (params.ErrorResults, error)

SetModelDefaults writes new values for the specified default model settings.

func (*ModelManagerAPI) UnsetModelDefaults Uses

func (m *ModelManagerAPI) UnsetModelDefaults(args params.UnsetModelDefaults) (params.ErrorResults, error)

UnsetModelDefaults removes the specified default model settings.

type ModelManagerAPIV2 Uses

type ModelManagerAPIV2 struct {
    *ModelManagerAPIV3
}

ModelManagerAPIV2 provides a way to wrap the different calls between version 2 and version 3 of the model manager API

func NewFacadeV2 Uses

func NewFacadeV2(ctx facade.Context) (*ModelManagerAPIV2, error)

NewFacade is used for API registration.

func (*ModelManagerAPIV2) DumpModels Uses

func (m *ModelManagerAPIV2) DumpModels(args params.Entities) params.MapResults

DumpModels will export the models into the database agnostic representation. The user needs to either be a controller admin, or have admin privileges on the model itself.

func (*ModelManagerAPIV2) ModelStatus Uses

func (s *ModelManagerAPIV2) ModelStatus(req params.Entities) (params.ModelStatusResults, error)

ModelStatus is a legacy method call to ensure that we preserve backward compatibility. TODO (anastasiamac 2017-10-26) This should be made obsolete/removed.

type ModelManagerAPIV3 Uses

type ModelManagerAPIV3 struct {
    *ModelManagerAPIV4
}

ModelManagerAPIV3 provides a way to wrap the different calls between version 3 and version 4 of the model manager API

func NewFacadeV3 Uses

func NewFacadeV3(ctx facade.Context) (*ModelManagerAPIV3, error)

NewFacadeV3 is used for API registration.

func (*ModelManagerAPIV3) DestroyModels Uses

func (m *ModelManagerAPIV3) DestroyModels(args params.Entities) (params.ErrorResults, error)

DestroyModels will try to destroy the specified models. If there is a block on destruction, this method will return an error.

func (*ModelManagerAPIV3) ModelStatus Uses

func (s *ModelManagerAPIV3) ModelStatus(req params.Entities) (params.ModelStatusResults, error)

ModelStatus is a legacy method call to ensure that we preserve backward compatibility. TODO (anastasiamac 2017-10-26) This should be made obsolete/removed.

type ModelManagerAPIV4 Uses

type ModelManagerAPIV4 struct {
    *ModelManagerAPIV5
}

ModelManagerAPIV4 provides a way to wrap the different calls between version 4 and version 5 of the model manager API

func NewFacadeV4 Uses

func NewFacadeV4(ctx facade.Context) (*ModelManagerAPIV4, error)

NewFacadeV4 is used for API registration.

func (*ModelManagerAPIV4) ChangeModelCredential Uses

func (*ModelManagerAPIV4) ChangeModelCredential(_, _ struct{})

Mask out new methods from the old API versions. The API reflection code in rpc/rpcreflect/type.go:newMethod skips 2-argument methods, so this removes the method as far as the RPC machinery is concerned.

ChangeModelCredential did not exist prior to v5.

type ModelManagerAPIV5 Uses

type ModelManagerAPIV5 struct {
    *ModelManagerAPIV6
}

ModelManagerAPIV5 provides a way to wrap the different calls between version 5 and version 6 of the model manager API

func NewFacadeV5 Uses

func NewFacadeV5(ctx facade.Context) (*ModelManagerAPIV5, error)

NewFacadeV5 is used for API registration.

func (*ModelManagerAPIV5) ModelDefaults Uses

func (m *ModelManagerAPIV5) ModelDefaults() (params.ModelDefaultsResult, error)

ModelDefaults returns the default config values used when creating a new model.

func (*ModelManagerAPIV5) ModelDefaultsForClouds Uses

func (*ModelManagerAPIV5) ModelDefaultsForClouds(_, _ struct{})

ModelDefaultsForClouds did not exist prior to v6.

type ModelManagerAPIV6 Uses

type ModelManagerAPIV6 struct {
    *ModelManagerAPIV7
}

ModelManagerAPIV6 provides a way to wrap the different calls between version 7 and version 6 of the model manager API

func NewFacadeV6 Uses

func NewFacadeV6(ctx facade.Context) (*ModelManagerAPIV6, error)

NewFacadeV6 is used for API registration.

type ModelManagerAPIV7 Uses

type ModelManagerAPIV7 struct {
    *ModelManagerAPI
}

ModelManagerAPIV7 provides a way to wrap the different calls between version 8 and version 7 of the model manager API

func NewFacadeV7 Uses

func NewFacadeV7(ctx facade.Context) (*ModelManagerAPIV7, error)

NewFacadeV7 is used for API registration.

func (*ModelManagerAPIV7) ModelInfo Uses

func (m *ModelManagerAPIV7) ModelInfo(args params.Entities) (params.ModelInfoResults, error)

ModelInfo returns information about the specified models.

type ModelManagerV2 Uses

type ModelManagerV2 interface {
    CreateModel(args params.ModelCreateArgs) (params.ModelInfo, error)
    DumpModels(args params.Entities) params.MapResults
    DumpModelsDB(args params.Entities) params.MapResults
    ListModels(user params.Entity) (params.UserModelList, error)
    DestroyModels(args params.Entities) (params.ErrorResults, error)
    ModelStatus(req params.Entities) (params.ModelStatusResults, error)
}

ModelManagerV2 defines the methods on the version 2 facade for the modelmanager API endpoint.

type ModelManagerV3 Uses

type ModelManagerV3 interface {
    CreateModel(args params.ModelCreateArgs) (params.ModelInfo, error)
    DumpModels(args params.DumpModelRequest) params.StringResults
    DumpModelsDB(args params.Entities) params.MapResults
    ListModels(user params.Entity) (params.UserModelList, error)
    DestroyModels(args params.Entities) (params.ErrorResults, error)
    ModelInfo(args params.Entities) (params.ModelInfoResults, error)
    ModelStatus(req params.Entities) (params.ModelStatusResults, error)
}

ModelManagerV3 defines the methods on the version 3 facade for the modelmanager API endpoint.

type ModelManagerV4 Uses

type ModelManagerV4 interface {
    CreateModel(args params.ModelCreateArgs) (params.ModelInfo, error)
    DumpModels(args params.DumpModelRequest) params.StringResults
    DumpModelsDB(args params.Entities) params.MapResults
    ListModelSummaries(request params.ModelSummariesRequest) (params.ModelSummaryResults, error)
    ListModels(user params.Entity) (params.UserModelList, error)
    DestroyModels(args params.DestroyModelsParams) (params.ErrorResults, error)
    ModelInfo(args params.Entities) (params.ModelInfoResults, error)
    ModelStatus(req params.Entities) (params.ModelStatusResults, error)
}

ModelManagerV4 defines the methods on the version 4 facade for the modelmanager API endpoint.

type ModelManagerV5 Uses

type ModelManagerV5 interface {
    CreateModel(args params.ModelCreateArgs) (params.ModelInfo, error)
    DumpModels(args params.DumpModelRequest) params.StringResults
    DumpModelsDB(args params.Entities) params.MapResults
    ListModelSummaries(request params.ModelSummariesRequest) (params.ModelSummaryResults, error)
    ListModels(user params.Entity) (params.UserModelList, error)
    DestroyModels(args params.DestroyModelsParams) (params.ErrorResults, error)
    ModelInfo(args params.Entities) (params.ModelInfoResults, error)
    ModelStatus(req params.Entities) (params.ModelStatusResults, error)
    ChangeModelCredential(args params.ChangeModelCredentialsParams) (params.ErrorResults, error)
}

ModelManagerV5 defines the methods on the version 5 facade for the modelmanager API endpoint.

type ModelManagerV6 Uses

type ModelManagerV6 interface {
    ModelManagerV5
    ModelDefaultsForClouds(args params.Entities) (params.ModelDefaultsResults, error)
}

ModelManagerV6 defines the methods on the version 6 facade for the modelmanager API endpoint.

type ModelManagerV7 Uses

type ModelManagerV7 interface {
    ModelManagerV6
}

ModelManagerV7 defines the methods on the version 7 facade for the modelmanager API endpoint.

type ModelManagerV8 Uses

type ModelManagerV8 interface {
    ModelManagerV7
}

ModelManagerV8 defines the methods on the version 8 facade for the modelmanager API endpoint.

Package modelmanager imports 25 packages (graph) and is imported by 3 packages. Updated 2019-09-26. Refresh now. Tools for package owners.