Documentation ¶
Index ¶
- Constants
- type InstanceIdentifier
- type InstanceNetworkStatus
- type InstanceSpec
- type InstanceStatus
- func (is *InstanceStatus) APIInstance(openStackCluster *infrav1.OpenStackCluster) (*infrav1.Instance, error)
- func (is *InstanceStatus) AvailabilityZone() string
- 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 ServerExt
- type Service
- func (s *Service) CreateBastion(openStackCluster *infrav1.OpenStackCluster, clusterName string) (*InstanceStatus, error)
- func (s *Service) CreateInstance(openStackCluster *infrav1.OpenStackCluster, machine *clusterv1.Machine, ...) (instance *InstanceStatus, err error)
- func (s *Service) DeleteInstance(eventObject runtime.Object, instance *InstanceStatus) 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 ¶
const NovaMinimumMicroversion = "2.53"
NovaMinimumMicroversion is the minimum Nova microversion supported by CAPO 2.53 corresponds to OpenStack Pike
For the canonical description of Nova microversions, see https://docs.openstack.org/nova/latest/reference/api-microversion-history.html
CAPO uses server tags, which were added in microversion 2.52.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InstanceIdentifier ¶ added in v0.5.0
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 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 []string Networks []infrav1.Network }
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 *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 ServerExt ¶ added in v0.5.0
type ServerExt struct { servers.Server availabilityzones.ServerAvailabilityZoneExt }
ServerExt is the base gophercloud Server with extensions used by InstanceStatus.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(client *gophercloud.ProviderClient, clientOpts *clientconfig.ClientOpts, logger logr.Logger) (*Service, error)
NewService returns an instance of the compute service.
func (*Service) CreateBastion ¶ added in v0.3.3
func (s *Service) CreateBastion(openStackCluster *infrav1.OpenStackCluster, clusterName string) (*InstanceStatus, error)
func (*Service) CreateInstance ¶ added in v0.3.5
func (s *Service) CreateInstance(openStackCluster *infrav1.OpenStackCluster, machine *clusterv1.Machine, openStackMachine *infrav1.OpenStackMachine, clusterName string, userData string) (instance *InstanceStatus, err error)
func (*Service) DeleteInstance ¶ added in v0.3.5
func (s *Service) DeleteInstance(eventObject runtime.Object, instance *InstanceStatus) 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 (*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.