csi

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Version           = "1.1"
	Provisioner       = "csi.trident.netapp.io"
	LegacyProvisioner = "netapp.io/trident"

	// CSI supported features
	CSIBlockVolumes  helpers.Feature = "CSI_BLOCK_VOLUMES"
	ExpandCSIVolumes helpers.Feature = "EXPAND_CSI_VOLUMES"
)
View Source
const (
	CSIController = "controller"
	CSINode       = "node"
	CSIAllInOne   = "allInOne"
)
View Source
const (
	AttachISCSIVolumeTimeoutShort = 20 * time.Second
)

Variables

This section is empty.

Functions

func ParseEndpoint

func ParseEndpoint(ep string) (string, string, error)

func ReadAESKey

func ReadAESKey(ctx context.Context, aesKeyFile string) ([]byte, error)

Types

type NonBlockingGRPCServer

type NonBlockingGRPCServer interface {
	// Start services at the endpoint
	Start(endpoint string, ids csi.IdentityServer, cs csi.ControllerServer, ns csi.NodeServer)
	// GracefulStop Stops the service gracefully
	GracefulStop()
	// Stops the service forcefully
	Stop()
}

NonBlockingGRPCServer Defines Non blocking GRPC server interfaces

func NewNonBlockingGRPCServer

func NewNonBlockingGRPCServer() NonBlockingGRPCServer

type Plugin

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

func NewAllInOnePlugin

func NewAllInOnePlugin(
	nodeName, endpoint, caCert, clientCert, clientKey, aesKeyFile string, orchestrator core.Orchestrator,
	helper *helpers.HybridPlugin, unsafeDetach bool,
) (*Plugin, error)

The NewAllInOnePlugin is required to support the CSI Sanity test suite. CSI Sanity expects a single process to respond to controller, node, and identity interfaces.

func NewControllerPlugin

func NewControllerPlugin(
	nodeName, endpoint, aesKeyFile string, orchestrator core.Orchestrator, helper *helpers.HybridPlugin,
) (*Plugin, error)

func NewNodePlugin

func NewNodePlugin(
	nodeName, endpoint, caCert, clientCert, clientKey, aesKeyFile string, orchestrator core.Orchestrator,
	unsafeDetach, enableForceDetach bool,
) (*Plugin, error)

func (*Plugin) Activate

func (p *Plugin) Activate() error

func (*Plugin) ControllerExpandVolume

func (p *Plugin) ControllerExpandVolume(
	ctx context.Context, req *csi.ControllerExpandVolumeRequest,
) (*csi.ControllerExpandVolumeResponse, error)

func (*Plugin) ControllerGetVolume

func (*Plugin) ControllerPublishVolume

func (*Plugin) CreateSnapshot

func (p *Plugin) CreateSnapshot(
	ctx context.Context, req *csi.CreateSnapshotRequest,
) (*csi.CreateSnapshotResponse, error)

func (*Plugin) CreateVolume

func (p *Plugin) CreateVolume(
	ctx context.Context, req *csi.CreateVolumeRequest,
) (*csi.CreateVolumeResponse, error)

func (*Plugin) Deactivate

func (p *Plugin) Deactivate() error

func (*Plugin) DeleteSnapshot

func (p *Plugin) DeleteSnapshot(
	ctx context.Context, req *csi.DeleteSnapshotRequest,
) (*csi.DeleteSnapshotResponse, error)

func (*Plugin) DeleteVolume

func (p *Plugin) DeleteVolume(
	ctx context.Context, req *csi.DeleteVolumeRequest,
) (*csi.DeleteVolumeResponse, error)

func (*Plugin) GetCapacity

func (*Plugin) GetName

func (p *Plugin) GetName() string

func (*Plugin) GetPluginCapabilities

func (p *Plugin) GetPluginCapabilities(
	ctx context.Context, req *csi.GetPluginCapabilitiesRequest,
) (*csi.GetPluginCapabilitiesResponse, error)

func (*Plugin) GetPluginInfo

func (p *Plugin) GetPluginInfo(
	ctx context.Context, req *csi.GetPluginInfoRequest,
) (*csi.GetPluginInfoResponse, error)

func (*Plugin) IsReady

func (p *Plugin) IsReady() bool

func (*Plugin) ListSnapshots

func (p *Plugin) ListSnapshots(
	ctx context.Context, req *csi.ListSnapshotsRequest,
) (*csi.ListSnapshotsResponse, error)

func (*Plugin) ListVolumes

func (p *Plugin) ListVolumes(
	ctx context.Context, req *csi.ListVolumesRequest,
) (*csi.ListVolumesResponse, error)

func (*Plugin) NodeExpandVolume

func (p *Plugin) NodeExpandVolume(
	ctx context.Context, req *csi.NodeExpandVolumeRequest,
) (*csi.NodeExpandVolumeResponse, error)

NodeExpandVolume handles volume expansion for Block (i.e. iSCSI) volumes. The CO only calls NodeExpandVolume for the Block protocol as the filesystem has to be mounted to perform the resize. This is enforced in our ControllerExpandVolume method where we return true for nodeExpansionRequired when the protocol is Block and return false when the protocol is file.

func (*Plugin) NodeGetCapabilities

func (*Plugin) NodeGetInfo

func (p *Plugin) NodeGetInfo(
	ctx context.Context, _ *csi.NodeGetInfoRequest,
) (*csi.NodeGetInfoResponse, error)

func (*Plugin) NodeGetVolumeStats

func (p *Plugin) NodeGetVolumeStats(
	ctx context.Context, req *csi.NodeGetVolumeStatsRequest,
) (*csi.NodeGetVolumeStatsResponse, error)

func (*Plugin) NodePublishVolume

func (p *Plugin) NodePublishVolume(
	ctx context.Context, req *csi.NodePublishVolumeRequest,
) (*csi.NodePublishVolumeResponse, error)

func (*Plugin) NodeStageVolume

func (p *Plugin) NodeStageVolume(
	ctx context.Context, req *csi.NodeStageVolumeRequest,
) (*csi.NodeStageVolumeResponse, error)

func (*Plugin) NodeUnpublishVolume

func (p *Plugin) NodeUnpublishVolume(
	ctx context.Context, req *csi.NodeUnpublishVolumeRequest,
) (*csi.NodeUnpublishVolumeResponse, error)

func (*Plugin) NodeUnstageVolume

func (p *Plugin) NodeUnstageVolume(
	ctx context.Context, req *csi.NodeUnstageVolumeRequest,
) (*csi.NodeUnstageVolumeResponse, error)

func (*Plugin) Probe

func (p *Plugin) Probe(
	ctx context.Context, req *csi.ProbeRequest,
) (*csi.ProbeResponse, error)

func (*Plugin) Version

func (p *Plugin) Version() string

type RequestHandler

type RequestHandler interface {
	GetVolumeId() string
	GetStagingTargetPath() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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