maas

package
v0.0.0-...-a753888 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: AGPL-3.0 Imports: 55 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DeploymentStatusCall = deploymentStatusCall
	GetMAASController    = getMAASController
)

Functions

func IsAuthorisationFailure

func IsAuthorisationFailure(err error) bool

IsAuthorisationFailure determines if the given error has an authorisation failure.

func NewEnviron

func NewEnviron(cloud environscloudspec.CloudSpec, cfg *config.Config, getCaps Capabilities) (*maasEnviron, error)

func NewStorage

func NewStorage(env *maasEnviron) storage.Storage

Types

type Capabilities

type Capabilities = func(client *gomaasapi.MAASObject, serverURL string) (set.Strings, error)

Capabilities is an alias for a function that gets the capabilities of a MAAS installation.

type EnvironProvider

type EnvironProvider struct {

	// GetCapabilities is a function that connects to MAAS to return its set of
	// capabilities.
	GetCapabilities Capabilities
	// contains filtered or unexported fields
}

func (EnvironProvider) CloudSchema

func (p EnvironProvider) CloudSchema() *jsonschema.Schema

CloudSchema returns the schema for adding new clouds of this type.

func (EnvironProvider) ConfigDefaults

func (p EnvironProvider) ConfigDefaults() schema.Defaults

ConfigDefaults returns the default values for the provider specific config attributes.

func (EnvironProvider) ConfigSchema

func (p EnvironProvider) ConfigSchema() schema.Fields

ConfigSchema returns extra config attributes specific to this provider only.

func (EnvironProvider) CredentialSchemas

func (EnvironProvider) CredentialSchemas() map[cloud.AuthType]cloud.CredentialSchema

CredentialSchemas is part of the environs.ProviderCredentials interface.

func (EnvironProvider) DetectCredentials

func (EnvironProvider) DetectCredentials(cloudName string) (*cloud.CloudCredential, error)

DetectCredentials is part of the environs.ProviderCredentials interface.

func (EnvironProvider) DetectRegions

func (p EnvironProvider) DetectRegions() ([]cloud.Region, error)

DetectRegions is specified in the environs.CloudRegionDetector interface.

func (EnvironProvider) FinalizeCredential

func (EnvironProvider) FinalizeCredential(_ environs.FinalizeCredentialContext, args environs.FinalizeCredentialParams) (*cloud.Credential, error)

FinalizeCredential is part of the environs.ProviderCredentials interface.

func (EnvironProvider) Open

func (EnvironProvider) Ping

func (p EnvironProvider) Ping(ctx context.ProviderCallContext, endpoint string) error

Ping tests the connection to the cloud, to verify the endpoint is valid.

func (EnvironProvider) PrepareConfig

func (p EnvironProvider) PrepareConfig(args environs.PrepareConfigParams) (*config.Config, error)

PrepareConfig is specified in the EnvironProvider interface.

func (EnvironProvider) Schema

func (EnvironProvider) Schema() environschema.Fields

Schema returns the configuration schema for an environment.

func (EnvironProvider) Validate

func (p EnvironProvider) Validate(cfg, oldCfg *config.Config) (*config.Config, error)

func (EnvironProvider) Version

func (EnvironProvider) Version() int

Version is part of the EnvironProvider interface.

type MAASRenderer

type MAASRenderer struct{}

func (MAASRenderer) Render

func (MAASRenderer) Render(cfg cloudinit.CloudConfig, os jujuos.OSType) ([]byte, error)

Jump to

Keyboard shortcuts

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