cloudstack

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package cloudstack contains the Cloudstack platform implementation.

Index

Constants

View Source
const (
	// CloudstackMetadataEndpoint is the local Cloudstack endpoint.
	CloudstackMetadataEndpoint = "http://data-server./latest/meta-data"
	// CloudstackUserDataEndpoint is the local Cloudstack endpoint for the config.
	CloudstackUserDataEndpoint = "http://data-server./latest/user-data"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cloudstack

type Cloudstack struct{}

Cloudstack is the concrete type that implements the runtime.Platform interface.

func (*Cloudstack) Configuration

func (e *Cloudstack) Configuration(ctx context.Context, r state.State) ([]byte, error)

Configuration implements the runtime.Platform interface.

func (*Cloudstack) KernelArgs

func (e *Cloudstack) KernelArgs(string) procfs.Parameters

KernelArgs implements the runtime.Platform interface.

func (*Cloudstack) Mode

func (e *Cloudstack) Mode() runtime.Mode

Mode implements the runtime.Platform interface.

func (*Cloudstack) Name

func (e *Cloudstack) Name() string

Name implements the runtime.Platform interface.

func (*Cloudstack) NetworkConfiguration

func (e *Cloudstack) NetworkConfiguration(ctx context.Context, _ state.State, ch chan<- *runtime.PlatformNetworkConfig) error

NetworkConfiguration implements the runtime.Platform interface.

func (*Cloudstack) ParseMetadata

func (e *Cloudstack) ParseMetadata(metadata *MetadataConfig) (*runtime.PlatformNetworkConfig, error)

ParseMetadata converts Cloudstack platform metadata into platform network config.

type MetadataConfig

type MetadataConfig struct {
	Hostname     string `json:"local-hostname,omitempty"`
	InstanceID   string `json:"instance-id,omitempty"`
	InstanceType string `json:"service-offering,omitempty"`
	PublicIPv4   string `json:"public-ipv4,omitempty"`
	Zone         string `json:"availability-zone,omitempty"`
}

MetadataConfig represents a metadata Cloudstack instance.

Jump to

Keyboard shortcuts

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