juju: github.com/juju/juju/cmd/juju/model Index | Files | Directories

package model

import "github.com/juju/juju/cmd/juju/model"

Copyright 2016 Canonical Ltd. Licensed under the AGPLv3, see LICENCE file for details.

Copyright 2016 Canonical Ltd. Licensed under the AGPLv3, see LICENCE file for details.

Copyright 2018 Canonical Ltd. Licensed under the AGPLv3, see LICENCE file for details.

Index

Package Files

abort.go addbranch.go branch.go commit.go configcommand.go constraints.go data.go defaultscommand.go destroy.go diff.go dump.go dumpdb.go exportbundle.go grantrevoke.go grantrevokecloud.go retryprovisioning.go setcredential.go show.go trackbranch.go

func ExtractCert Uses

func ExtractCert() []byte

func NewAbortCommand Uses

func NewAbortCommand() cmd.Command

NewAbortCommand wraps abortCommand with sane model settings.

func NewAddBranchCommand Uses

func NewAddBranchCommand() cmd.Command

NewAddBranchCommand wraps addBranchCommand with sane model settings.

func NewBranchCommand Uses

func NewBranchCommand() cmd.Command

NewBranchCommand wraps branchCommand with sane model settings.

func NewCommitCommand Uses

func NewCommitCommand() cmd.Command

NewCommitCommand wraps commitCommand with sane model settings.

func NewConfigCommand Uses

func NewConfigCommand() cmd.Command

NewConfigCommand wraps configCommand with sane model settings.

func NewDefaultsCommand Uses

func NewDefaultsCommand() cmd.Command

NewDefaultsCommand wraps defaultsCommand with sane model settings.

func NewDestroyCommand Uses

func NewDestroyCommand() cmd.Command

NewDestroyCommand returns a command used to destroy a model.

func NewDiffCommand Uses

func NewDiffCommand() cmd.Command

NewDiffCommand wraps diffCommand with sane model settings.

func NewDumpCommand Uses

func NewDumpCommand() cmd.Command

NewDumpCommand returns a fully constructed dump-model command.

func NewDumpDBCommand Uses

func NewDumpDBCommand() cmd.Command

NewDumpDBCommand returns a fully constructed dump-db command.

func NewExportBundleCommand Uses

func NewExportBundleCommand() cmd.Command

NewExportBundleCommand returns a fully constructed export bundle command.

func NewGrantCloudCommand Uses

func NewGrantCloudCommand() cmd.Command

NewGrantCloudCommand returns a new grant command.

func NewGrantCommand Uses

func NewGrantCommand() cmd.Command

NewGrantCommand returns a new grant command.

func NewModelCredentialCommand Uses

func NewModelCredentialCommand() cmd.Command

func NewModelGetConstraintsCommand Uses

func NewModelGetConstraintsCommand() cmd.Command

NewModelGetConstraintsCommand returns a command to get model constraints.

func NewModelSetConstraintsCommand Uses

func NewModelSetConstraintsCommand() cmd.Command

NewModelSetConstraintsCommand returns a command to set model constraints.

func NewRetryProvisioningCommand Uses

func NewRetryProvisioningCommand() cmd.Command

func NewRevokeCloudCommand Uses

func NewRevokeCloudCommand() cmd.Command

NewRevokeCloudCommand returns a new revoke command.

func NewRevokeCommand Uses

func NewRevokeCommand() cmd.Command

NewRevokeCommand returns a new revoke command.

func NewShowCommand Uses

func NewShowCommand() cmd.Command

func NewTrackBranchCommand Uses

func NewTrackBranchCommand() cmd.Command

NewTrackBranchCommand wraps trackBranchCommand with sane model settings.

func ParseCert Uses

func ParseCert(arg string) error

type AbortCommandAPI Uses

type AbortCommandAPI interface {
    Close() error

    // Abort aborts an existing branch to the model.
    AbortBranch(branchName string) error

    // HasActiveBranch returns true if the model has an
    // "in-flight" branch with the input name.
    HasActiveBranch(branchName string) (bool, error)
}

