consistencygroup

package
v0.0.0-...-7f39cef Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoCsiVolume            = errors.New("no CSI volume")
	ErrInvalidCsiVolumeHandle = errors.New("invalid CSI volume handle format")
)

Functions

func GetConsistencyGroupFileset

func GetConsistencyGroupFileset(pvs *corev1.CSIPersistentVolumeSource) (string, error)

GetConsistencyGroupFileset reads the consistency group fileset name from a CSI PV source.

func GetConsistencyGroupFilesetLinkPath

func GetConsistencyGroupFilesetLinkPath(pvs *corev1.CSIPersistentVolumeSource) (string, error)

GetConsistencyGroupFilesetLinkPath returns the link path of the consistency group fileset.

func GetFilesystem

func GetFilesystem(pvs *corev1.CSIPersistentVolumeSource) (string, error)

GetFilesystem reads the filesystem name from a CSI PV source.

Types

type StorageClassType

type StorageClassType int
const (
	ClassicStorageClass          StorageClassType = 0 // aka version 1 storage class
	ConsistencyGroupStorageClass StorageClassType = 1 // aka version 2 storage class
)

type VolumeHandle

type VolumeHandle struct {
	StorageClassType StorageClassType
	VolumeType       VolumeType
	ClusterID        string // ID of owning cluster where fileset resides
	FilesystemUID    string
	ConsistencyGroup string // Matches to the name of the independent fileset name. Format: <OCP cluster ID>-<namespace>
	FilesetName      string // Name of dependent fileset that represents the PV
	FilesetLinkPath  string
}

VolumeHandle represents the VolumeHandle parameter that exists in the CSI PV spec.

func GetVolumeHandle

func GetVolumeHandle(pvs *corev1.CSIPersistentVolumeSource) (VolumeHandle, error)

GetVolumeHandle get's the CSI volume handle from a CSI PV source. VolumeHandle format: <storageclass_type>;<volume_type>;<cluster_id>;<filesystem_uuid>;<consistency_group>;<fileset_name>;<path>

func (VolumeHandle) String

func (vh VolumeHandle) String() string

VolumeHandle implements fmt.Stringer interface to return the volume handle in string format

type VolumeType

type VolumeType int
const (
	LightweightVolume             VolumeType = 0
	DependentFilesetBasedVolume   VolumeType = 1
	IndependentFilesetBasedVolume VolumeType = 2
)

Jump to

Keyboard shortcuts

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