block

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: 16 Imported by: 0

Documentation

Index

Constants

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

CSI volume attribute keywords

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

Opensds replication metadata keywords

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

Opensds Attachment metadata keywords

View Source
const (
	// parameters
	CSIVolumeMode = "CSIVolumeMode"

	// CSIVolumeMode = Filesystem
	CSIFilesystem = "Filesystem"

	// CSIVolumeMode = Block
	CSIBlock = "Block"
)

Csi configuration parameters and values

View Source
const (
	PluginName = "csi-opensdsplugin-block"
)

PluginName setting

View Source
const SecondaryPrefix = "secondary-"

volume prefix

Variables

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

Functions

func CreateSymlink(device, mountpoint string) error

CreateSymlink Symlink implementation

func ExtractFCInitiatorFromNodeInfo

func ExtractFCInitiatorFromNodeInfo(nodeInfo string) ([]string, error)

ExtractFCInitiatorFromNodeInfo implementation

func ExtractISCSIInitiatorFromNodeInfo

func ExtractISCSIInitiatorFromNodeInfo(nodeInfo string) (string, error)

ExtractISCSIInitiatorFromNodeInfo implementation

func ExtractNvmeofInitiatorFromNodeInfo

func ExtractNvmeofInitiatorFromNodeInfo(nodeInfo string) (string, error)

ExtractNvmeofInitiatorFromNodeInfo implementation

func NewServer

func NewServer(client *client.Client) (common.Service, error)

NewServer Initialises and return plugin server

Types

type Plugin

type Plugin struct {
	VolumeClient *Volume
}

Plugin define

func (*Plugin) ControllerGetCapabilities

ControllerGetCapabilities implementation

func (*Plugin) ControllerPublishVolume

ControllerPublishVolume implementation

func (*Plugin) ControllerUnpublishVolume

ControllerUnpublishVolume implementation

func (*Plugin) CreateSnapshot

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

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) 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

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

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

NodeGetInfo gets information on a node

func (*Plugin) NodeGetVolumeStats

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) ValidateVolumeCapabilities

ValidateVolumeCapabilities implementation

type Volume

type Volume struct {
	Client *client.Client
}

func NewVolume

func NewVolume(c *client.Client) *Volume

func (*Volume) ControllerPublishVolume

ControllerPublishVolume implementation

func (*Volume) ControllerUnpublishVolume

ControllerUnpublishVolume implementation

func (*Volume) CreateVolume

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

CreateVolume implementation

func (*Volume) DeleteVolume

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

DeleteVolume implementation

func (*Volume) FindVolume

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

FindVolume implementation

func (*Volume) ListVolumes

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

ListVolumes implementation

func (*Volume) NodePublishVolume

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

NodePublishVolume implementation

func (*Volume) NodeStageVolume

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

NodeStageVolume implementation

func (*Volume) NodeUnpublishVolume

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

NodeUnpublishVolume implementation

func (*Volume) NodeUnstageVolume

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

NodeUnstageVolume implementation

Jump to

Keyboard shortcuts

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