Documentation ¶
Index ¶
- func ConfigDetails() (map[string]interface{}, error)
- func ExtractCert() []byte
- func NewAbortCommand() cmd.Command
- func NewAddBranchCommand() cmd.Command
- func NewBranchCommand() cmd.Command
- func NewCommitCommand() cmd.Command
- func NewCommitsCommand() cmd.Command
- func NewConfigCommand() cmd.Command
- func NewDefaultsCommand() cmd.Command
- func NewDestroyCommand() cmd.Command
- func NewDiffCommand() cmd.Command
- func NewDumpCommand() cmd.Command
- func NewDumpDBCommand() cmd.Command
- func NewExportBundleCommand() cmd.Command
- func NewGrantCloudCommand() cmd.Command
- func NewGrantCommand() cmd.Command
- func NewModelCredentialCommand() cmd.Command
- func NewModelGetConstraintsCommand() cmd.Command
- func NewModelSetConstraintsCommand() cmd.Command
- func NewRetryProvisioningCommand() cmd.Command
- func NewRevokeCloudCommand() cmd.Command
- func NewRevokeCommand() cmd.Command
- func NewShowCommand() cmd.Command
- func NewShowCommitCommand() cmd.Command
- func NewTrackBranchCommand() cmd.Command
- func ParseCert(arg string) error
- type AbortCommandAPI
- type AddBranchCommandAPI
- type BranchCommandAPI
- type CloudAPI
- type CommitCommandAPI
- type CommitsCommand
- type CommitsCommandAPI
- type ConstraintsAPI
- type DestroyModelAPI
- type DiffCommandAPI
- type DumpDBAPI
- type DumpModelAPI
- type ExportBundleAPI
- type GrantCloudAPI
- type GrantControllerAPI
- type GrantModelAPI
- type GrantOfferAPI
- type ModelCredentialAPI
- type RetryProvisioningAPI
- type RevokeCloudAPI
- type RevokeControllerAPI
- type RevokeModelAPI
- type RevokeOfferAPI
- type ShowCommitCommand
- type ShowCommitCommandAPI
- type ShowModelAPI
- type TrackBranchCommandAPI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigDetails ¶
ConfigDetails gets ModelDetails when a model is not available to use.
func ExtractCert ¶
func ExtractCert() []byte
func NewAbortCommand ¶
func NewAbortCommand() cmd.Command
NewAbortCommand wraps abortCommand with sane model settings.
func NewAddBranchCommand ¶
func NewAddBranchCommand() cmd.Command
NewAddBranchCommand wraps addBranchCommand with sane model settings.
func NewBranchCommand ¶
func NewBranchCommand() cmd.Command
NewBranchCommand wraps branchCommand with sane model settings.
func NewCommitCommand ¶
func NewCommitCommand() cmd.Command
NewCommitCommand wraps commitCommand with sane model settings.
func NewCommitsCommand ¶
func NewCommitsCommand() cmd.Command
NewCommitCommand wraps CommitsCommand with sane model settings.
func NewConfigCommand ¶
func NewConfigCommand() cmd.Command
NewConfigCommand wraps configCommand with sane model settings.
func NewDefaultsCommand ¶
func NewDefaultsCommand() cmd.Command
NewDefaultsCommand wraps defaultsCommand with sane model settings.
func NewDestroyCommand ¶
func NewDestroyCommand() cmd.Command
NewDestroyCommand returns a command used to destroy a model.
func NewDiffCommand ¶
func NewDiffCommand() cmd.Command
NewDiffCommand wraps diffCommand with sane model settings.
func NewDumpCommand ¶
func NewDumpCommand() cmd.Command
NewDumpCommand returns a fully constructed dump-model command.
func NewDumpDBCommand ¶
func NewDumpDBCommand() cmd.Command
NewDumpDBCommand returns a fully constructed dump-db command.
func NewExportBundleCommand ¶
func NewExportBundleCommand() cmd.Command
NewExportBundleCommand returns a fully constructed export bundle command.
func NewGrantCloudCommand ¶
func NewGrantCloudCommand() cmd.Command
NewGrantCloudCommand returns a new grant command.
func NewGrantCommand ¶
func NewGrantCommand() cmd.Command
NewGrantCommand returns a new grant command.
func NewModelCredentialCommand ¶
func NewModelCredentialCommand() cmd.Command
func NewModelGetConstraintsCommand ¶
func NewModelGetConstraintsCommand() cmd.Command
NewModelGetConstraintsCommand returns a command to get model constraints.
func NewModelSetConstraintsCommand ¶
func NewModelSetConstraintsCommand() cmd.Command
NewModelSetConstraintsCommand returns a command to set model constraints.
func NewRetryProvisioningCommand ¶
func NewRetryProvisioningCommand() cmd.Command
func NewRevokeCloudCommand ¶
func NewRevokeCloudCommand() cmd.Command
NewRevokeCloudCommand returns a new revoke command.
func NewRevokeCommand ¶
func NewRevokeCommand() cmd.Command
NewRevokeCommand returns a new revoke command.
func NewShowCommand ¶
func NewShowCommand() cmd.Command
func NewShowCommitCommand ¶
func NewShowCommitCommand() cmd.Command
NewShowCommitCommand wraps NewShowCommitCommand with sane model settings.
func NewTrackBranchCommand ¶
func NewTrackBranchCommand() cmd.Command
NewTrackBranchCommand wraps trackBranchCommand with sane model settings.
Types ¶
type AbortCommandAPI ¶
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.
type AddBranchCommandAPI ¶
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.
type BranchCommandAPI ¶
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.
type CloudAPI ¶
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 ¶
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.
type CommitsCommand ¶
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 (*CommitsCommand) Info ¶
func (c *CommitsCommand) Info() *cmd.Info
Info implements part of the cmd.Command interface.
func (*CommitsCommand) Init ¶
func (c *CommitsCommand) Init(args []string) error
Init implements part of the cmd.Command interface.
func (*CommitsCommand) Run ¶
func (c *CommitsCommand) Run(ctx *cmd.Context) error
Run implements the meaty part of the cmd.Command interface.
func (*CommitsCommand) SetFlags ¶
func (c *CommitsCommand) SetFlags(f *gnuflag.FlagSet)
SetFlags implements part of the cmd.Command interface.
type CommitsCommandAPI ¶
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.
type ConstraintsAPI ¶
type ConstraintsAPI interface { Close() error GetModelConstraints() (constraints.Value, error) SetModelConstraints(constraints.Value) error }
ConstraintsAPI defines methods on the client API that the constraints and set-constraints commands call
type DestroyModelAPI ¶
type DestroyModelAPI interface { Close() error DestroyModel(tag names.ModelTag, destroyStorage, force *bool, maxWait *time.Duration, timeout *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 ¶
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.
type DumpDBAPI ¶
type DumpDBAPI interface { Close() error DumpModelDB(names.ModelTag) (map[string]interface{}, error) }
DumpDBAPI specifies the used function calls of the ModelManager.
type DumpModelAPI ¶
type DumpModelAPI interface { Close() error DumpModel(names.ModelTag, bool) (map[string]interface{}, error) }
DumpModelAPI specifies the used function calls of the ModelManager.
type ExportBundleAPI ¶
type ExportBundleAPI interface { Close() error ExportBundle(includeCharmDefaults bool, includeSeries bool) (string, error) }
ExportBundleAPI specifies the used function calls of the BundleFacade.
type GrantCloudAPI ¶
type GrantCloudAPI interface { Close() error GrantCloud(user, access string, clouds ...string) error }
GrantCloudAPI defines the API functions used by the grant command.
type GrantControllerAPI ¶
GrantControllerAPI defines the API functions used by the grant command.
type GrantModelAPI ¶
type GrantModelAPI interface { Close() error GrantModel(user, access string, modelUUIDs ...string) error }
GrantModelAPI defines the API functions used by the grant command.
type GrantOfferAPI ¶
type GrantOfferAPI interface { Close() error GrantOffer(user, access string, offerURLs ...string) error }
GrantOfferAPI defines the API functions used by the grant command.
type ModelCredentialAPI ¶
type ModelCredentialAPI interface { Close() error ChangeModelCredential(model names.ModelTag, credential names.CloudCredentialTag) error }
ModelCredentialAPI defines methods used to replace model credential.
type RetryProvisioningAPI ¶
type RetryProvisioningAPI interface { Close() error RetryProvisioning(all bool, machines ...names.MachineTag) ([]params.ErrorResult, error) }
RetryProvisioningAPI defines methods on the client API that the retry-provisioning command calls.
type RevokeCloudAPI ¶
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 ¶
RevokeControllerAPI defines the API functions used by the revoke command.
type RevokeModelAPI ¶
type RevokeModelAPI interface { Close() error RevokeModel(user, access string, modelUUIDs ...string) error }
RevokeModelAPI defines the API functions used by the revoke command.
type RevokeOfferAPI ¶
type RevokeOfferAPI interface { Close() error RevokeOffer(user, access string, offerURLs ...string) error }
RevokeOfferAPI defines the API functions used by the revoke command.
type ShowCommitCommand ¶
type ShowCommitCommand struct { modelcmd.ModelCommandBase // contains filtered or unexported fields }
ShowCommitCommand supplies the "show-commit" CLI command used to show commits
func (*ShowCommitCommand) Info ¶
func (c *ShowCommitCommand) Info() *cmd.Info
Info implements part of the cmd.Command interface.
func (*ShowCommitCommand) Init ¶
func (c *ShowCommitCommand) Init(args []string) error
Init implements part of the cmd.Command interface.
func (*ShowCommitCommand) Run ¶
func (c *ShowCommitCommand) Run(ctx *cmd.Context) error
Run implements the meaty part of the cmd.Command interface.
func (*ShowCommitCommand) SetFlags ¶
func (c *ShowCommitCommand) SetFlags(f *gnuflag.FlagSet)
SetFlags implements part of the cmd.Command interface.
type ShowCommitCommandAPI ¶
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.
type ShowModelAPI ¶
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 TrackBranchCommandAPI ¶
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.