cloudspec

package
v0.0.0-...-b0bff92 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: AGPL-3.0 Imports: 3 Imported by: 0

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

	// SkipTLSVerify is true if the client should be asked not to
	// validate certificates. It is not recommended for production clouds.
	// It is secure (false) by default.
	SkipTLSVerify bool

	// IsControllerCloud is true when this is the cloud used by the controller.
	IsControllerCloud bool
}

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.

Jump to

Keyboard shortcuts

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