Documentation
¶
Index ¶
- Constants
- func CgSnapshotLock(ctx context.Context, targetPath string, snapExists bool) bool
- func CgSnapshotUnlock(ctx context.Context, targetPath string)
- func ConvertToBytes(inputStr string) (uint64, error)
- func IsValidCompressionAlgorithm(input string) bool
- func NewControllerServiceCapability(cap csi.ControllerServiceCapability_RPC_Type) *csi.ControllerServiceCapability
- func NewNodeServiceCapability(cap csi.NodeServiceCapability_RPC_Type) *csi.NodeServiceCapability
- func NewVolumeCapabilityAccessMode(mode csi.VolumeCapability_AccessMode_Mode) *csi.VolumeCapability_AccessMode
- type ClusterDetails
- type ClusterID
- type ClusterName
- type NonBlockingGRPCServer
- type ScaleControllerServer
- func (cs *ScaleControllerServer) CheckIfNewSnapshotIsRequired(ctx context.Context, conn connectors.SpectrumScaleConnector, ...) (string, bool, error)
- func (cs *ScaleControllerServer) CheckNewSnapRequired(ctx context.Context, conn connectors.SpectrumScaleConnector, ...) (string, error)
- func (cs *ScaleControllerServer) ControllerExpandVolume(ctx context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
- func (cs *ScaleControllerServer) ControllerGetCapabilities(ctx context.Context, req *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
- func (cs *ScaleControllerServer) ControllerGetVolume(ctx context.Context, req *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error)
- func (cs *ScaleControllerServer) ControllerModifyVolume(ctx context.Context, req *csi.ControllerModifyVolumeRequest) (*csi.ControllerModifyVolumeResponse, error)
- func (cs *ScaleControllerServer) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
- func (cs *ScaleControllerServer) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
- func (cs *ScaleControllerServer) CreateNewSnapshot(ctx context.Context, conn connectors.SpectrumScaleConnector, ...) (string, error)
- func (cs *ScaleControllerServer) CreateSnapshot(newctx context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
- func (cs *ScaleControllerServer) CreateVolume(newctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
- func (cs *ScaleControllerServer) DelSnapMetadataDir(ctx context.Context, conn connectors.SpectrumScaleConnector, ...) (bool, error)
- func (cs *ScaleControllerServer) DeleteCGFileset(ctx context.Context, FilesystemName string, volumeIdMembers scaleVolId, ...) error
- func (cs *ScaleControllerServer) DeleteFilesetVol(ctx context.Context, FilesystemName string, FilesetName string, ...) (bool, error)
- func (cs *ScaleControllerServer) DeleteShallowCopyRefPath(ctx context.Context, ...) error
- func (cs *ScaleControllerServer) DeleteSnapshot(newctx context.Context, req *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
- func (cs *ScaleControllerServer) DeleteVolume(newctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
- func (cs *ScaleControllerServer) GetAFMMode(ctx context.Context, filesystemName string, filesetName string, ...) (string, error)
- func (cs *ScaleControllerServer) GetCapacity(ctx context.Context, req *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
- func (cs *ScaleControllerServer) GetSnapIdMembers(sId string) (scaleSnapId, error)
- func (cs *ScaleControllerServer) IfSameVolReqInProcess(scVol *scaleVolume) (bool, error)
- func (cs *ScaleControllerServer) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
- func (cs *ScaleControllerServer) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
- func (cs *ScaleControllerServer) MakeSnapMetadataDir(ctx context.Context, conn connectors.SpectrumScaleConnector, ...) error
- func (cs *ScaleControllerServer) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
- type ScaleDriver
- func (driver *ScaleDriver) AddControllerServiceCapabilities(ctx context.Context, cl []csi.ControllerServiceCapability_RPC_Type) error
- func (driver *ScaleDriver) AddNodeServiceCapabilities(ctx context.Context, nl []csi.NodeServiceCapability_RPC_Type) error
- func (driver *ScaleDriver) AddVolumeCapabilityAccessModes(ctx context.Context, vc []csi.VolumeCapability_AccessMode_Mode) error
- func (driver *ScaleDriver) PluginInitialize(ctx context.Context) (map[string]connectors.SpectrumScaleConnector, settings.ScaleSettingsConfigMap, ...)
- func (driver *ScaleDriver) PrintDriverInit(ctx context.Context)
- func (driver *ScaleDriver) Run(ctx context.Context, endpoint string)
- func (driver *ScaleDriver) SetupScaleDriver(ctx context.Context, name, vendorVersion, nodeID string) error
- func (driver *ScaleDriver) ValidateControllerServiceRequest(ctx context.Context, c csi.ControllerServiceCapability_RPC_Type) error
- type ScaleIdentityServer
- func (is *ScaleIdentityServer) GetPluginCapabilities(ctx context.Context, req *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
- func (is *ScaleIdentityServer) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
- func (is *ScaleIdentityServer) Probe(ctx context.Context, req *csi.ProbeRequest) (*csi.ProbeResponse, error)
- type ScaleNodeServer
- func (ns *ScaleNodeServer) NodeExpandVolume(ctx context.Context, req *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
- func (ns *ScaleNodeServer) NodeGetCapabilities(ctx context.Context, req *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
- func (ns *ScaleNodeServer) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
- func (ns *ScaleNodeServer) NodeGetVolumeStats(ctx context.Context, req *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
- func (ns *ScaleNodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
- func (ns *ScaleNodeServer) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
- func (ns *ScaleNodeServer) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
- func (ns *ScaleNodeServer) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
- type SnapCopyJobDetails
- type VolCopyJobDetails
Constants ¶
View Source
const ( SNAP_JOB_NOT_STARTED = 0 SNAP_JOB_RUNNING = 1 SNAP_JOB_COMPLETED = 2 SNAP_JOB_FAILED = 3 VOLCOPY_JOB_FAILED = 4 VOLCOPY_JOB_RUNNING = 5 VOLCOPY_JOB_COMPLETED = 6 VOLCOPY_JOB_NOT_STARTED = 7 JOB_STATUS_UNKNOWN = 8 STORAGECLASS_CLASSIC = "0" STORAGECLASS_ADVANCED = "1" STORAGECLASS_CACHE = "2" // Volume types FILE_DIRECTORYBASED_VOLUME = "0" FILE_DEPENDENTFILESET_VOLUME = "1" FILE_INDEPENDENTFILESET_VOLUME = "2" FILE_SHALLOWCOPY_VOLUME = "3" )
View Source
const ( VolNamePrefixEnvKey = "VOLUME_NAME_PREFIX" )
View Source
const ( SCALE_NODE_MAPPING_PREFIX = "SCALE_NODE_MAPPING_PREFIX" DefaultScaleNodeMapPrefix = "K8sNodePrefix_" )
View Source
const ( SHORTNAME_NODE_MAPPING = "SHORTNAME_NODE_MAPPING" SKIP_MOUNT_UNMOUNT = "SKIP_MOUNT_UNMOUNT" )
View Source
const ENVClusterCNSAPresenceCheck = "CNSADeployment"
View Source
const ENVClusterConfigurationType = "ClusterConfigurationType"
View Source
const ENVClusterTypeOpenshift = "OpenShiftPlatform"
View Source
const (
ResponseStatusUnknown = "UNKNOWN"
)
Variables ¶
This section is empty.
Functions ¶
func CgSnapshotLock ¶
func CgSnapshotUnlock ¶
func ConvertToBytes ¶
func NewControllerServiceCapability ¶
func NewControllerServiceCapability(cap csi.ControllerServiceCapability_RPC_Type) *csi.ControllerServiceCapability
func NewNodeServiceCapability ¶
func NewNodeServiceCapability(cap csi.NodeServiceCapability_RPC_Type) *csi.NodeServiceCapability
func NewVolumeCapabilityAccessMode ¶
func NewVolumeCapabilityAccessMode(mode csi.VolumeCapability_AccessMode_Mode) *csi.VolumeCapability_AccessMode
Types ¶
type ClusterDetails ¶
type ClusterDetails struct {
// contains filtered or unexported fields
}
ClusterDetails stores information of the cluster.
type ClusterID ¶
type ClusterID struct {
// contains filtered or unexported fields
}
ClusterID stores the id of the cluster.
type ClusterName ¶
type ClusterName struct {
// contains filtered or unexported fields
}
ClusterName stores the name of the cluster.
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() }
Defines Non blocking GRPC server interfaces
func NewNonBlockingGRPCServer ¶
func NewNonBlockingGRPCServer() NonBlockingGRPCServer
type ScaleControllerServer ¶
type ScaleControllerServer struct { Driver *ScaleDriver csi.UnimplementedControllerServer }
func NewControllerServer ¶
func NewControllerServer(ctx context.Context, d *ScaleDriver, connMap map[string]connectors.SpectrumScaleConnector, cmap settings.ScaleSettingsConfigMap, primary settings.Primary) *ScaleControllerServer
func (*ScaleControllerServer) CheckIfNewSnapshotIsRequired ¶
func (cs *ScaleControllerServer) CheckIfNewSnapshotIsRequired(ctx context.Context, conn connectors.SpectrumScaleConnector, filesystemName, filesetName, fsetName, snapName, storageClassType string, snapWindowInt int, snapExist bool) (string, bool, error)
func (*ScaleControllerServer) CheckNewSnapRequired ¶
func (cs *ScaleControllerServer) CheckNewSnapRequired(ctx context.Context, conn connectors.SpectrumScaleConnector, filesystemName string, filesetName string, snapWindow int) (string, error)
func (*ScaleControllerServer) ControllerExpandVolume ¶
func (cs *ScaleControllerServer) ControllerExpandVolume(ctx context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
func (*ScaleControllerServer) ControllerGetCapabilities ¶
func (cs *ScaleControllerServer) ControllerGetCapabilities(ctx context.Context, req *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
ControllerGetCapabilities implements the default GRPC callout.
func (*ScaleControllerServer) ControllerGetVolume ¶
func (cs *ScaleControllerServer) ControllerGetVolume(ctx context.Context, req *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error)
func (*ScaleControllerServer) ControllerModifyVolume ¶
func (cs *ScaleControllerServer) ControllerModifyVolume(ctx context.Context, req *csi.ControllerModifyVolumeRequest) (*csi.ControllerModifyVolumeResponse, error)
func (*ScaleControllerServer) ControllerPublishVolume ¶
func (cs *ScaleControllerServer) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
func (*ScaleControllerServer) ControllerUnpublishVolume ¶
func (cs *ScaleControllerServer) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
func (*ScaleControllerServer) CreateNewSnapshot ¶
func (cs *ScaleControllerServer) CreateNewSnapshot(ctx context.Context, conn connectors.SpectrumScaleConnector, filesystemName, filesetName, snapName, storageClassType string, snapExist bool) (string, error)
func (*ScaleControllerServer) CreateSnapshot ¶
func (cs *ScaleControllerServer) CreateSnapshot(newctx context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
CreateSnapshot Create Snapshot
func (*ScaleControllerServer) CreateVolume ¶
func (cs *ScaleControllerServer) CreateVolume(newctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
CreateVolume - Create Volume
func (*ScaleControllerServer) DelSnapMetadataDir ¶
func (cs *ScaleControllerServer) DelSnapMetadataDir(ctx context.Context, conn connectors.SpectrumScaleConnector, filesystemName string, consistencyGroup string, filesetName string, cgSnapName string, metaSnapName string) (bool, error)
func (*ScaleControllerServer) DeleteCGFileset ¶
func (cs *ScaleControllerServer) DeleteCGFileset(ctx context.Context, FilesystemName string, volumeIdMembers scaleVolId, conn connectors.SpectrumScaleConnector) error
This function deletes fileset for Consitency Group
func (*ScaleControllerServer) DeleteFilesetVol ¶
func (cs *ScaleControllerServer) DeleteFilesetVol(ctx context.Context, FilesystemName string, FilesetName string, volumeIdMembers scaleVolId, conn connectors.SpectrumScaleConnector, checkForSnapshots bool) (bool, error)
func (*ScaleControllerServer) DeleteShallowCopyRefPath ¶
func (cs *ScaleControllerServer) DeleteShallowCopyRefPath(ctx context.Context, FilesystemName, FilesetName, ShallowCopyRefPath, storageClassType, independentFileset, snapshotName string, conn connectors.SpectrumScaleConnector) error
func (*ScaleControllerServer) DeleteSnapshot ¶
func (cs *ScaleControllerServer) DeleteSnapshot(newctx context.Context, req *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
DeleteSnapshot - Delete snapshot
func (*ScaleControllerServer) DeleteVolume ¶
func (cs *ScaleControllerServer) DeleteVolume(newctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
func (*ScaleControllerServer) GetAFMMode ¶
func (cs *ScaleControllerServer) GetAFMMode(ctx context.Context, filesystemName string, filesetName string, conn connectors.SpectrumScaleConnector) (string, error)
GetAFMMode returns the AFM mode of the fileset and also the error if there is any (including the fileset not found error) while getting the fileset info
func (*ScaleControllerServer) GetCapacity ¶
func (cs *ScaleControllerServer) GetCapacity(ctx context.Context, req *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
func (*ScaleControllerServer) GetSnapIdMembers ¶
func (cs *ScaleControllerServer) GetSnapIdMembers(sId string) (scaleSnapId, error)
func (*ScaleControllerServer) IfSameVolReqInProcess ¶
func (cs *ScaleControllerServer) IfSameVolReqInProcess(scVol *scaleVolume) (bool, error)
func (*ScaleControllerServer) ListSnapshots ¶
func (cs *ScaleControllerServer) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
func (*ScaleControllerServer) ListVolumes ¶
func (cs *ScaleControllerServer) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
func (*ScaleControllerServer) MakeSnapMetadataDir ¶
func (cs *ScaleControllerServer) MakeSnapMetadataDir(ctx context.Context, conn connectors.SpectrumScaleConnector, filesystemName string, filesetName string, indepFileset string, cgSnapName string, metaSnapName string) error
func (*ScaleControllerServer) ValidateVolumeCapabilities ¶
func (cs *ScaleControllerServer) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
type ScaleDriver ¶
type ScaleDriver struct {
// contains filtered or unexported fields
}
func GetScaleDriver ¶
func GetScaleDriver(ctx context.Context) *ScaleDriver
func (*ScaleDriver) AddControllerServiceCapabilities ¶
func (driver *ScaleDriver) AddControllerServiceCapabilities(ctx context.Context, cl []csi.ControllerServiceCapability_RPC_Type) error
func (*ScaleDriver) AddNodeServiceCapabilities ¶
func (driver *ScaleDriver) AddNodeServiceCapabilities(ctx context.Context, nl []csi.NodeServiceCapability_RPC_Type) error
func (*ScaleDriver) AddVolumeCapabilityAccessModes ¶
func (driver *ScaleDriver) AddVolumeCapabilityAccessModes(ctx context.Context, vc []csi.VolumeCapability_AccessMode_Mode) error
func (*ScaleDriver) PluginInitialize ¶
func (driver *ScaleDriver) PluginInitialize(ctx context.Context) (map[string]connectors.SpectrumScaleConnector, settings.ScaleSettingsConfigMap, settings.Primary, error)
func (*ScaleDriver) PrintDriverInit ¶
func (driver *ScaleDriver) PrintDriverInit(ctx context.Context)
func (*ScaleDriver) SetupScaleDriver ¶
func (driver *ScaleDriver) SetupScaleDriver(ctx context.Context, name, vendorVersion, nodeID string) error
func (*ScaleDriver) ValidateControllerServiceRequest ¶
func (driver *ScaleDriver) ValidateControllerServiceRequest(ctx context.Context, c csi.ControllerServiceCapability_RPC_Type) error
type ScaleIdentityServer ¶
type ScaleIdentityServer struct { Driver *ScaleDriver csi.UnimplementedIdentityServer }
func NewIdentityServer ¶
func NewIdentityServer(ctx context.Context, d *ScaleDriver) *ScaleIdentityServer
func (*ScaleIdentityServer) GetPluginCapabilities ¶
func (is *ScaleIdentityServer) GetPluginCapabilities(ctx context.Context, req *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
func (*ScaleIdentityServer) GetPluginInfo ¶
func (is *ScaleIdentityServer) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
func (*ScaleIdentityServer) Probe ¶
func (is *ScaleIdentityServer) Probe(ctx context.Context, req *csi.ProbeRequest) (*csi.ProbeResponse, error)
type ScaleNodeServer ¶
type ScaleNodeServer struct { Driver *ScaleDriver // TODO: Only lock mutually exclusive calls and make locking more fine grained //mux sync.Mutex csi.UnimplementedNodeServer }
func NewNodeServer ¶
func NewNodeServer(ctx context.Context, d *ScaleDriver) *ScaleNodeServer
func (*ScaleNodeServer) NodeExpandVolume ¶
func (ns *ScaleNodeServer) NodeExpandVolume(ctx context.Context, req *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
func (*ScaleNodeServer) NodeGetCapabilities ¶
func (ns *ScaleNodeServer) NodeGetCapabilities(ctx context.Context, req *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
func (*ScaleNodeServer) NodeGetInfo ¶
func (ns *ScaleNodeServer) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
func (*ScaleNodeServer) NodeGetVolumeStats ¶
func (ns *ScaleNodeServer) NodeGetVolumeStats(ctx context.Context, req *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
func (*ScaleNodeServer) NodePublishVolume ¶
func (ns *ScaleNodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
func (*ScaleNodeServer) NodeStageVolume ¶
func (ns *ScaleNodeServer) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) ( *csi.NodeStageVolumeResponse, error)
func (*ScaleNodeServer) NodeUnpublishVolume ¶
func (ns *ScaleNodeServer) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
func (*ScaleNodeServer) NodeUnstageVolume ¶
func (ns *ScaleNodeServer) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolumeRequest) ( *csi.NodeUnstageVolumeResponse, error)
type SnapCopyJobDetails ¶
type SnapCopyJobDetails struct {
// contains filtered or unexported fields
}
type VolCopyJobDetails ¶
type VolCopyJobDetails struct {
// contains filtered or unexported fields
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.