opensds

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2019 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

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

K8s storage class parameter keywords

View Source
const (
	VolumeName          = "name"
	VolumeStatus        = "status"
	VolumeAZ            = "availabilityZone"
	VolumePoolId        = "poolId"
	VolumeProfileId     = "profileId"
	VolumeLvPath        = "lvPath"
	VolumeReplicationId = "replicationId"
	StorageType         = "storageType"
)

CSI volume attribute keywords

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

CSI publish attribute keywords

View Source
const (
	TargetPath        = "targetPath"
	StagingTargetPath = "stagingTargetPath"
)

Opensds Attachment metadata keywords

View Source
const (
	AttachedVolumeId = "attachedVolumeId"
	AttachedId       = "attachedId"
)

Opensds replication metadata keywords

View Source
const (
	// default filesystem type
	DefFSType               = "ext4"
	DefaultAvailabilityZone = "default"
)
View Source
const (
	// parameters
	CSIVolumeMode = "CSIVolumeMode"

	// CSIVolumeMode = Filesystem
	CSIFilesystem = "Filesystem"

	// CSIVolumeMode = Block
	CSIBlock = "Block"
)

Csi configuration parameters and values

View Source
const (
	ShareName       = "shareName"
	ShareAZ         = "shareAZ"
	ShareStatus     = "shareStatus"
	SharePoolId     = "sharePoolId"
	ShareProfileId  = "shareProfileId"
	ShareProtocol   = "shareProtocol"
	NFS             = "nfs"
	IpIdx           = 2
	ExportLocations = "exportLocations"
	FileShareName   = "fileShareName"
)

fileshare constant parameters

View Source
const (
	FakeIQN    = "fakeIqn"
	PluginName = "csi-opensdsplugin"
)

PluginName setting

View Source
const (
	FileshareStorageType = "file"
)
View Source
const SecondaryPrefix = "secondary-"

volume prefix

View Source
const (
	VolumeStorageType = "block"
)

Variables

View Source
var TopologyZoneKey = "topology." + PluginName + "/zone"

Functions

func NewServer added in v0.5.3

func NewServer(endpoint, authStrategy, storageType string) (plugin.Service, error)

Types

type AttachmentObj added in v0.5.1

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

AttachmentObj implementation

var UnpublishAttachmentList *AttachmentObj

UnpublishAttachmentList implementation

func NewList added in v0.5.1

func NewList() *AttachmentObj

NewList implementation

func (*AttachmentObj) Add added in v0.5.1

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

Add implementation

func (*AttachmentObj) Delete added in v0.5.1

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

Delete implementation

func (*AttachmentObj) GetHead added in v0.5.1

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

GetHead implementation

func (*AttachmentObj) GetLen added in v0.5.1

func (q *AttachmentObj) GetLen() int

GetLen implementation

func (*AttachmentObj) PrintList added in v0.5.1

func (q *AttachmentObj) PrintList(storageType string)

PrintList implementation

type FileShare added in v0.5.5

type FileShare struct {
	Client *client.Client
}

func NewFileshare added in v0.5.5

func NewFileshare(c *client.Client) *FileShare

func (*FileShare) ControllerPublishFileShare added in v0.5.5

func (f *FileShare) ControllerPublishFileShare(req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)

func (*FileShare) ControllerUnpublishFileShare added in v0.5.5

func (*FileShare) CreateFileShare added in v0.5.5

func (f *FileShare) CreateFileShare(req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)

func (*FileShare) DeleteFileShare added in v0.5.5

func (f *FileShare) DeleteFileShare(shareID string) (*csi.DeleteVolumeResponse, error)

func (*FileShare) FindFileshare added in v0.5.5

func (f *FileShare) FindFileshare(fileshareName string) (*model.FileShareSpec, error)

func (*FileShare) ListFileShares added in v0.5.5

func (f *FileShare) ListFileShares(req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)

func (*FileShare) NodePublishFileShare added in v0.5.5

func (f *FileShare) NodePublishFileShare(req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)

func (*FileShare) NodeStageFileShare added in v0.5.5

func (f *FileShare) NodeStageFileShare(req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)

func (*FileShare) NodeUnpublishFileShare added in v0.5.5