AbortCommandAPI describes API methods required to execute the branch command. go:generate mockgen -package mocks -destination ./mocks/abort_mock.go github.com/juju/juju/cmd/juju/model AbortCommandAPI

type AddBranchCommandAPI Uses

type AddBranchCommandAPI interface {
    Close() error

    // AddBranch adds a new branch to the model.
    AddBranch(branchName string) error
}

AddBranchCommandAPI describes API methods required to execute the branch command. go:generate mockgen -package mocks -destination ./mocks/addbranch_mock.go github.com/juju/juju/cmd/juju/model AddBranchCommandAPI

type BranchCommandAPI Uses

type BranchCommandAPI interface {
    Close() error
    // HasActiveBranch returns true if the model has an
    // "in-flight" branch with the input name.
    HasActiveBranch(branchName string) (bool, error)
}

BranchCommandAPI describes API methods required to execute the branch command. go:generate mockgen -package mocks -destination ./mocks/branch_mock.go github.com/juju/juju/cmd/juju/model BranchCommandAPI

type BudgetAPIClient Uses

type BudgetAPIClient interface {
    DeleteBudget(string) (string, error)
}

BudgetAPIClient defines the budget API client interface.

type CloudAPI Uses

type CloudAPI interface {
    Close() error
    UserCredentials(names.UserTag, names.CloudTag) ([]names.CloudCredentialTag, error)
    AddCredential(tag string, credential cloud.Credential) error
}

CloudAPI defines methods used to detemine if cloud credential exists on the controller.

type CommitCommandAPI Uses

type CommitCommandAPI interface {
    Close() error

    // CommitBranch commits the branch with the input name to the model,
    // effectively completing it and applying
    // all branch changes across the model.
    // The new generation ID of the model is returned.
    CommitBranch(branchName string) (int, error)
}

CommitCommandAPI defines an API interface to be used during testing. go:generate mockgen -package mocks -destination ./mocks/commit_mock.go github.com/juju/juju/cmd/juju/model CommitCommandAPI

type ConfigAPI Uses

type ConfigAPI interface {
    Close() error
    Get(branchName string, application string) (*params.ApplicationGetResults, error)
}

ConfigAPI specifies the used function calls of the ApplicationFacade.

type ConstraintsAPI Uses

type ConstraintsAPI interface {
    Close() error
    GetModelConstraints() (constraints.Value, error)
    SetModelConstraints(constraints.Value) error
}

ConstraintsAPI defines methods on the client API that the get-constraints and set-constraints commands call

type DestroyModelAPI Uses

type DestroyModelAPI interface {
    Close() error
    BestAPIVersion() int
    DestroyModel(tag names.ModelTag, destroyStorage, force *bool, maxWait *time.Duration) error
    ModelStatus(models ...names.ModelTag) ([]base.ModelStatus, error)
}

DestroyModelAPI defines the methods on the modelmanager API that the destroy command calls. It is exported for mocking in tests.

type DiffCommandAPI Uses

type DiffCommandAPI interface {
    Close() error

    // BranchInfo returns information about "in-flight" branches.
    // If a non-empty string is supplied for branch name,
    // then only information for that branch is returned.
    // Supplying true for detailed returns extra unit detail for the branch.
    BranchInfo(branchName string, detailed bool, formatTime func(time.Time) string) (model.GenerationSummaries, error)
}

DiffCommandAPI describes API methods required to execute the diff command. go:generate mockgen -package mocks -destination ./mocks/diff_mock.go github.com/juju/juju/cmd/juju/model DiffCommandAPI

type DumpDBAPI Uses

type DumpDBAPI interface {
    Close() error
    DumpModelDB(names.ModelTag) (map[string]interface{}, error)
}

DumpDBAPI specifies the used function calls of the ModelManager.

type DumpModelAPI Uses

