vcdcsiclient

package
v0.0.0-...-22414a3 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VCDBusTypeSCSI           = "6"
	VCDBusSubTypeVirtualSCSI = "VirtualSCSI"
	NoRdePrefix              = `NO_RDE_`
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DiskManager

type DiskManager struct {
	VCDClient            *vcdsdk.Client
	ClusterID            string
	Org                  *govcd.Org
	IsZoneEnabledCluster bool
	ZoneMap              *vcdsdk.ZoneMap
}

func (*DiskManager) AddToErrorSet

func (diskManager *DiskManager) AddToErrorSet(errorType string, vcdResourceId string, vcdResourceName string, detailMap map[string]interface{}) error

func (*DiskManager) AddToEventSet

func (diskManager *DiskManager) AddToEventSet(eventType string, vcdResourceId string, vcdResourceName string, detailMap map[string]interface{}) error

func (*DiskManager) AttachVolume

func (diskManager *DiskManager) AttachVolume(vm *govcd.VM, disk *vcdtypes.Disk) error

AttachVolume will attach diskName to vm

func (*DiskManager) ConvertToLatestCSIVersionFormat

func (diskManager *DiskManager) ConvertToLatestCSIVersionFormat(dstVersion string) (*swaggerClient.DefinedEntity, error)

ConvertToLatestCSIVersionFormat provides an automatic conversion from current CSI status to the latest CSI version in use Call an API call (GET) to get the CAPVCD entity. Provide an automatic conversion of the content in srcCapvcdEntity.entity.status.csi content to the latest CSI version format (vcdtypes.CSIStatus) Add the placeholder for any special conversion logic inside vcdtypes.CSIStatus (for developers) Call an API call (PUT) to update CAPVCD entity and persist data into VCD Return dstCapvcdEntity as output.

func (*DiskManager) CreateDisk

func (diskManager *DiskManager) CreateDisk(diskName string, vdc *govcd.Vdc, sizeMB int64,
	busType string, busSubType string, description string, storageProfile string, shareable bool,
	zm *vcdsdk.ZoneMap) (*vcdtypes.Disk, error)

CreateDisk will create a new independent disk with params specified

func (*DiskManager) DeleteDisk

func (diskManager *DiskManager) DeleteDisk(name string, zm *vcdsdk.ZoneMap) error

DeleteDisk will delete independent disk by its name

func (*DiskManager) DetachVolume

func (diskManager *DiskManager) DetachVolume(vm *govcd.VM, diskName string, zm *vcdsdk.ZoneMap) error

DetachVolume will detach diskName from vm

func (*DiskManager) GetDiskByNameOrId

func (diskManager *DiskManager) GetDiskByNameOrId(name string, zm *vcdsdk.ZoneMap,
	vdcIdentifier string) (*vcdtypes.Disk, error)

GetDiskByNameOrId will get disk by name

func (*DiskManager) GetRDEPersistentVolumes

func (diskManager *DiskManager) GetRDEPersistentVolumes(rde *swaggerClient.DefinedEntity) ([]string, error)

func (*DiskManager) GovcdAttachedVM

func (diskManager *DiskManager) GovcdAttachedVM(disk *vcdtypes.Disk) ([]*types.Reference, error)

func (*DiskManager) RemoveFromErrorSet

func (diskManager *DiskManager) RemoveFromErrorSet(errorType string, vcdResourceId string, vcdResourceName string) error

func (*DiskManager) UpdateDisk

func (diskManager *DiskManager) UpdateDisk(disk *vcdtypes.Disk, newDiskInfo *types.Disk) (govcd.Task, error)

UpdateDisk updates an independent disk 1 Verify the independent disk is not connected to any VM 2 Use newDiskInfo to change update the independent disk 3 Return task of independent disk update If the independent disk is connected to a VM, the task will be failed. Reference: vCloud API Programming Guide for Service Providers vCloud API 30.0 PDF Page 104 - 106, https://vdc-download.vmware.com/vmwb-repository/dcr-public/1b6cf07d-adb3-4dba-8c47-9c1c92b04857/ 241956dd-e128-4fcc-8131-bf66e1edd895/vcloud_sp_api_guide_30_0.pdf copied from govcd and modified for independent disks

func (*DiskManager) UpgradeRDEPersistentVolumes

func (diskManager *DiskManager) UpgradeRDEPersistentVolumes() error

UpgradeRDEPersistentVolumes This function will only upgrade RDE CSI section for CAPVCD cluster

Jump to

Keyboard shortcuts

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