func (f *FileShare) NodeUnpublishFileShare(req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)

func (*FileShare) NodeUnstageFileShare added in v0.5.5

func (f *FileShare) NodeUnstageFileShare(req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)

type Plugin

type Plugin struct {
	PluginStorageType string
	Client            *client.Client
	VolumeClient      *Volume
	FileShareClient   *FileShare
}

Plugin define

func (*Plugin) ControllerGetCapabilities

ControllerGetCapabilities implementation

func (*Plugin) ControllerPublishVolume

ControllerPublishVolume implementation

func (*Plugin) ControllerUnpublishVolume

ControllerUnpublishVolume implementation

func (*Plugin) CreateSnapshot added in v0.3.3

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

CreateSnapshot implementation

func (*Plugin) CreateVolume

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

CreateVolume implementation

func (*Plugin) DeleteSnapshot added in v0.3.3

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

DeleteSnapshot implementation

func (*Plugin) DeleteVolume

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

DeleteVolume implementation

func (*Plugin) FindSnapshot added in v0.5.3

func (p *Plugin) FindSnapshot(req *model.VolumeSnapshotSpec) (bool, bool, *model.VolumeSnapshotSpec, error)

FindSnapshot implementation

func (*Plugin) GetCapacity

func (p *Plugin) GetCapacity(
	ctx context.Context,
	req *csi.GetCapacityRequest) (
	*csi.GetCapacityResponse, error)

GetCapacity implementation

func (*Plugin) GetPluginCapabilities

GetPluginCapabilities implementation

func (*Plugin) GetPluginInfo

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

GetPluginInfo implementation

func (*Plugin) ListSnapshots added in v0.3.3

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

ListSnapshots implementation

func (*Plugin) ListVolumes

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

ListVolumes implementation

func (*Plugin) NodeGetCapabilities

func (p *Plugin) NodeGetCapabilities(
	ctx context.Context,
	req *csi.NodeGetCapabilitiesRequest) (
	*csi.NodeGetCapabilitiesResponse, error)

NodeGetCapabilities implementation

func (*Plugin) NodeGetInfo added in v0.3.3

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

NodeGetInfo gets information on a node

func (*Plugin) NodeGetVolumeStats added in v0.3.3

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

NodeGetVolumeStats implementation

func (*Plugin) NodePublishVolume

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

NodePublishVolume implementation

func (*Plugin) NodeStageVolume

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

NodeStageVolume implementation

func (*Plugin) NodeUnpublishVolume

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

NodeUnpublishVolume implementation

func (*Plugin) NodeUnstageVolume

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

NodeUnstageVolume implementation

func (*Plugin) Probe

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

Probe implementation

func (*Plugin) UnpublishRoutine added in v0.5.3

func (p *Plugin) UnpublishRoutine()

UnpublishRoutine implementation

func (*Plugin) ValidateVolumeCapabilities

ValidateVolumeCapabilities implementation

type Volume added in v0.5.5

type Volume struct {
	Client *client.Client
}

func NewVolume added in v0.5.5

func NewVolume(c *client.Client) *Volume

func (*Volume) ControllerPublishVolume added in v0.5.5

func (*Volume) ControllerUnpublishVolume added in v0.5.5

func (*Volume) CreateVolume added in v0.5.5

func (v *Volume) CreateVolume(req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)

func (*Volume) DeleteVolume added in v0.5.5

func (v *Volume) DeleteVolume(volId string) (*csi.DeleteVolumeResponse, error)

func (*Volume) FindVolume added in v0.5.5

func (v *Volume) FindVolume(volName string) (*model.VolumeSpec, error)

FindVolume implementation

func (*Volume) ListVolumes added in v0.5.5

func (v *Volume) ListVolumes(req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)

func (*Volume) NodePublishVolume added in v0.5.5

func (v *Volume) NodePublishVolume(req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)

func (*Volume) NodeStageVolume added in v0.5.5

func (v *Volume) NodeStageVolume(req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)

func (*Volume) NodeUnpublishVolume added in v0.5.5

func (v *Volume) NodeUnpublishVolume(req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)

func (*Volume) NodeUnstageVolume added in v0.5.5

func (v *Volume) NodeUnstageVolume(req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)

Jump to

Keyboard shortcuts

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