resolver

package
v0.0.0-...-a9bcb3d Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CsiImportPlugin

type CsiImportPlugin interface {
	Resolve(backing *DiskBacking) (map[string]string, error)
}

CsiImportPlugin is implemented by each storage vendor sub-package. Mirrors xcopy's StorageApi/VVolCapable/RDMCapable interface pattern: the interface lives in the shared package, vendor sub-packages implement it, and the switch that instantiates concrete types lives in the caller (csi_import.go).

type DiskBacking

type DiskBacking struct {
	// VVolID is non-empty when the disk is VVol-backed (govmomi BackingObjectId).
	VVolID string
	// IsRDM is true when the disk is a Raw Device Mapping.
	IsRDM bool
	// DeviceName is the underlying device path or VMDK file name.
	DeviceName string
	// LunUuid is the unique LUN identifier (SCSI 83h / NAA). Used for storage resolution; required for RDM.
	LunUuid string
}

DiskBacking contains disk backing information as returned by govmomi.

func DiskBackingFromDevices

func DiskBackingFromDevices(devices []types.BaseVirtualDevice, diskFile string) (*DiskBacking, error)

DiskBackingFromDevices finds the disk matching diskFile in a VM's device list and returns its backing info (VVol / RDM / VMDK).

type DiskType

type DiskType string

DiskType classifies the vSphere backing type for a VM disk.

const (
	DiskTypeVVol DiskType = "vvol"
	DiskTypeRDM  DiskType = "rdm"
	DiskTypeVMDK DiskType = "vmdk"
)

func DetectDiskType

func DetectDiskType(b *DiskBacking) DiskType

DetectDiskType returns the DiskType for this backing.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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