openstack

package
v1.31.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOpenStackProviderConfiguration

func NewOpenStackProviderConfiguration(fileName string) (providers.ProviderConfiguration, error)

Types

type Configuration

type Configuration struct {
	Cloud             string            `json:"cloud"`
	Image             string            `json:"image"`
	Timeout           time.Duration     `json:"timeout"`
	Network           Network           `json:"network"`
	AvailableGPUTypes map[string]string `json:"gpu-types"`
	KeyName           string            `json:"keyName"`
	OpenStackRegion   string            `default:"home" json:"region"`
	OpenStackZone     string            `default:"office" json:"zone"`
	UseBind9          bool              `json:"use-bind9"`
	Bind9Host         string            `json:"bind9-host"`
	RndcKeyFile       string            `json:"rndc-key-file"`
}

type FloatingNetworkInfos

type FloatingNetworkInfos struct {
	FloatingIPNetwork string `json:"network,omitempty"`
	ControlPlaneNode  bool   `json:"control-plane,omitempty"`
	WorkerNode        bool   `json:"worker-node,omitempty"`
}

type Network

type Network struct {
	Domain        string                   `json:"domain,omitempty" yaml:"domain,omitempty"`
	Interfaces    []*NetworkInterface      `json:"interfaces,omitempty" yaml:"interfaces,omitempty"`
	DNS           *cloudinit.NetworkResolv `json:"dns,omitempty" yaml:"dns,omitempty"`
	FloatingInfos *FloatingNetworkInfos    `json:"floating-ip,omitempty"`
	SecurityGroup SecurityGroup            `json:"security-group"`
}

type NetworkInterface

type NetworkInterface struct {
	Enabled     *bool  `json:"enabled,omitempty" yaml:"primary,omitempty"`
	Primary     bool   `json:"primary,omitempty" yaml:"primary,omitempty"`
	NetworkName string `json:"network,omitempty" yaml:"network,omitempty"`
	DHCP        bool   `json:"dhcp,omitempty" yaml:"dhcp,omitempty"`
	IPAddress   string `json:"address,omitempty" yaml:"address,omitempty"`
	Netmask     string `json:"netmask,omitempty" yaml:"netmask,omitempty"`
}

type OpenStackServer

type OpenStackServer struct {
	servers.Server
}

type SecurityGroup

type SecurityGroup struct {
	ControlPlaneNode string `default:"default" json:"control-plane"`
	WorkerNode       string `default:"default" json:"worker-node"`
}

type ServerInstance

type ServerInstance struct {
	NodeIndex      int
	InstanceName   string
	PrivateDNSName string
	InstanceID     string
	Region         string
	Zone           string
	AddressIP      string
	// contains filtered or unexported fields
}

func (ServerInstance) AttachInstance

func (wrapper ServerInstance) AttachInstance(instanceName string, controlPlane bool, nodeIndex int) (handler providers.ProviderHandler, err error)

func (ServerInstance) ConfigurationDidLoad

func (wrapper ServerInstance) ConfigurationDidLoad() (err error)

func (*ServerInstance) Create

func (instance *ServerInstance) Create(controlPlane bool, nodeGroup, flavorRef string, userData string, diskSize int) (err error)

Create will create a named VM not powered memory and disk are in megabytes

func (ServerInstance) CreateInstance

func (wrapper ServerInstance) CreateInstance(instanceName, instanceType string, controlPlane bool, nodeIndex int) (handler providers.ProviderHandler, err error)

func (*ServerInstance) Delete

func (instance *ServerInstance) Delete() (err error)

func (ServerInstance) GetAvailableGpuTypes

func (wrapper ServerInstance) GetAvailableGpuTypes() map[string]string

func (ServerInstance) GetMode

func (wrapper ServerInstance) GetMode() bool

func (ServerInstance) IDFromName

func (wrapper ServerInstance) IDFromName(name string) (string, error)

This is duplicated from https://github.com/gophercloud/utils so that Gophercloud "core" doesn't have a dependency on the complementary utils repository.

func (ServerInstance) InstanceExists

func (wrapper ServerInstance) InstanceExists(name string) (exists bool)

func (*ServerInstance) PowerOff

func (instance *ServerInstance) PowerOff(ctx *context.Context) (err error)

func (*ServerInstance) PowerOn

func (instance *ServerInstance) PowerOn(ctx *context.Context) (err error)

func (ServerInstance) RetrieveNetworkInfos

func (wrapper ServerInstance) RetrieveNetworkInfos(vmuuid string, network *providers.Network) (err error)

func (ServerInstance) SetMode

func (wrapper ServerInstance) SetMode(test bool)

func (*ServerInstance) ShutdownGuest

func (instance *ServerInstance) ShutdownGuest() (err error)

func (*ServerInstance) Status

func (instance *ServerInstance) Status() (status providers.InstanceStatus, err error)

func (ServerInstance) UUID

func (wrapper ServerInstance) UUID(name string) (vmuuid string, err error)

func (*ServerInstance) WaitForIP

func (instance *ServerInstance) WaitForIP(callback providers.CallbackWaitSSHReady) (address string, err error)

WaitForIP wait ip a VM by name

func (*ServerInstance) WaitForPowered

func (instance *ServerInstance) WaitForPowered() error

WaitForPowered wait ip a VM by name

Jump to

Keyboard shortcuts

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