Documentation ¶
Index ¶
- func HashInstanceSpec(computeInstance *InstanceSpec) (string, error)
- type InstanceIdentifier
- type InstanceNetworkStatus
- type InstanceSpec
- type InstanceStatus
- func (is *InstanceStatus) AvailabilityZone() string
- func (is *InstanceStatus) BastionStatus(openStackCluster *infrav1.OpenStackCluster) (*infrav1.BastionStatus, error)
- func (is *InstanceStatus) ID() string
- func (is *InstanceStatus) InstanceIdentifier() *InstanceIdentifier
- func (is *InstanceStatus) Name() string
- func (is *InstanceStatus) NetworkStatus() (*InstanceNetworkStatus, error)
- func (is *InstanceStatus) SSHKeyName() string
- func (is *InstanceStatus) State() infrav1.InstanceState
- type Service
- func (s *Service) CreateInstance(eventObject runtime.Object, openStackCluster *infrav1.OpenStackCluster, ...) (*InstanceStatus, error)
- func (s *Service) DeleteInstance(openStackCluster *infrav1.OpenStackCluster, eventObject runtime.Object, ...) error
- func (s *Service) GetAvailabilityZones() ([]availabilityzones.AvailabilityZone, error)
- func (s *Service) GetInstanceStatus(resourceID string) (instance *InstanceStatus, err error)
- func (s *Service) GetInstanceStatusByName(eventObject runtime.Object, name string) (instance *InstanceStatus, err error)
- func (s *Service) GetManagementPort(openStackCluster *infrav1.OpenStackCluster, instanceStatus *InstanceStatus) (*ports.Port, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HashInstanceSpec ¶
func HashInstanceSpec(computeInstance *InstanceSpec) (string, error)
Types ¶
type InstanceIdentifier ¶
InstanceIdentifier describes an instance which has not necessarily been fetched.
type InstanceNetworkStatus ¶
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 ¶
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 ¶
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 ¶
func (ns *InstanceNetworkStatus) IP(networkName string) string
IP returns the first listed ip of an instance for the given network name.
type InstanceSpec ¶
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 AdditionalBlockDevices []infrav1.AdditionalBlockDevice ServerGroupID string Trunk bool Tags []string SecurityGroups []infrav1.SecurityGroupFilter 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 ¶
type InstanceStatus struct {
// contains filtered or unexported fields
}
InstanceStatus represents instance data which has been returned by OpenStack.
func NewInstanceStatusFromServer ¶
func NewInstanceStatusFromServer(server *clients.ServerExt, logger logr.Logger) *InstanceStatus
func (*InstanceStatus) AvailabilityZone ¶
func (is *InstanceStatus) AvailabilityZone() string
func (*InstanceStatus) BastionStatus ¶
func (is *InstanceStatus) BastionStatus(openStackCluster *infrav1.OpenStackCluster) (*infrav1.BastionStatus, error)
BastionStatus returns an infrav1.BastionStatus for use in the cluster status.
func (*InstanceStatus) ID ¶
func (is *InstanceStatus) ID() string
func (*InstanceStatus) InstanceIdentifier ¶
func (is *InstanceStatus) InstanceIdentifier() *InstanceIdentifier
InstanceIdentifier returns an InstanceIdentifier object for an InstanceStatus.
func (*InstanceStatus) Name ¶
func (is *InstanceStatus) Name() string
func (*InstanceStatus) NetworkStatus ¶
func (is *InstanceStatus) NetworkStatus() (*InstanceNetworkStatus, error)
NetworkStatus returns an InstanceNetworkStatus object for an InstanceStatus.
func (*InstanceStatus) SSHKeyName ¶
func (is *InstanceStatus) SSHKeyName() string
func (*InstanceStatus) State ¶
func (is *InstanceStatus) State() infrav1.InstanceState
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
NewService returns an instance of the compute service.
func (*Service) CreateInstance ¶
func (s *Service) CreateInstance(eventObject runtime.Object, openStackCluster *infrav1.OpenStackCluster, instanceSpec *InstanceSpec, clusterName string) (*InstanceStatus, error)
func (*Service) DeleteInstance ¶
func (s *Service) DeleteInstance(openStackCluster *infrav1.OpenStackCluster, eventObject runtime.Object, instanceStatus *InstanceStatus, instanceSpec *InstanceSpec) error
func (*Service) GetAvailabilityZones ¶
func (s *Service) GetAvailabilityZones() ([]availabilityzones.AvailabilityZone, error)
func (*Service) GetInstanceStatus ¶
func (s *Service) GetInstanceStatus(resourceID string) (instance *InstanceStatus, err error)
func (*Service) GetInstanceStatusByName ¶
func (*Service) GetManagementPort ¶
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.