migration

package
v2.4.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2021 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CRDName represent the name of cnsvspherevolumemigrations CRD.
	CRDName = "cnsvspherevolumemigrations.cns.vmware.com"
	// CRDGroupName represent the group of cnsvspherevolumemigrations CRD.
	CRDGroupName = "cns.vmware.com"
	// CRDSingular represent the singular name of cnsvspherevolumemigrations CRD.
	CRDSingular = "cnsvspherevolumemigration"
	// CRDPlural represent the plural name of cnsvspherevolumemigrations CRD.
	CRDPlural = "cnsvspherevolumemigrations"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type VolumeMigrationService

type VolumeMigrationService interface {
	// GetVolumeID returns VolumeID for a given VolumeSpec.
	// Returns an error if not able to retrieve VolumeID.
	GetVolumeID(ctx context.Context, volumeSpec *VolumeSpec) (string, error)

	// GetVolumePath returns VolumePath for a given VolumeID.
	// Returns an error if not able to retrieve VolumePath.
	GetVolumePath(ctx context.Context, volumeID string) (string, error)

	// DeleteVolumeInfo helps delete mapping of volumePath to VolumeID for
	// specified volumeID.
	DeleteVolumeInfo(ctx context.Context, volumeID string) error
}

VolumeMigrationService exposes interfaces to support VCP to CSI migration. It will maintain internal state to map volume path to volume ID and reverse mapping.

func GetVolumeMigrationService

func GetVolumeMigrationService(ctx context.Context, volumeManager *cnsvolume.Manager,
	cnsConfig *cnsconfig.Config, runCleanupRoutine bool) (VolumeMigrationService, error)

GetVolumeMigrationService returns the singleton VolumeMigrationService. Starts a cleanup routine to delete stale CRD instances if needed.

type VolumeSpec

type VolumeSpec struct {
	VolumePath        string
	StoragePolicyName string
}

VolumeSpec contains VolumePath and StoragePolicyID, using which Volume can be looked up via VolumeMigrationService.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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