Documentation ¶
Overview ¶
Package controller provides CSI specification compatible controller service.
Package controller provides CSI specification compatible controller service.
Index ¶
- Constants
- func EnsureProtectionPolicyExists(ctx context.Context, arr *array.PowerStoreArray, vgName string, ...) (string, error)
- func EnsureReplicationRuleExists(ctx context.Context, arr *array.PowerStoreArray, vgName string, ...) (string, error)
- func ExecuteAction(session *gopowerstore.ReplicationSession, pstoreClient gopowerstore.Client, ...) error
- func GetServiceTag(ctx context.Context, req *csi.CreateVolumeRequest, arr *array.PowerStoreArray, ...) string
- type FilesystemSnapshot
- type GeneralSnapshot
- type Interface
- type NfsCreator
- func (*NfsCreator) CheckIfAlreadyExists(ctx context.Context, name string, sizeInBytes int64, ...) (*csi.Volume, error)
- func (*NfsCreator) CheckName(_ context.Context, name string) error
- func (*NfsCreator) CheckSize(_ context.Context, cr *csi.CapacityRange, isAutoRoundOffFsSizeEnabled bool) (int64, error)
- func (*NfsCreator) Clone(ctx context.Context, volumeSource *csi.VolumeContentSource_VolumeSource, ...) (*csi.Volume, error)
- func (c *NfsCreator) Create(ctx context.Context, req *csi.CreateVolumeRequest, sizeInBytes int64, ...) (gopowerstore.CreateResponse, error)
- func (*NfsCreator) CreateVolumeFromSnapshot(ctx context.Context, snapshotSource *csi.VolumeContentSource_SnapshotSource, ...) (*csi.Volume, error)
- type NfsPublisher
- type NfsSnapshotter
- type SCSICreator
- func (*SCSICreator) CheckIfAlreadyExists(ctx context.Context, name string, sizeInBytes int64, ...) (*csi.Volume, error)
- func (*SCSICreator) CheckName(_ context.Context, name string) error
- func (*SCSICreator) CheckSize(_ context.Context, cr *csi.CapacityRange, _ bool) (int64, error)
- func (*SCSICreator) Clone(ctx context.Context, volumeSource *csi.VolumeContentSource_VolumeSource, ...) (*csi.Volume, error)
- func (sc *SCSICreator) Create(ctx context.Context, req *csi.CreateVolumeRequest, sizeInBytes int64, ...) (gopowerstore.CreateResponse, error)
- func (*SCSICreator) CreateVolumeFromSnapshot(ctx context.Context, snapshotSource *csi.VolumeContentSource_SnapshotSource, ...) (*csi.Volume, error)
- type SCSIPublisher
- type SCSISnapshotter
- type Service
- func (s *Service) ControllerExpandVolume(ctx context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
- func (s *Service) ControllerGetCapabilities(_ context.Context, _ *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
- func (s *Service) ControllerGetVolume(ctx context.Context, req *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error)
- func (s *Service) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
- func (s *Service) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
- func (s *Service) CreateRemoteVolume(ctx context.Context, req *csiext.CreateRemoteVolumeRequest) (*csiext.CreateRemoteVolumeResponse, error)
- func (s *Service) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
- func (s *Service) CreateStorageProtectionGroup(ctx context.Context, req *csiext.CreateStorageProtectionGroupRequest) (*csiext.CreateStorageProtectionGroupResponse, error)
- func (s *Service) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
- func (s *Service) CreateVolumeGroupSnapshot(ctx context.Context, request *vgsext.CreateVolumeGroupSnapshotRequest) (*vgsext.CreateVolumeGroupSnapshotResponse, error)
- func (s *Service) DeleteLocalVolume(ctx context.Context, req *csiext.DeleteLocalVolumeRequest) (*csiext.DeleteLocalVolumeResponse, error)
- func (s *Service) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
- func (s *Service) DeleteStorageProtectionGroup(ctx context.Context, req *csiext.DeleteStorageProtectionGroupRequest) (*csiext.DeleteStorageProtectionGroupResponse, error)
- func (s *Service) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
- func (s *Service) ExecuteAction(ctx context.Context, req *csiext.ExecuteActionRequest) (*csiext.ExecuteActionResponse, error)
- func (s *Service) GetCapacity(ctx context.Context, req *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
- func (s *Service) GetReplicationCapabilities(_ context.Context, _ *csiext.GetReplicationCapabilityRequest) (*csiext.GetReplicationCapabilityResponse, error)
- func (s *Service) GetStorageProtectionGroupStatus(ctx context.Context, req *csiext.GetStorageProtectionGroupStatusRequest) (*csiext.GetStorageProtectionGroupStatusResponse, error)
- func (s *Service) Init() error
- func (s *Service) IsIOInProgress(ctx context.Context, volID string, arrayConfig *array.PowerStoreArray, ...) (err error)
- func (s *Service) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
- func (s *Service) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
- func (s *Service) ProbeController(_ context.Context, _ *commonext.ProbeControllerRequest) (*commonext.ProbeControllerResponse, error)
- func (s *Service) QueryArrayStatus(ctx context.Context, url string) (bool, error)
- func (s *Service) RegisterAdditionalServers(server *grpc.Server)
- func (s *Service) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
- func (s *Service) ValidateVolumeHostConnectivity(ctx context.Context, req *podmon.ValidateVolumeHostConnectivityRequest) (*podmon.ValidateVolumeHostConnectivityResponse, error)
- func (s *Service) WithRP(key string) string
- type SnapshotType
- type VolumeCreator
- type VolumePublisher
- type VolumeSnapshot
- type VolumeSnapshotter
Constants ¶
const ( // MinVolumeSizeBytes is minimal size for volume creation on PowerStore MinVolumeSizeBytes = 1048576 // MinFilesystemSizeBytes is minimal size for Filesystem creation on PowerStore - 1.5Gi MinFilesystemSizeBytes = 1610612736 // MaxVolumeSizeBytes is maximum size for volume creation on PowerStore MaxVolumeSizeBytes = 1099511627776 * 256 // 256 TB // VolumeSizeMultiple multiplier for volumes VolumeSizeMultiple = 8192 // MaxVolumeNameLength max length for the volume name MaxVolumeNameLength = 128 // ReplicationPrefix represents replication prefix ReplicationPrefix = "replication.storage.dell.com" // ErrUnknownAccessType represents error message for unknown access type ErrUnknownAccessType = "unknown access type is not Block or Mount" // ErrUnknownAccessMode represents error message for unknown access mode ErrUnknownAccessMode = "access mode cannot be UNKNOWN" // ErrNoMultiNodeWriter represents error message for multi node access ErrNoMultiNodeWriter = "multi-node with writer(s) only supported for block access type" // KeyFsType represents key for Fs Type KeyFsType = "csi.storage.k8s.io/fstype" // KeyFsTypeOld represents old key for Fs Type KeyFsTypeOld = "FsType" // KeyReplicationEnabled represents key for replication enabled KeyReplicationEnabled = "isReplicationEnabled" // KeyReplicationMode represents key for replication mode KeyReplicationMode = "mode" // KeyReplicationRPO represents key for replication RPO KeyReplicationRPO = "rpo" // KeyReplicationRemoteSystem represents key for replication remote system KeyReplicationRemoteSystem = "remoteSystem" // KeyReplicationIgnoreNamespaces represents key for replication ignore namespaces KeyReplicationIgnoreNamespaces = "ignoreNamespaces" // KeyReplicationVGPrefix represents key for replication vg prefix KeyReplicationVGPrefix = "volumeGroupPrefix" // KeyNasName represents key for nas name KeyNasName = "nasName" // KeyCSIPVCNamespace represents key for csi pvc namespace KeyCSIPVCNamespace = "csi.storage.k8s.io/pvc/namespace" // KeyCSIPVCName represents key for csi pvc name KeyCSIPVCName = "csi.storage.k8s.io/pvc/name" )
const ( // These are available when enabling --extra-create-metadata for the external-provisioner. CSIPersistentVolumeName = "csi.storage.k8s.io/pv/name" CSIPersistentVolumeClaimName = "csi.storage.k8s.io/pvc/name" CSIPersistentVolumeClaimNamespace = "csi.storage.k8s.io/pvc/namespace" // These map to the above fields in the form of HTTP header names. HeaderPersistentVolumeName = "x-csi-pv-name" HeaderPersistentVolumeClaimName = "x-csi-pv-claimname" HeaderPersistentVolumeClaimNamespace = "x-csi-pv-namespace" )
Extra metadata field names for propagating to gopowerstore and beyond.
const (
// ReservedSize number of bytes reserved by creation of FS
ReservedSize = 1610612736
)
const StateReady = "Ready"
StateReady resembles ready state
Variables ¶
This section is empty.
Functions ¶
func EnsureProtectionPolicyExists ¶
func EnsureProtectionPolicyExists(ctx context.Context, arr *array.PowerStoreArray, vgName string, remoteSystemName string, rpoEnum gopowerstore.RPOEnum, ) (string, error)
EnsureProtectionPolicyExists ensures protection policy exists
func EnsureReplicationRuleExists ¶
func EnsureReplicationRuleExists(ctx context.Context, arr *array.PowerStoreArray, vgName string, remoteSystemID string, rpoEnum gopowerstore.RPOEnum, ) (string, error)
EnsureReplicationRuleExists ensures replication rule exists
func ExecuteAction ¶
func ExecuteAction(session *gopowerstore.ReplicationSession, pstoreClient gopowerstore.Client, action gopowerstore.ActionType, failoverParams *gopowerstore.FailoverParams) error
ExecuteAction validates current state of replication & executes provided action on RS
func GetServiceTag ¶
func GetServiceTag(ctx context.Context, req *csi.CreateVolumeRequest, arr *array.PowerStoreArray, volID string, protocol string) string
GetServiceTag returns the service tag associated with an appliance
Types ¶
type FilesystemSnapshot ¶
type FilesystemSnapshot gopowerstore.FileSystem
FilesystemSnapshot represents snapshot of the FileSystem
func (FilesystemSnapshot) GetID ¶
func (f FilesystemSnapshot) GetID() string
GetID returns ID of the snapshot
func (FilesystemSnapshot) GetSize ¶
func (f FilesystemSnapshot) GetSize() int64
GetSize returns current size of the snapshot
func (FilesystemSnapshot) GetSourceID ¶
func (f FilesystemSnapshot) GetSourceID() string
GetSourceID returns ID of the volume/fs that snapshot was created from
func (FilesystemSnapshot) GetType ¶
func (f FilesystemSnapshot) GetType() SnapshotType
GetType returns type of general snapshot (either filesystem or block)
type GeneralSnapshot ¶
type GeneralSnapshot interface { // GetID returns ID of the snapshot GetID() string // GetSourceID returns ID of the volume/fs that snapshot was created from GetSourceID() string // GetSize returns current size of the snapshot GetSize() int64 // GetType returns type of general snapshot (either filesystem or block) GetType() SnapshotType }
GeneralSnapshot is an interface for combining both Volume and FileSystem
type Interface ¶
type Interface interface { CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error) array.Consumer }
Interface provides most important controller methods. This essentially serves as a wrapper for controller service that is used in ephemeral volumes.
type NfsCreator ¶
type NfsCreator struct {
// contains filtered or unexported fields
}
NfsCreator implementation of VolumeCreator for NFS volumes
func (*NfsCreator) CheckIfAlreadyExists ¶
func (*NfsCreator) CheckIfAlreadyExists(ctx context.Context, name string, sizeInBytes int64, client gopowerstore.Client) (*csi.Volume, error)
CheckIfAlreadyExists queries storage array if FileSystem with given name exists
func (*NfsCreator) CheckName ¶
func (*NfsCreator) CheckName(_ context.Context, name string) error
CheckName validates volume name
func (*NfsCreator) CheckSize ¶
func (*NfsCreator) CheckSize(_ context.Context, cr *csi.CapacityRange, isAutoRoundOffFsSizeEnabled bool) (int64, error)
CheckSize validates that size is correct and returns size in bytes
func (*NfsCreator) Clone ¶
func (*NfsCreator) Clone(ctx context.Context, volumeSource *csi.VolumeContentSource_VolumeSource, volumeName string, sizeInBytes int64, parameters map[string]string, client gopowerstore.Client, ) (*csi.Volume, error)
Clone creates a clone of a FileSystem
func (*NfsCreator) Create ¶
func (c *NfsCreator) Create(ctx context.Context, req *csi.CreateVolumeRequest, sizeInBytes int64, client gopowerstore.Client) (gopowerstore.CreateResponse, error)
Create creates new FileSystem on storage array
func (*NfsCreator) CreateVolumeFromSnapshot ¶
func (*NfsCreator) CreateVolumeFromSnapshot(ctx context.Context, snapshotSource *csi.VolumeContentSource_SnapshotSource, volumeName string, sizeInBytes int64, parameters map[string]string, client gopowerstore.Client, ) (*csi.Volume, error)
CreateVolumeFromSnapshot create a FileSystem from an existing FileSystem snapshot.
type NfsPublisher ¶
type NfsPublisher struct { // ExternalAccess used to set custom ip to be added to the NFS Export 'hosts' list ExternalAccess string }
NfsPublisher implementation of VolumePublisher for NFS volumes
func (*NfsPublisher) CheckIfVolumeExists ¶
func (n *NfsPublisher) CheckIfVolumeExists(ctx context.Context, client gopowerstore.Client, volID string) error
CheckIfVolumeExists queries storage array if FileSystem with given name exists
func (*NfsPublisher) Publish ¶
func (n *NfsPublisher) Publish(ctx context.Context, publishContext map[string]string, req *csi.ControllerPublishVolumeRequest, client gopowerstore.Client, kubeNodeID string, volumeID string, _ bool, ) (*csi.ControllerPublishVolumeResponse, error)
Publish publishes FileSystem by adding host (node) to the NFS Export 'hosts' list
type NfsSnapshotter ¶
type NfsSnapshotter struct{}
NfsSnapshotter is a implementation of VolumeSnapshotter for NFS volumes
func (*NfsSnapshotter) Create ¶
func (*NfsSnapshotter) Create(ctx context.Context, snapName string, sourceID string, client gopowerstore.Client) (gopowerstore.CreateResponse, error)
Create creates new snapshot of a given FileSystem
func (*NfsSnapshotter) GetExistingSnapshot ¶
func (*NfsSnapshotter) GetExistingSnapshot(ctx context.Context, snapName string, client gopowerstore.Client) (GeneralSnapshot, error)
GetExistingSnapshot queries storage array if given snapshot of the FileSystem already exists
type SCSICreator ¶
type SCSICreator struct {
// contains filtered or unexported fields
}
SCSICreator implementation of VolumeCreator for SCSI based (FC, iSCSI) volumes
func (*SCSICreator) CheckIfAlreadyExists ¶
func (*SCSICreator) CheckIfAlreadyExists(ctx context.Context, name string, sizeInBytes int64, client gopowerstore.Client) (*csi.Volume, error)
CheckIfAlreadyExists queries storage array if Volume with given name exists
func (*SCSICreator) CheckName ¶
func (*SCSICreator) CheckName(_ context.Context, name string) error
CheckName validates volume name
func (*SCSICreator) CheckSize ¶
func (*SCSICreator) CheckSize(_ context.Context, cr *csi.CapacityRange, _ bool) (int64, error)
CheckSize validates that size is correct and returns size in bytes
func (*SCSICreator) Clone ¶
func (*SCSICreator) Clone(ctx context.Context, volumeSource *csi.VolumeContentSource_VolumeSource, volumeName string, sizeInBytes int64, parameters map[string]string, client gopowerstore.Client, ) (*csi.Volume, error)
Clone creates a clone of a Volume
func (*SCSICreator) Create ¶
func (sc *SCSICreator) Create(ctx context.Context, req *csi.CreateVolumeRequest, sizeInBytes int64, client gopowerstore.Client) (gopowerstore.CreateResponse, error)
Create creates new block volume on storage array
func (*SCSICreator) CreateVolumeFromSnapshot ¶
func (*SCSICreator) CreateVolumeFromSnapshot(ctx context.Context, snapshotSource *csi.VolumeContentSource_SnapshotSource, volumeName string, sizeInBytes int64, parameters map[string]string, client gopowerstore.Client, ) (*csi.Volume, error)
CreateVolumeFromSnapshot create a volume from an existing snapshot. The snapshotSource gives the SnapshotId which is the volume to be replicated.
type SCSIPublisher ¶
type SCSIPublisher struct{}
SCSIPublisher implementation of VolumePublisher for SCSI based (FC, iSCSI) volumes
func (*SCSIPublisher) CheckIfVolumeExists ¶
func (s *SCSIPublisher) CheckIfVolumeExists(ctx context.Context, client gopowerstore.Client, volID string) error
CheckIfVolumeExists queries storage array if Volume with given name exists
func (*SCSIPublisher) Publish ¶
func (s *SCSIPublisher) Publish(ctx context.Context, publishContext map[string]string, req *csi.ControllerPublishVolumeRequest, client gopowerstore.Client, kubeNodeID string, volumeID string, isRemote bool, ) (*csi.ControllerPublishVolumeResponse, error)
Publish publishes Volume by attaching it to the host
type SCSISnapshotter ¶
type SCSISnapshotter struct{}
SCSISnapshotter is a implementation of VolumeSnapshotter for SCSI based (FC, iSCSI) volumes
func (*SCSISnapshotter) Create ¶
func (*SCSISnapshotter) Create(ctx context.Context, snapName string, sourceID string, client gopowerstore.Client) (gopowerstore.CreateResponse, error)
Create creates new snapshot of a given Volume
func (*SCSISnapshotter) GetExistingSnapshot ¶
func (*SCSISnapshotter) GetExistingSnapshot(ctx context.Context, snapName string, client gopowerstore.Client) (GeneralSnapshot, error)
GetExistingSnapshot queries storage array if given snapshot of the Volume already exists
type Service ¶
Service is a controller service that contains array connection information and implements ControllerServer API
func (*Service) ControllerExpandVolume ¶
func (s *Service) ControllerExpandVolume(ctx context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
ControllerExpandVolume resizes Volume or FileSystem by increasing available volume capacity in the storage array.
func (*Service) ControllerGetCapabilities ¶
func (s *Service) ControllerGetCapabilities(_ context.Context, _ *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
ControllerGetCapabilities returns list of capabilities that are supported by the driver.
func (*Service) ControllerGetVolume ¶
func (s *Service) ControllerGetVolume(ctx context.Context, req *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error)
ControllerGetVolume fetch current information about a volume
func (*Service) ControllerPublishVolume ¶
func (s *Service) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
ControllerPublishVolume prepares Volume/FileSystem to be consumed by node by attaching/allowing access to the host.
func (*Service) ControllerUnpublishVolume ¶
func (s *Service) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
ControllerUnpublishVolume prepares Volume/FileSystem to be deleted by unattaching/disabling access to the host.
func (*Service) CreateRemoteVolume ¶
func (s *Service) CreateRemoteVolume(ctx context.Context, req *csiext.CreateRemoteVolumeRequest, ) (*csiext.CreateRemoteVolumeResponse, error)
CreateRemoteVolume creates replica of volume in remote cluster
func (*Service) CreateSnapshot ¶
func (s *Service) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
CreateSnapshot creates a snapshot of the Volume or FileSystem.
func (*Service) CreateStorageProtectionGroup ¶
func (s *Service) CreateStorageProtectionGroup(ctx context.Context, req *csiext.CreateStorageProtectionGroupRequest, ) (*csiext.CreateStorageProtectionGroupResponse, error)
CreateStorageProtectionGroup creates storage protection group
func (*Service) CreateVolume ¶
func (s *Service) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
CreateVolume creates either FileSystem or Volume on storage array.
func (*Service) CreateVolumeGroupSnapshot ¶
func (s *Service) CreateVolumeGroupSnapshot(ctx context.Context, request *vgsext.CreateVolumeGroupSnapshotRequest) (*vgsext.CreateVolumeGroupSnapshotResponse, error)
CreateVolumeGroupSnapshot creates volume group snapshot
func (*Service) DeleteLocalVolume ¶ added in v2.7.0
func (s *Service) DeleteLocalVolume(ctx context.Context, req *csiext.DeleteLocalVolumeRequest, ) (*csiext.DeleteLocalVolumeResponse, error)
DeleteLocalVolume deletes a volume on the local storage array upon request from a remote replication controller.
func (*Service) DeleteSnapshot ¶
func (s *Service) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
DeleteSnapshot deletes a snapshot of the Volume or FileSystem.
func (*Service) DeleteStorageProtectionGroup ¶
func (s *Service) DeleteStorageProtectionGroup(ctx context.Context, req *csiext.DeleteStorageProtectionGroupRequest, ) (*csiext.DeleteStorageProtectionGroupResponse, error)
DeleteStorageProtectionGroup deletes storage protection group
func (*Service) DeleteVolume ¶
func (s *Service) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
DeleteVolume deletes either FileSystem or Volume from storage array.
func (*Service) ExecuteAction ¶
func (s *Service) ExecuteAction(ctx context.Context, req *csiext.ExecuteActionRequest, ) (*csiext.ExecuteActionResponse, error)
ExecuteAction is a method to execute an action request
func (*Service) GetCapacity ¶
func (s *Service) GetCapacity(ctx context.Context, req *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
GetCapacity returns available capacity for a storage array.
func (*Service) GetReplicationCapabilities ¶
func (s *Service) GetReplicationCapabilities(_ context.Context, _ *csiext.GetReplicationCapabilityRequest) (*csiext.GetReplicationCapabilityResponse, error)
GetReplicationCapabilities is a getter for replication capabilities
func (*Service) GetStorageProtectionGroupStatus ¶
func (s *Service) GetStorageProtectionGroupStatus(ctx context.Context, req *csiext.GetStorageProtectionGroupStatusRequest, ) (*csiext.GetStorageProtectionGroupStatusResponse, error)
GetStorageProtectionGroupStatus gets storage protection group status
func (*Service) IsIOInProgress ¶
func (s *Service) IsIOInProgress(ctx context.Context, volID string, arrayConfig *array.PowerStoreArray, protocol string) (err error)
IsIOInProgress function check the IO operation status on array
func (*Service) ListSnapshots ¶
func (s *Service) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
ListSnapshots list all accessible snapshots from the storage array.
func (*Service) ListVolumes ¶
func (s *Service) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
ListVolumes returns all accessible volumes from the storage array.
func (*Service) ProbeController ¶
func (s *Service) ProbeController(_ context.Context, _ *commonext.ProbeControllerRequest) (*commonext.ProbeControllerResponse, error)
ProbeController probes the controller service
func (*Service) QueryArrayStatus ¶
QueryArrayStatus make API call to the specified url to retrieve connection status
func (*Service) RegisterAdditionalServers ¶
RegisterAdditionalServers registers replication extension
func (*Service) ValidateVolumeCapabilities ¶
func (s *Service) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
ValidateVolumeCapabilities checks if capabilities found in request are supported by driver.
func (*Service) ValidateVolumeHostConnectivity ¶
func (s *Service) ValidateVolumeHostConnectivity(ctx context.Context, req *podmon.ValidateVolumeHostConnectivityRequest) (*podmon.ValidateVolumeHostConnectivityResponse, error)
ValidateVolumeHostConnectivity menthod will be called by podmon sidecars to check host connectivity with array
type SnapshotType ¶
type SnapshotType string
SnapshotType represents type of snapshot
const ( // FilesystemSnapshotType represents filesystem snapshot type FilesystemSnapshotType SnapshotType = "filesystem" // BlockSnapshotType represents block snapshot type BlockSnapshotType SnapshotType = "block" )
type VolumeCreator ¶
type VolumeCreator interface { // CheckSize validates that size is correct and returns size in bytes CheckSize(ctx context.Context, cr *csi.CapacityRange, isAutoRoundOffFsSizeEnabled bool) (int64, error) // CheckName validates volume name CheckName(ctx context.Context, name string) error // CheckIfAlreadyExists queries storage array if given volume already exists CheckIfAlreadyExists(ctx context.Context, name string, sizeInBytes int64, client gopowerstore.Client) (*csi.Volume, error) // Create creates new volume Create(ctx context.Context, req *csi.CreateVolumeRequest, sizeInBytes int64, client gopowerstore.Client) (gopowerstore.CreateResponse, error) // Create volume from snapshot CreateVolumeFromSnapshot(ctx context.Context, snapshotSource *csi.VolumeContentSource_SnapshotSource, volumeName string, sizeInBytes int64, parameters map[string]string, client gopowerstore.Client) (*csi.Volume, error) // Create a volume from another volume Clone(ctx context.Context, volumeSource *csi.VolumeContentSource_VolumeSource, volumeName string, sizeInBytes int64, parameters map[string]string, client gopowerstore.Client) (*csi.Volume, error) }
VolumeCreator allows to call Create and similar operations used in CreateVolume call
type VolumePublisher ¶
type VolumePublisher interface { // CheckIfVolumeExists queries storage array if given volume already exists CheckIfVolumeExists(ctx context.Context, client gopowerstore.Client, volID string) error // Publish does the steps necessary for volume to be available on the node Publish(ctx context.Context, publishContext map[string]string, req *csi.ControllerPublishVolumeRequest, client gopowerstore.Client, kubeNodeID string, volumeID string, isRemote bool) (*csi.ControllerPublishVolumeResponse, error) }
VolumePublisher allows to publish a volume
type VolumeSnapshot ¶
type VolumeSnapshot gopowerstore.Volume
VolumeSnapshot represents snapshot of the block Volume
func (VolumeSnapshot) GetID ¶
func (v VolumeSnapshot) GetID() string
GetID returns ID of the snapshot
func (VolumeSnapshot) GetSize ¶
func (v VolumeSnapshot) GetSize() int64
GetSize returns current size of the snapshot
func (VolumeSnapshot) GetSourceID ¶
func (v VolumeSnapshot) GetSourceID() string
GetSourceID returns ID of the volume/fs that snapshot was created from
func (VolumeSnapshot) GetType ¶
func (v VolumeSnapshot) GetType() SnapshotType
GetType returns type of general snapshot (either filesystem or block)
type VolumeSnapshotter ¶
type VolumeSnapshotter interface { // GetExistingSnapshot queries storage array if given snapshot already exists GetExistingSnapshot(context.Context, string, gopowerstore.Client) (GeneralSnapshot, error) // Create creates new snapshot of a given volume Create(context.Context, string, string, gopowerstore.Client) (gopowerstore.CreateResponse, error) }
VolumeSnapshotter allow to create snapshot of the volume/fs