Documentation
¶
Index ¶
- Variables
- func BackendPVCVolumeName(vmName string) string
- func GetSnapshotVirtualMachineVolumes(vm *snapshotv1.VirtualMachine, client kubecli.KubevirtClient, ...) ([]v1.Volume, error)
- func GetVirtualMachineInstanceVolumes(vmi *v1.VirtualMachineInstance, opts ...VolumeOption) ([]v1.Volume, error)
- func GetVirtualMachineVolumes(vm *v1.VirtualMachine, client kubecli.KubevirtClient, opts ...VolumeOption) ([]v1.Volume, error)
- func GetVolumes(obj interface{}, client kubecli.KubevirtClient, opts ...VolumeOption) ([]v1.Volume, error)
- func IsConfigVolume(volume *v1.Volume) bool
- func IsErrNoBackendPVC(err error) bool
- func IsStorageVolume(volume *v1.Volume) bool
- type VolumeOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoBackendPVC = fmt.Errorf("no backend PVC when there should be one")
Functions ¶
func BackendPVCVolumeName ¶
BackendPVCVolumeName return the name of the volume that will be arbitrarily used to represent the backend PVC during volume enumeration.
func GetSnapshotVirtualMachineVolumes ¶
func GetSnapshotVirtualMachineVolumes(vm *snapshotv1.VirtualMachine, client kubecli.KubevirtClient, opts ...VolumeOption) ([]v1.Volume, error)
GetSnapshotVirtualMachineVolumes returns all volumes of a Snapshot VM except the special ones based on volume options
func GetVirtualMachineInstanceVolumes ¶
func GetVirtualMachineInstanceVolumes(vmi *v1.VirtualMachineInstance, opts ...VolumeOption) ([]v1.Volume, error)
GetVirtualMachineInstanceVolumes returns all volumes of a VMI except the special ones based on volume options
func GetVirtualMachineVolumes ¶
func GetVirtualMachineVolumes(vm *v1.VirtualMachine, client kubecli.KubevirtClient, opts ...VolumeOption) ([]v1.Volume, error)
GetVirtualMachineVolumes returns all volumes of a VM except the special ones based on volume options
func GetVolumes ¶
func GetVolumes(obj interface{}, client kubecli.KubevirtClient, opts ...VolumeOption) ([]v1.Volume, error)
GetVolumes returns all volumes of the passed object, empty if it's an unsupported object
func IsConfigVolume ¶
func IsErrNoBackendPVC ¶
func IsStorageVolume ¶
Types ¶
type VolumeOption ¶
type VolumeOption int
const ( // Default option, just includes regular volumes found in the VM/VMI spec WithRegularVolumes VolumeOption = iota // Includes backend storage PVC WithBackendVolume // Includes all volumes WithAllVolumes )
Click to show internal directories.
Click to hide internal directories.