Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudRegionSpec

type CloudRegionSpec struct {
	// Cloud is the name of the cloud.
	Cloud string

	// Region is the name of the cloud region.
	Region string
}

CloudRegionSpec contains the information needed to lookup specific cloud or cloud region configuration. This is for use in calling state/modelconfig.(ComposeNewModelConfig) so there is no need to serialize it.

func NewCloudRegionSpec

func NewCloudRegionSpec(cloud, region string) (*CloudRegionSpec, error)

NewCloudRegionSpec returns a CloudRegionSpec ensuring cloud arg is not empty.

type CloudSpec

type CloudSpec struct {
	// Type is the type of cloud, eg aws, openstack etc.
	Type string

	// Name is the name of the cloud.
	Name string

	// Region is the name of the cloud region, if the cloud supports
	// regions.
	Region string

	// Endpoint is the endpoint for the cloud (region).
	Endpoint string

	// IdentityEndpoint is the identity endpoint for the cloud (region).
	IdentityEndpoint string

	// StorageEndpoint is the storage endpoint for the cloud (region).
	StorageEndpoint string

	// Credential is the cloud credential to use to authenticate
	// with the cloud, or nil if the cloud does not require any
	// credentials.
	Credential *jujucloud.Credential

	// CACertificates contains an optional list of Certificate
	// Authority certificates to be used to validate certificates
	// of cloud infrastructure components
	// The contents are Base64 encoded x.509 certs.
	CACertificates []string
}

CloudSpec describes a specific cloud configuration, for the purpose of opening an Environ to manage the cloud resources.

func MakeCloudSpec

func MakeCloudSpec(cloud jujucloud.Cloud, cloudRegionName string, credential *jujucloud.Credential) (CloudSpec, error)

MakeCloudSpec returns a CloudSpec from the given Cloud, cloud and region names, and credential.

func (CloudSpec) Validate

func (cs CloudSpec) Validate() error

Validate validates that the CloudSpec is well-formed. It does not ensure that the cloud type and credentials are valid.

Source Files