Documentation ¶
Index ¶
- Variables
- func IsAuthorisationFailure(err error) bool
- func NewEnviron(cloud environscloudspec.CloudSpec, cfg *config.Config, ...) (*maasEnviron, error)
- func NewStorage(env *maasEnviron) storage.Storage
- type MAASRenderer
- type MaasCapabilities
- type MaasEnvironProvider
- func (p MaasEnvironProvider) CloudSchema() *jsonschema.Schema
- func (p MaasEnvironProvider) ConfigDefaults() schema.Defaults
- func (p MaasEnvironProvider) ConfigSchema() schema.Fields
- func (MaasEnvironProvider) CredentialSchemas() map[cloud.AuthType]cloud.CredentialSchema
- func (MaasEnvironProvider) DetectCredentials() (*cloud.CloudCredential, error)
- func (p MaasEnvironProvider) DetectRegions() ([]cloud.Region, error)
- func (MaasEnvironProvider) FinalizeCredential(_ environs.FinalizeCredentialContext, args environs.FinalizeCredentialParams) (*cloud.Credential, error)
- func (MaasEnvironProvider) Open(args environs.OpenParams) (environs.Environ, error)
- func (p MaasEnvironProvider) Ping(ctx context.ProviderCallContext, endpoint string) error
- func (p MaasEnvironProvider) PrepareConfig(args environs.PrepareConfigParams) (*config.Config, error)
- func (MaasEnvironProvider) Schema() environschema.Fields
- func (prov MaasEnvironProvider) Validate(cfg, oldCfg *config.Config) (*config.Config, error)
- func (MaasEnvironProvider) Version() int
Constants ¶
This section is empty.
Variables ¶
var ( ReleaseNodes = releaseNodes DeploymentStatusCall = deploymentStatusCall GetMAAS2Controller = getMAAS2Controller )
Functions ¶
func IsAuthorisationFailure ¶
IsAuthorisationFailure determines if the given error has an authorisation failure.
func NewEnviron ¶
func NewEnviron(cloud environscloudspec.CloudSpec, cfg *config.Config, getCaps MaasCapabilities) (*maasEnviron, error)
func NewStorage ¶
Types ¶
type MAASRenderer ¶
type MAASRenderer struct{}
func (MAASRenderer) Render ¶
func (MAASRenderer) Render(cfg cloudinit.CloudConfig, os jujuos.OSType) ([]byte, error)
type MaasCapabilities ¶
MaasCapabilities represents a function that gets the capabilities of a MAAS installation.
type MaasEnvironProvider ¶
type MaasEnvironProvider struct { // GetCapabilities is a function that connects to MAAS to return its set of // capabilities. GetCapabilities MaasCapabilities // contains filtered or unexported fields }
func (MaasEnvironProvider) CloudSchema ¶
func (p MaasEnvironProvider) CloudSchema() *jsonschema.Schema
CloudSchema returns the schema for adding new clouds of this type.
func (MaasEnvironProvider) ConfigDefaults ¶
func (p MaasEnvironProvider) ConfigDefaults() schema.Defaults
ConfigDefaults returns the default values for the provider specific config attributes.
func (MaasEnvironProvider) ConfigSchema ¶
func (p MaasEnvironProvider) ConfigSchema() schema.Fields
ConfigSchema returns extra config attributes specific to this provider only.
func (MaasEnvironProvider) CredentialSchemas ¶
func (MaasEnvironProvider) CredentialSchemas() map[cloud.AuthType]cloud.CredentialSchema
CredentialSchemas is part of the environs.ProviderCredentials interface.
func (MaasEnvironProvider) DetectCredentials ¶
func (MaasEnvironProvider) DetectCredentials() (*cloud.CloudCredential, error)
DetectCredentials is part of the environs.ProviderCredentials interface.
func (MaasEnvironProvider) DetectRegions ¶
func (p MaasEnvironProvider) DetectRegions() ([]cloud.Region, error)
DetectRegions is specified in the environs.CloudRegionDetector interface.
func (MaasEnvironProvider) FinalizeCredential ¶
func (MaasEnvironProvider) FinalizeCredential(_ environs.FinalizeCredentialContext, args environs.FinalizeCredentialParams) (*cloud.Credential, error)
FinalizeCredential is part of the environs.ProviderCredentials interface.
func (MaasEnvironProvider) Open ¶
func (MaasEnvironProvider) Open(args environs.OpenParams) (environs.Environ, error)
func (MaasEnvironProvider) Ping ¶
func (p MaasEnvironProvider) Ping(ctx context.ProviderCallContext, endpoint string) error
Ping tests the connection to the cloud, to verify the endpoint is valid.
func (MaasEnvironProvider) PrepareConfig ¶
func (p MaasEnvironProvider) PrepareConfig(args environs.PrepareConfigParams) (*config.Config, error)
PrepareConfig is specified in the EnvironProvider interface.
func (MaasEnvironProvider) Schema ¶
func (MaasEnvironProvider) Schema() environschema.Fields
Schema returns the configuration schema for an environment.
func (MaasEnvironProvider) Version ¶
func (MaasEnvironProvider) Version() int
Version is part of the EnvironProvider interface.