common

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2020 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ParamProfile           = "profile"
	ParamEnableReplication = "enableReplication"
	ParamSecondaryAZ       = "secondaryAvailabilityZone"
)

K8s storage class parameter keywords

View Source
const (
	PublishHostIp            = "hostIp"
	PublishHostId            = "hostId"
	PublishAttachId          = "attachmentId"
	PublishSecondaryAttachId = "secondaryAttachmentId"
	PublishAttachStatus      = "attachmentStatus"
	PublishAttachMode        = "attachMode"
)

CSI publish attribute keywords

View Source
const (
	DefaultAvailabilityZone = "default"
	AccessMode              = "agentless"
)
View Source
const (
	FakeIQN = "fakeIqn"
)

PluginName setting

Variables

This section is empty.

Functions

func ControllerGetCapabilities

ControllerGetCapabilities implementation

func CreateSnapshot

func CreateSnapshot(
	Client *client.Client,
	ctx context.Context,
	req *csi.CreateSnapshotRequest) (
	*csi.CreateSnapshotResponse, error)

CreateSnapshot implementation

func DeleteSnapshot

func DeleteSnapshot(
	Client *client.Client,
	ctx context.Context,
	req *csi.DeleteSnapshotRequest) (
	*csi.DeleteSnapshotResponse, error)

DeleteSnapshot implementation

func GetCapacity

func GetCapacity(
	Client *client.Client,
	ctx context.Context,
	req *csi.GetCapacityRequest) (
	*csi.GetCapacityResponse, error)

GetCapacity implementation

func GetPluginCapabilities

GetPluginCapabilities implementation

func GetPluginInfo

func GetPluginInfo(
	ctx context.Context,
	req *csi.GetPluginInfoRequest,
	pluginName string) (
	*csi.GetPluginInfoResponse, error)

GetPluginInfo implementation

func GetSize

func GetSize(capacityRange *csi.CapacityRange) int64

GetSize gets volume/fileshare sieze from capacity range

func GetZone

func GetZone(requirement *csi.TopologyRequirement, topologyZoneKey string) string

GetZone gets availability zone

func InitPlugin

func InitPlugin() (*client.Client, net.Listener, error)

InitPlugin Initialise plugin configurations

func ListSnapshots

func ListSnapshots(
	Client *client.Client,
	ctx context.Context,
	req *csi.ListSnapshotsRequest) (
	*csi.ListSnapshotsResponse, error)

ListSnapshots implementation

func NewGrpcServer

func NewGrpcServer(lis net.Listener, pluginServer Service)

NewGrpcServer Sets up grpc server for CSI Interface handling

func NodeGetCapabilities

NodeGetCapabilities implementation

func NodeGetInfo

func NodeGetInfo(
	ctx context.Context,
	req *csi.NodeGetInfoRequest,
	topologyZoneKey string,
	Client *client.Client) (
	*csi.NodeGetInfoResponse, error)

NodeGetInfo gets information on a node

func NodeGetVolumeStats

NodeGetVolumeStats implementation

func Probe

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

Probe implementation

func UnpublishRoutine

func UnpublishRoutine(Client *client.Client)

UnpublishRoutine implementation

func ValidateCreateVolReq

func ValidateCreateVolReq(req *csi.CreateVolumeRequest) error

ValidateCreateVolReq - validates input paras of CreateVolume request

func ValidateCtrlPubVolReq

func ValidateCtrlPubVolReq(req *csi.ControllerPublishVolumeRequest) error

ValidateCtrlPubVolReq - validates input paras of ControllerPublishVolume request

func ValidateCtrlUnPubVolReq

func ValidateCtrlUnPubVolReq(req *csi.ControllerUnpublishVolumeRequest) error

ValidateCtrlUnPubVolReq - validates input paras of ControllerUnpublishVolume request

func ValidateDelVolReq

func ValidateDelVolReq(req *csi.DeleteVolumeRequest) error

ValidateDelVolReq - validates input paras of DeleteVolume request

func ValidateNodePublishVolume

func ValidateNodePublishVolume(req *csi.NodePublishVolumeRequest) error

ValidateNodePublishVolume - validates input paras of NodePublishVolume request

func ValidateNodeStageVolume

func ValidateNodeStageVolume(req *csi.NodeStageVolumeRequest) error

ValidateNodeStageVolume - validates input paras of NodeStageVolume request

func ValidateNodeUnpublishVolume

func ValidateNodeUnpublishVolume(req *csi.NodeUnpublishVolumeRequest) error

ValidateNodeUnpublishVolume - validates input paras of NodeUnpublishVolume request

func ValidateNodeUnstageVolume

func ValidateNodeUnstageVolume(req *csi.NodeUnstageVolumeRequest) error

ValidateNodeUnstageVolume - validates input paras of NodeUnstageVolume request

func ValidateVolumeCapabilities

ValidateVolumeCapabilities implementation

func WaitForStatusStable

func WaitForStatusStable(id string, f func(string) (interface{}, error)) (interface{}, error)

WaitForStatusStable waits for volume/fileshare to be created

Types

type AttachmentObj

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

AttachmentObj implementation

var UnpublishAttachmentList *AttachmentObj

UnpublishAttachmentList implementation

func NewList

func NewList() *AttachmentObj

NewList implementation

func (*AttachmentObj) Add

func (q *AttachmentObj) Add(v interface{})

Add implementation

func (*AttachmentObj) Delete

func (q *AttachmentObj) Delete(e *list.Element)

Delete implementation

func (*AttachmentObj) GetHead

func (q *AttachmentObj) GetHead() *list.Element

GetHead implementation

func (*AttachmentObj) GetLen

func (q *AttachmentObj) GetLen() int

GetLen implementation

func (*AttachmentObj) IsExist

func (q *AttachmentObj) IsExist(v interface{}) bool

isExist implementation

func (*AttachmentObj) PrintFileShareList

func (q *AttachmentObj) PrintFileShareList()

PrintFileShareList implementation

func (*AttachmentObj) PrintVolAttachList

func (q *AttachmentObj) PrintVolAttachList()

PrintVolAttachList implementation

type Service

type Service interface {
	csi.IdentityServer
	csi.ControllerServer
	csi.NodeServer
}

Service Define CSI Interface

Jump to

Keyboard shortcuts

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