import "github.com/wallyworld/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.
abort.go addbranch.go branch.go commit.go config.go constraints.go data.go defaults.go destroy.go diff.go dump.go dumpdb.go exportbundle.go grantrevoke.go grantrevokecloud.go listcommits.go retryprovisioning.go setcredential.go show.go showcommit.go trackbranch.go
ConfigDetails gets ModelDetails when a model is not available to use.
NewAbortCommand wraps abortCommand with sane model settings.
NewAddBranchCommand wraps addBranchCommand with sane model settings.
NewBranchCommand wraps branchCommand with sane model settings.
NewCommitCommand wraps commitCommand with sane model settings.
NewCommitCommand wraps CommitsCommand with sane model settings.
NewConfigCommand wraps configCommand with sane model settings.
NewDefaultsCommand wraps defaultsCommand with sane model settings.
NewDestroyCommand returns a command used to destroy a model.
NewDiffCommand wraps diffCommand with sane model settings.
NewDumpCommand returns a fully constructed dump-model command.
NewDumpDBCommand returns a fully constructed dump-db command.
NewExportBundleCommand returns a fully constructed export bundle command.
NewGrantCloudCommand returns a new grant command.
NewGrantCommand returns a new grant command.
NewModelGetConstraintsCommand returns a command to get model constraints.
NewModelSetConstraintsCommand returns a command to set model constraints.
NewRevokeCloudCommand returns a new revoke command.
NewRevokeCommand returns a new revoke command.
NewShowCommitCommand wraps NewShowCommitCommand with sane model settings.
NewTrackBranchCommand wraps trackBranchCommand with sane model settings.
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 go run github.com/golang/mock/mockgen -package mocks -destination ./mocks/abort_mock.go github.com/juju/juju/cmd/juju/model AbortCommandAPI
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 go run github.com/golang/mock/mockgen -package mocks -destination ./mocks/addbranch_mock.go github.com/juju/juju/cmd/juju/model AddBranchCommandAPI
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 go run github.com/golang/mock/mockgen -package mocks -destination ./mocks/branch_mock.go github.com/juju/juju/cmd/juju/model BranchCommandAPI
BudgetAPIClient defines the budget API client interface.
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 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 go run github.com/golang/mock/mockgen -package mocks -destination ./mocks/commit_mock.go github.com/juju/juju/cmd/juju/model CommitCommandAPI
type CommitsCommand struct { modelcmd.ModelCommandBase // contains filtered or unexported fields }
CommitsCommand supplies the "commit" CLI command used to commit changes made under a branch, to the model.
func (c *CommitsCommand) Info() *cmd.Info
Info implements part of the cmd.Command interface.
func (c *CommitsCommand) Init(args []string) error
Init implements part of the cmd.Command interface.
func (c *CommitsCommand) Run(ctx *cmd.Context) error
Run implements the meaty part of the cmd.Command interface.
func (c *CommitsCommand) SetFlags(f *gnuflag.FlagSet)
SetFlags implements part of the cmd.Command interface.
type CommitsCommandAPI interface { Close() error // ListCommitsBranch 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. ListCommits() (model.GenerationCommits, error) }
CommitsCommandAPI defines an API interface to be used during testing. go:generate go run github.com/golang/mock/mockgen -package mocks -destination ./mocks/commits_mock.go github.com/juju/juju/cmd/juju/model CommitsCommandAPI
type ConfigAPI interface { Close() error Get(branchName string, application string) (*params.ApplicationGetResults, error) }
ConfigAPI specifies the used function calls of the ApplicationFacade.
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 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 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 go run github.com/golang/mock/mockgen -package mocks -destination ./mocks/diff_mock.go github.com/juju/juju/cmd/juju/model DiffCommandAPI
type DumpDBAPI interface { Close() error DumpModelDB(names.ModelTag) (map[string]interface{}, error) }
DumpDBAPI specifies the used function calls of the ModelManager.
type DumpModelAPI interface { Close() error DumpModel(names.ModelTag, bool) (map[string]interface{}, error) }
DumpModelAPI specifies the used function calls of the ModelManager.
type ExportBundleAPI interface { BestAPIVersion() int Close() error ExportBundle() (string, error) }
ExportBundleAPI specifies the used function calls of the BundleFacade.
type GrantCloudAPI interface { Close() error GrantCloud(user, access string, clouds ...string) error }
GrantCloudAPI defines the API functions used by the grant command.
GrantControllerAPI defines the API functions used by the grant command.
type GrantModelAPI interface { Close() error GrantModel(user, access string, modelUUIDs ...string) error }
GrantModelAPI defines the API functions used by the grant command.
type GrantOfferAPI interface { Close() error GrantOffer(user, access string, offerURLs ...string) error }
GrantOfferAPI defines the API functions used by the grant command.
ModelConfigAPI defines the methods on the modelconfig API that the destroy command calls. It is exported for mocking in tests.
type ModelCredentialAPI interface { Close() error ChangeModelCredential(model names.ModelTag, credential names.CloudCredentialTag) error }
ModelCredentialAPI defines methods used to replace model credential.
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 interface { Close() error RevokeCloud(user, access string, clouds ...string) error }
RevokeCloudAPI defines the API functions used by the revoke cloud command.
RevokeControllerAPI defines the API functions used by the revoke command.
type RevokeModelAPI interface { Close() error RevokeModel(user, access string, modelUUIDs ...string) error }
RevokeModelAPI defines the API functions used by the revoke command.
type RevokeOfferAPI interface { Close() error RevokeOffer(user, access string, offerURLs ...string) error }
RevokeOfferAPI defines the API functions used by the revoke command.
type ShowCommitCommand struct { modelcmd.ModelCommandBase // contains filtered or unexported fields }
ShowCommitCommand supplies the "show-commit" CLI command used to show commits
func (c *ShowCommitCommand) Info() *cmd.Info
Info implements part of the cmd.Command interface.
func (c *ShowCommitCommand) Init(args []string) error
Init implements part of the cmd.Command interface.
func (c *ShowCommitCommand) Run(ctx *cmd.Context) error
Run implements the meaty part of the cmd.Command interface.
func (c *ShowCommitCommand) SetFlags(f *gnuflag.FlagSet)
SetFlags implements part of the cmd.Command interface.
type ShowCommitCommandAPI interface { Close() error // ShowCommit shows the branches which were committed ShowCommit(int) (model.GenerationCommit, error) }
ShowCommitCommandAPI defines an API interface to be used during testing. go:generate go run github.com/golang/mock/mockgen -package mocks -destination ./mocks/showcommit_mock.go github.com/juju/juju/cmd/juju/model ShowCommitCommandAPI
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 interface { Close() error ListStorageDetails() ([]params.StorageDetails, error) }
StorageAPI defines the storage client API interface.
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, numUnits int) error HasActiveBranch(branchName string) (bool, error) }
TrackBranchCommandAPI describes API methods required to execute the track command. go:generate go run github.com/golang/mock/mockgen -package mocks -destination ./mocks/trackbranch_mock.go github.com/juju/juju/cmd/juju/model TrackBranchCommandAPI
Path | Synopsis |
---|---|
mocks | Package mocks is a generated GoMock package. |
Package model imports 49 packages (graph). Updated 2020-08-06. Refresh now. Tools for package owners.