compute

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: Apache-2.0 Imports: 26 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashInstanceSpec added in v0.7.0

func HashInstanceSpec(computeInstance *InstanceSpec) (string, error)

Types

type InstanceIdentifier added in v0.5.0

type InstanceIdentifier struct {
	ID   string
	Name string
}

InstanceIdentifier describes an instance which has not necessarily been fetched.

type InstanceNetworkStatus added in v0.5.0

type InstanceNetworkStatus struct {
	// contains filtered or unexported fields
}

InstanceNetworkStatus represents the network status of an OpenStack instance as used by CAPO. Therefore it may use more context than just data which was returned by OpenStack.

func (*InstanceNetworkStatus) Addresses added in v0.5.0

func (ns *InstanceNetworkStatus) Addresses() []corev1.NodeAddress

Addresses returns a list of NodeAddresses containing all addresses which will be reported on the OpenStackMachine object.

func (*InstanceNetworkStatus) FloatingIP added in v0.5.0

func (ns *InstanceNetworkStatus) FloatingIP(networkName string) string

FloatingIP returns the first listed floating ip of an instance for the given network name.

func (*InstanceNetworkStatus) IP added in v0.5.0

func (ns *InstanceNetworkStatus) IP(networkName string) string

IP returns the first listed ip of an instance for the given network name.

type InstanceSpec added in v0.5.0

type InstanceSpec struct {
	Name           string
	Image          string
	ImageUUID      string
	Flavor         string
	SSHKeyName     string
	UserData       string
	Metadata       map[string]string
	ConfigDrive    bool
	FailureDomain  string
	RootVolume     *infrav1.RootVolume
	Subnet         string
	ServerGroupID  string
	Trunk          bool
	Tags           []string
	SecurityGroups []infrav1.SecurityGroupParam
	Networks       []infrav1.NetworkParam
	Ports          []infrav1.PortOpts
}

InstanceSpec defines the fields which can be set on a new OpenStack instance.

InstanceSpec does not contain all of the fields of infrav1.Instance, as not all of them can be set on a new instance.

type InstanceStatus added in v0.5.0

type InstanceStatus struct {
	// contains filtered or unexported fields
}

InstanceStatus represents instance data which has been returned by OpenStack.

func NewInstanceStatusFromServer added in v0.5.0

func NewInstanceStatusFromServer(server *clients.ServerExt, logger logr.Logger) *InstanceStatus

func (*InstanceStatus) APIInstance added in v0.5.0

func (is *InstanceStatus) APIInstance(openStackCluster *infrav1.OpenStackCluster) (*infrav1.Instance, error)

APIInstance returns an infrav1.Instance object for use by the API.

func (*InstanceStatus) AvailabilityZone added in v0.5.0

func (is *InstanceStatus) AvailabilityZone() string

func (*InstanceStatus) ID added in v0.5.0

func (is *InstanceStatus) ID() string

func (*InstanceStatus) InstanceIdentifier added in v0.5.0

func (is *InstanceStatus) InstanceIdentifier() *InstanceIdentifier

InstanceIdentifier returns an InstanceIdentifier object for an InstanceStatus.

func (*InstanceStatus) Name added in v0.5.0

func (is *InstanceStatus) Name() string

func (*InstanceStatus) NetworkStatus added in v0.5.0

func (is *InstanceStatus) NetworkStatus() (*InstanceNetworkStatus, error)

NetworkStatus returns an InstanceNetworkStatus object for an InstanceStatus.

func (*InstanceStatus) SSHKeyName added in v0.5.0

func (is *InstanceStatus) SSHKeyName() string

func (*InstanceStatus) State added in v0.5.0

func (is *InstanceStatus) State() infrav1.InstanceState

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(scope *scope.Scope) (*Service, error)

NewService returns an instance of the compute service.

func (*Service) CreateInstance added in v0.3.5

func (s *Service) CreateInstance(eventObject runtime.Object, openStackCluster *infrav1.OpenStackCluster, instanceSpec *InstanceSpec, clusterName string) (*InstanceStatus, error)

func (*Service) DeleteInstance added in v0.3.5

func (s *Service) DeleteInstance(eventObject runtime.Object, instanceStatus *InstanceStatus, instanceName string, rootVolume *infrav1.RootVolume) error

func (*Service) GetAvailabilityZones added in v0.3.0

func (s *Service) GetAvailabilityZones() ([]availabilityzones.AvailabilityZone, error)

func (*Service) GetInstanceStatus added in v0.5.0

func (s *Service) GetInstanceStatus(resourceID string) (instance *InstanceStatus, err error)

func (*Service) GetInstanceStatusByName added in v0.5.0

func (s *Service) GetInstanceStatusByName(eventObject runtime.Object, name string) (instance *InstanceStatus, err error)

func (*Service) GetManagementPort added in v0.5.0

func (s *Service) GetManagementPort(openStackCluster *infrav1.OpenStackCluster, instanceStatus *InstanceStatus) (*ports.Port, error)

GetManagementPort returns the port which is used for management and external traffic. Cluster floating IPs must be associated with this port.

Jump to

Keyboard shortcuts

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