cloud

package
v0.0.0-...-a0d7459 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2017 License: AGPL-3.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewUpdateCloudsCommand = func() cmd.Command {
	return newUpdateCloudsCommand()
}

NewUpdateCloudsCommand returns a command to update cloud information.

Functions

func NewAddCredentialCommand

func NewAddCredentialCommand() cmd.Command

NewAddCredentialCommand returns a command to add credential information.

func NewDetectCredentialsCommand

func NewDetectCredentialsCommand() cmd.Command

NewDetectCredentialsCommand returns a command to add credential information to credentials.yaml.

func NewListCloudsCommand

func NewListCloudsCommand() cmd.Command

NewListCloudsCommand returns a command to list cloud information.

func NewListCredentialsCommand

func NewListCredentialsCommand() cmd.Command

NewListCredentialsCommand returns a command to list cloud credentials.

func NewListRegionsCommand

func NewListRegionsCommand() cmd.Command

NewListRegionsCommand returns a command to list cloud region information.

func NewRemoveCloudCommand

func NewRemoveCloudCommand() cmd.Command

NewRemoveCloudCommand returns a command to remove cloud information.

func NewRemoveCredentialCommand

func NewRemoveCredentialCommand() cmd.Command

NewremoveCredentialCommand returns a command to remove a named credential for a cloud.

func NewSetDefaultCredentialCommand

func NewSetDefaultCredentialCommand() cmd.Command

NewSetDefaultCredentialCommand returns a command to set the default credential for a cloud.

func NewSetDefaultRegionCommand

func NewSetDefaultRegionCommand() cmd.Command

NewSetDefaultRegionCommand returns a command to set the default region for a cloud.

func NewShowCloudCommand

func NewShowCloudCommand() cmd.Command

NewShowCloudCommand returns a command to list cloud information.

func NewUpdateCredentialCommand

func NewUpdateCredentialCommand() cmd.Command

NewUpdateCredentialCommand returns a command to update credential details.

Types

type AddCloudCommand

type AddCloudCommand struct {
	cmd.CommandBase

	// Replace, if true, existing cloud information is overwritten.
	Replace bool

	// Cloud is the name fo the cloud to add.
	Cloud string

	// CloudFile is the name of the cloud YAML file.
	CloudFile string

	// Ping contains the logic for pinging a cloud endpoint to know whether or
	// not it really has a valid cloud of the same type as the provider.  By
	// default it just calls the correct provider's Ping method.
	Ping func(p environs.EnvironProvider, endpoint string) error
	// contains filtered or unexported fields
}

AddCloudCommand is the command that allows you to add a cloud configuration for use with juju bootstrap.

func NewAddCloudCommand

func NewAddCloudCommand(cloudMetadataStore CloudMetadataStore) *AddCloudCommand

NewAddCloudCommand returns a command to add cloud information.

func (*AddCloudCommand) Info

func (c *AddCloudCommand) Info() *cmd.Info

Info returns help information about the command.

func (*AddCloudCommand) Init

func (c *AddCloudCommand) Init(args []string) (err error)

Init populates the command with the args from the command line.

func (*AddCloudCommand) Run

func (c *AddCloudCommand) Run(ctxt *cmd.Context) error

Run executes the add cloud command, adding a cloud based on a passed-in yaml file or interactive queries.

func (*AddCloudCommand) SetFlags

func (c *AddCloudCommand) SetFlags(f *gnuflag.FlagSet)

SetFlags initializes the flags supported by the command.

type CloudCredential

type CloudCredential struct {
	// DefaultCredential is the named credential to use by default.
	DefaultCredential string `json:"default-credential,omitempty" yaml:"default-credential,omitempty"`

	// DefaultRegion is the cloud region to use by default.
	DefaultRegion string `json:"default-region,omitempty" yaml:"default-region,omitempty"`

	// Credentials is the collection of all credentials registered by the user for a cloud, keyed on a cloud name.
	Credentials map[string]Credential `json:"cloud-credentials,omitempty" yaml:",omitempty,inline"`
}

CloudCredential contains attributes used to define credentials for a cloud.

type CloudMetadataStore

type CloudMetadataStore interface {
	ParseCloudMetadataFile(path string) (map[string]cloud.Cloud, error)
	ParseOneCloud(data []byte) (cloud.Cloud, error)
	PublicCloudMetadata(searchPaths ...string) (result map[string]cloud.Cloud, fallbackUsed bool, _ error)
	PersonalCloudMetadata() (map[string]cloud.Cloud, error)
	WritePersonalCloudMetadata(cloudsMap map[string]cloud.Cloud) error
}

type Credential

type Credential struct {
	// AuthType determines authentication type for the credential.
	AuthType string `json:"auth-type" yaml:"auth-type"`

	// Attributes define details for individual credential.
	// This collection is provider-specific: each provider is interested in different credential details.
	Attributes map[string]string `json:"details,omitempty" yaml:",omitempty,inline"`

	// Revoked is true if the credential has been revoked.
	Revoked bool `json:"revoked,omitempty" yaml:"revoked,omitempty"`

	// Label is optionally set to describe the credentials to a user.
	Label string `json:"label,omitempty" yaml:"label,omitempty"`
}

Credential instances represent cloud credentials.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL