controller

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfing

func GetConfing(path string, cfg *ControllerCfg) error

func GetVolumeCapability

func GetVolumeCapability(vcam []csi.VolumeCapability_AccessMode_Mode) []*csi.VolumeCapability

GetVolumeCapability volume related capabilities

func SetupControllerPlugin

func SetupControllerPlugin(cp *ControllerPlugin, cfg *jcom.JovianDSSCfg) (err error)

SetupControllerPlugin set controller plugin struct with proper values

Types

type ControllerCfg

type ControllerCfg struct {
	RestEndpoint rest.StorageCfg
	Vnamelen     int
	Vpasslen     int
	Iqn          string

	LLevel string `yaml:"llevel"`
	LPath  string `yaml:"lpath"`
}

ControllerCfg stores configaration properties of controller instance

type ControllerPlugin

type ControllerPlugin struct {
	// contains filtered or unexported fields
}

ControllerPlugin provides CSI controller plugin interface

func (*ControllerPlugin) ControllerExpandVolume

ControllerExpandVolume expands capacity of given volume

func (*ControllerPlugin) ControllerGetCapabilities

ControllerGetCapabilities all capabilities that controller supports

func (*ControllerPlugin) ControllerGetVolume

ControllerGetVolume provides current information about the volume

func (*ControllerPlugin) ControllerModifyVolume

ControllerModifyVolume allows to change mutable key attributes of a volume

func (*ControllerPlugin) ControllerPublishVolume

ControllerPublishVolume create iscsi target for the volume

func (*ControllerPlugin) ControllerUnpublishVolume

ControllerUnpublishVolume remove iscsi target for the volume

func (*ControllerPlugin) CreateSnapshot

CreateSnapshot creates snapshot

func (*ControllerPlugin) CreateVolume

CreateVolume create volume with properties

func (*ControllerPlugin) DeleteSnapshot

DeleteSnapshot deletes snapshot

func (*ControllerPlugin) DeleteVolume

DeleteVolume deletes volume or hides it for later deletion

func (*ControllerPlugin) GetCapacity

GetCapacity gets storage capacity

func (*ControllerPlugin) ListSnapshots

func (cp *ControllerPlugin) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsRequest) (rsp *csi.ListSnapshotsResponse, err error)

ListSnapshots return the list of valid snapshots

func (*ControllerPlugin) ListVolumes

ListVolumes return the list of volumes

func (*ControllerPlugin) ValidateVolumeCapabilities

ValidateVolumeCapabilities checks if volume have give capability

func (*ControllerPlugin) VolumeComply

func (cp *ControllerPlugin) VolumeComply(ctx context.Context, vd *jdrvr.VolumeDesc, caprage *csi.CapacityRange, source *csi.VolumeContentSource) (*int64, error)

VolumeComply checks if volume with specified properties exists

if volume with same name exists yet does not fall into requirments it fails with ALLREADY_EXISTS if volume does not exists it fails with NOT_FOUND if volume do exists and fit requirmnets it will return csi volume struct and nil as error

Jump to

Keyboard shortcuts

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