Documentation
¶
Index ¶
- Constants
- func GetClassLabel(o apiutils.Object) (string, bool)
- func GetObjectMetadata(o apiutils.Metadata) (*irimeta.ObjectMetadata, error)
- func HasBootImage(machine *Machine) *string
- func IsImageReferenced(machine *Machine, image string) bool
- func IsManagedBy(o apiutils.Object, manager string) bool
- func SetClassLabel(o apiutils.Object, class string)
- func SetManagerLabel(o apiutils.Object, manager string)
- func SetObjectMetadata(o apiutils.Object, metadata *irimeta.ObjectMetadata) error
- type GuestAgent
- type GuestAgentStatus
- type LocalDiskSpec
- type Machine
- type MachineSpec
- type MachineState
- type MachineStatus
- type NetworkInterfaceSpec
- type NetworkInterfaceState
- type NetworkInterfaceStatus
- type PowerState
- type VolumeConnection
- type VolumeSpec
- type VolumeState
- type VolumeStatus
Constants ¶
View Source
const ( LabelsAnnotation = "libvirt-provider.ironcore.dev/labels" AnnotationsAnnotation = "libvirt-provider.ironcore.dev/annotations" )
View Source
const ( ManagerLabel = "libvirt-provider.ironcore.dev/manager" ClassLabel = "libvirt-provider.ironcore.dev/class" )
View Source
const (
MachineManager = "libvirt-provider"
)
View Source
const (
// NvidiaGPUPlugin is the resource name for NVIDIA GPU devices to be claimed
NvidiaGPUPlugin = "nvidia.com/gpu"
)
Variables ¶
This section is empty.
Functions ¶
func GetObjectMetadata ¶
func GetObjectMetadata(o apiutils.Metadata) (*irimeta.ObjectMetadata, error)
func HasBootImage ¶ added in v0.3.0
func IsImageReferenced ¶ added in v0.3.0
func SetClassLabel ¶
func SetManagerLabel ¶
func SetObjectMetadata ¶
func SetObjectMetadata(o apiutils.Object, metadata *irimeta.ObjectMetadata) error
Types ¶
type GuestAgent ¶
type GuestAgent string
const ( GuestAgentNone GuestAgent = "None" GuestAgentQemu GuestAgent = "Qemu" )
type GuestAgentStatus ¶
type GuestAgentStatus struct {
Addr string `json:"addr,omitempty"`
}
type LocalDiskSpec ¶ added in v0.3.0
type Machine ¶
type Machine struct {
apiutils.Metadata `json:"metadata,omitempty"`
Spec MachineSpec `json:"spec"`
Status MachineStatus `json:"status"`
}
type MachineSpec ¶
type MachineSpec struct {
Power PowerState `json:"power"`
Cpu int64 `json:"cpu"`
MemoryBytes int64 `json:"memoryBytes"`
Ignition []byte `json:"ignition"`
Volumes []*VolumeSpec `json:"volumes"`
NetworkInterfaces []*NetworkInterfaceSpec `json:"networkInterfaces"`
Gpu []pci.Address `json:"gpu"`
ShutdownAt time.Time `json:"shutdownAt,omitempty"`
GuestAgent GuestAgent `json:"guestAgent"`
}
type MachineState ¶
type MachineState string
const ( MachineStatePending MachineState = "Pending" MachineStateRunning MachineState = "Running" MachineStateSuspended MachineState = "Suspended" MachineStateTerminating MachineState = "Terminating" MachineStateTerminated MachineState = "Terminated" )
type MachineStatus ¶
type MachineStatus struct {
VolumeStatus []VolumeStatus `json:"volumeStatus"`
NetworkInterfaceStatus []NetworkInterfaceStatus `json:"networkInterfaceStatus"`
State MachineState `json:"state"`
ImageRef string `json:"imageRef"`
GuestAgentStatus *GuestAgentStatus `json:"guestAgentStatus,omitempty"`
}
type NetworkInterfaceSpec ¶
type NetworkInterfaceState ¶
type NetworkInterfaceState string
const ( NetworkInterfaceStatePending NetworkInterfaceState = "Pending" NetworkInterfaceStateAttached NetworkInterfaceState = "Attached" )
type NetworkInterfaceStatus ¶
type NetworkInterfaceStatus struct {
Name string `json:"name"`
Handle string `json:"handle"`
State NetworkInterfaceState `json:"state"`
}
type PowerState ¶
type PowerState int32
const ( PowerStatePowerOn PowerState = 0 PowerStatePowerOff PowerState = 1 )
type VolumeConnection ¶
type VolumeConnection struct {
Driver string `json:"driver,omitempty"`
Handle string `json:"handle,omitempty"`
Attributes map[string]string `json:"attributes,omitempty"`
SecretData map[string][]byte `json:"secret_data,omitempty"`
EncryptionData map[string][]byte `json:"encryption_data,omitempty"`
EffectiveStorageBytes int64 `json:"effective_storage_bytes,omitempty"`
}
type VolumeSpec ¶
type VolumeSpec struct {
Name string `json:"name"`
Device string `json:"device"`
LocalDisk *LocalDiskSpec `json:"localDisk,omitempty"`
Connection *VolumeConnection `json:"cephDisk,omitempty"`
}
type VolumeState ¶
type VolumeState string
const ( VolumeStatePending VolumeState = "Pending" VolumeStateAttached VolumeState = "Attached" )
type VolumeStatus ¶
type VolumeStatus struct {
Name string `json:"name,omitempty"`
Handle string `json:"handle,omitempty"`
State VolumeState `json:"state,omitempty"`
Size int64 `json:"size,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.