type DumpModelAPI interface {
    Close() error
    DumpModel(names.ModelTag, bool) (map[string]interface{}, error)
}

DumpModelAPI specifies the used function calls of the ModelManager.

type ExportBundleAPI Uses

type ExportBundleAPI interface {
    BestAPIVersion() int
    Close() error
    ExportBundle() (string, error)
}

ExportBundleAPI specifies the used function calls of the BundleFacade.

type GrantCloudAPI Uses

type GrantCloudAPI interface {
    Close() error
    GrantCloud(user, access string, clouds ...string) error
}

GrantCloudAPI defines the API functions used by the grant command.

type GrantControllerAPI Uses

type GrantControllerAPI interface {
    Close() error
    GrantController(user, access string) error
}

GrantControllerAPI defines the API functions used by the grant command.

type GrantModelAPI Uses

type GrantModelAPI interface {
    Close() error
    GrantModel(user, access string, modelUUIDs ...string) error
}

GrantModelAPI defines the API functions used by the grant command.

type GrantOfferAPI Uses

type GrantOfferAPI interface {
    Close() error
    GrantOffer(user, access string, offerURLs ...string) error
}

GrantOfferAPI defines the API functions used by the grant command.

type ModelConfigAPI Uses

type ModelConfigAPI interface {
    Close() error
    SLALevel() (string, error)
}

ModelConfigAPI defines the methods on the modelconfig API that the destroy command calls. It is exported for mocking in tests.

type ModelCredentialAPI Uses

type ModelCredentialAPI interface {
    Close() error
    ChangeModelCredential(model names.ModelTag, credential names.CloudCredentialTag) error
}

ModelCredentialAPI defines methods used to replace model credential.

type RetryProvisioningAPI Uses

type RetryProvisioningAPI interface {
    Close() error
    RetryProvisioning(machines ...names.MachineTag) ([]params.ErrorResult, error)
}

RetryProvisioningAPI defines methods on the client API that the retry-provisioning command calls.

type RevokeCloudAPI Uses

type RevokeCloudAPI interface {
    Close() error
    RevokeCloud(user, access string, clouds ...string) error
}

RevokeCloudAPI defines the API functions used by the revoke cloud command.

type RevokeControllerAPI Uses

type RevokeControllerAPI interface {
    Close() error
    RevokeController(user, access string) error
}

RevokeControllerAPI defines the API functions used by the revoke command.

type RevokeModelAPI Uses

type RevokeModelAPI interface {
    Close() error
    RevokeModel(user, access string, modelUUIDs ...string) error
}

RevokeModelAPI defines the API functions used by the revoke command.

type RevokeOfferAPI Uses

type RevokeOfferAPI interface {
    Close() error
    RevokeOffer(user, access string, offerURLs ...string) error
}

RevokeOfferAPI defines the API functions used by the revoke command.

type ShowModelAPI Uses

type ShowModelAPI interface {
    Close() error
    ModelInfo([]names.ModelTag) ([]params.ModelInfoResult, error)
}

ShowModelAPI defines the methods on the client API that the users command calls.

type StorageAPI Uses

type StorageAPI interface {
    Close() error
    ListStorageDetails() ([]params.StorageDetails, error)
}

StorageAPI defines the storage client API interface.

type TrackBranchCommandAPI Uses

type TrackBranchCommandAPI interface {
    Close() error

    // TrackBranch sets the input units and/or applications
    // to track changes made under the input branch name.
    TrackBranch(branchName string, entities []string) error
}

TrackBranchCommandAPI describes API methods required to execute the track command. go:generate mockgen -package mocks -destination ./mocks/trackbranch_mock.go github.com/juju/juju/cmd/juju/model TrackBranchCommandAPI

Directories

PathSynopsis
mocksPackage mocks is a generated GoMock package.

Package model imports 47 packages (graph) and is imported by 22 packages. Updated 2019-10-11. Refresh now. Tools for package owners.