executionv011

package
v0.0.0-...-5c66da2 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvironmentV011

type EnvironmentV011 struct {
	Command            common.ExecutionCommand
	ControllerID       string
	PoolID             string
	ProviderConfigFile string
	InstanceID         string
	ExtraSpecs         string
	BootstrapParams    params.BootstrapInstance
}

func GetEnvironment

func GetEnvironment() (EnvironmentV011, error)

func (EnvironmentV011) Run

func (e EnvironmentV011) Run(ctx context.Context, provider ExternalProvider) (string, error)

func (EnvironmentV011) Validate

func (e EnvironmentV011) Validate() error

type ExternalProvider

type ExternalProvider interface {
	// The common ExternalProvider interface
	common.ExternalProvider
	// GetSupportedInterfaceVersions will return the supported interface versions.
	GetSupportedInterfaceVersions(ctx context.Context) []string
	// ValidatePoolInfo will validate the pool info and return an error if it's not valid.
	ValidatePoolInfo(ctx context.Context, image string, flavor string, providerConfig string, extraspecs string) error
	// GetConfigJSONSchema will return the JSON schema for the provider's configuration.
	GetConfigJSONSchema(ctx context.Context) (string, error)
	// GetExtraSpecsJSONSchema will return the JSON schema for the provider's extra specs.
	GetExtraSpecsJSONSchema(ctx context.Context) (string, error)
}

ExternalProvider defines an interface that external providers need to implement. This is very similar to the common.Provider interface, and was redefined here to decouple it, in case it may diverge from native providers.

Jump to

Keyboard shortcuts

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