Documentation ¶
Index ¶
- Constants
- type ControllerServer
- func (cs *ControllerServer) ControllerExpandVolume(_ context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
- func (cs *ControllerServer) ControllerGetCapabilities(_ context.Context, _ *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
- func (cs *ControllerServer) ControllerGetVolume(_ context.Context, req *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error)
- func (cs *ControllerServer) ControllerPublishVolume(_ context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
- func (cs *ControllerServer) ControllerUnpublishVolume(_ context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
- func (cs *ControllerServer) CreateSnapshot(_ context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
- func (cs *ControllerServer) CreateVolume(_ context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
- func (cs *ControllerServer) DeleteSnapshot(_ context.Context, req *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
- func (cs *ControllerServer) DeleteVolume(_ context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
- func (cs *ControllerServer) GetCapacity(_ context.Context, _ *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
- func (cs *ControllerServer) ListSnapshots(_ context.Context, req *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
- func (cs *ControllerServer) ListVolumes(_ context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
- func (cs *ControllerServer) ValidateVolumeCapabilities(_ context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
- type EvsDriver
- func (d *EvsDriver) AddControllerServiceCapabilities(cl []csi.ControllerServiceCapability_RPC_Type)
- func (d *EvsDriver) AddNodeServiceCapabilities(nl []csi.NodeServiceCapability_RPC_Type)
- func (d *EvsDriver) AddVolumeCapabilityAccessModes(vc []csi.VolumeCapability_AccessMode_Mode) []*csi.VolumeCapability_AccessMode
- func (d *EvsDriver) GetControllerServer() *ControllerServer
- func (d *EvsDriver) GetVolumeCapabilityAccessModes() []*csi.VolumeCapability_AccessMode
- func (d *EvsDriver) Run()
- func (d *EvsDriver) SetupDriver(mount mounts.IMount, metadata metadatas.IMetadata)
- func (d *EvsDriver) ValidateControllerServiceRequest(capType csi.ControllerServiceCapability_RPC_Type) error
- type NonBlockingGRPCServer
- type VolumeAttachmentStatus
Constants ¶
View Source
const ( // PvcNameTag in annotations PvcNameTag = "csi.storage.k8s.io/pvc/name" // PvcNsTag in annotations PvcNsTag = "csi.storage.k8s.io/pvc/namespace" // PvNameKey key PvNameKey = "csi.storage.k8s.io/pv/name" // CsiClusterNodeIDKey in volume metadata CsiClusterNodeIDKey = "evs.csi.huaweicloud.com/nodeId" // CsiClusterNodeIDKey in volume metadata DssIDKey = "dedicated_storage_id" // CreateForVolumeIDKey in volume metadata CreateForVolumeIDKey = "create_for_volume_id" // HwPassthroughKey in volume metadata HwPassthroughKey = "hw:passthrough" CmkIDKey = "__system__cmkid" EncryptedKey = "__system__encrypted" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ControllerServer ¶
type ControllerServer struct {
Driver *EvsDriver
}
func (*ControllerServer) ControllerExpandVolume ¶
func (cs *ControllerServer) ControllerExpandVolume(_ context.Context, req *csi.ControllerExpandVolumeRequest) ( *csi.ControllerExpandVolumeResponse, error)
func (*ControllerServer) ControllerGetCapabilities ¶
func (cs *ControllerServer) ControllerGetCapabilities(_ context.Context, _ *csi.ControllerGetCapabilitiesRequest) ( *csi.ControllerGetCapabilitiesResponse, error)
ControllerGetCapabilities implements the default GRPC callout. Default supports all capabilities
func (*ControllerServer) ControllerGetVolume ¶
func (cs *ControllerServer) ControllerGetVolume(_ context.Context, req *csi.ControllerGetVolumeRequest) ( *csi.ControllerGetVolumeResponse, error)
func (*ControllerServer) ControllerPublishVolume ¶
func (cs *ControllerServer) ControllerPublishVolume(_ context.Context, req *csi.ControllerPublishVolumeRequest) ( *csi.ControllerPublishVolumeResponse, error)
func (*ControllerServer) ControllerUnpublishVolume ¶
func (cs *ControllerServer) ControllerUnpublishVolume(_ context.Context, req *csi.ControllerUnpublishVolumeRequest) ( *csi.ControllerUnpublishVolumeResponse, error)
func (*ControllerServer) CreateSnapshot ¶
func (cs *ControllerServer) CreateSnapshot(_ context.Context, req *csi.CreateSnapshotRequest) ( *csi.CreateSnapshotResponse, error)
func (*ControllerServer) CreateVolume ¶
func (cs *ControllerServer) CreateVolume(_ context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
func (*ControllerServer) DeleteSnapshot ¶
func (cs *ControllerServer) DeleteSnapshot(_ context.Context, req *csi.DeleteSnapshotRequest) ( *csi.DeleteSnapshotResponse, error)
func (*ControllerServer) DeleteVolume ¶
func (cs *ControllerServer) DeleteVolume(_ context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
func (*ControllerServer) GetCapacity ¶
func (cs *ControllerServer) GetCapacity(_ context.Context, _ *csi.GetCapacityRequest) ( *csi.GetCapacityResponse, error)
func (*ControllerServer) ListSnapshots ¶
func (cs *ControllerServer) ListSnapshots(_ context.Context, req *csi.ListSnapshotsRequest) ( *csi.ListSnapshotsResponse, error)
func (*ControllerServer) ListVolumes ¶
func (cs *ControllerServer) ListVolumes(_ context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
func (*ControllerServer) ValidateVolumeCapabilities ¶
func (cs *ControllerServer) ValidateVolumeCapabilities(_ context.Context, req *csi.ValidateVolumeCapabilitiesRequest) ( *csi.ValidateVolumeCapabilitiesResponse, error)
type EvsDriver ¶
type EvsDriver struct {
// contains filtered or unexported fields
}
func NewDriver ¶
func NewDriver(cc *config.CloudCredentials, endpoint, cluster, nodeID string) *EvsDriver
func (*EvsDriver) AddControllerServiceCapabilities ¶
func (d *EvsDriver) AddControllerServiceCapabilities(cl []csi.ControllerServiceCapability_RPC_Type)
func (*EvsDriver) AddNodeServiceCapabilities ¶
func (d *EvsDriver) AddNodeServiceCapabilities(nl []csi.NodeServiceCapability_RPC_Type)
func (*EvsDriver) AddVolumeCapabilityAccessModes ¶
func (d *EvsDriver) AddVolumeCapabilityAccessModes(vc []csi.VolumeCapability_AccessMode_Mode) []*csi.VolumeCapability_AccessMode
func (*EvsDriver) GetControllerServer ¶
func (d *EvsDriver) GetControllerServer() *ControllerServer
func (*EvsDriver) GetVolumeCapabilityAccessModes ¶
func (d *EvsDriver) GetVolumeCapabilityAccessModes() []*csi.VolumeCapability_AccessMode
func (*EvsDriver) SetupDriver ¶
func (*EvsDriver) ValidateControllerServiceRequest ¶
func (d *EvsDriver) ValidateControllerServiceRequest(capType csi.ControllerServiceCapability_RPC_Type) error
type NonBlockingGRPCServer ¶
type NonBlockingGRPCServer interface { // Start services at the endpoint Start(endpoint string, ids csi.IdentityServer, cs csi.ControllerServer, ns csi.NodeServer) // Waits for the service to stop Wait() // Stops the service gracefully Stop() // Stops the service forcefully ForceStop() }
NonBlockingGRPCServer defines Non blocking GRPC server interfaces
func NewNonBlockingGRPCServer ¶
func NewNonBlockingGRPCServer() NonBlockingGRPCServer
type VolumeAttachmentStatus ¶
type VolumeAttachmentStatus int32
const ( VolumeNotAttached VolumeAttachmentStatus = iota + 1 VolumeAttachingCurrentServer VolumeAttachingOtherServer VolumeAttachedCurrentServer VolumeAttachedOtherServer VolumeAttachError )
Source Files ¶
Click to show internal directories.
Click to hide internal directories.