juju: github.com/juju/juju/environs/cloudspec Index | Files

package cloudspec

import "github.com/juju/juju/environs/cloudspec"


Package Files


type CloudRegionSpec Uses

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 Uses

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

NewCloudRegionSpec returns a CloudRegionSpec ensuring cloud arg is not empty.

type CloudSpec Uses

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 Uses

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 Uses

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.

Package cloudspec imports 3 packages (graph) and is imported by 77 packages. Updated 2020-07-20. Refresh now. Tools for package owners.