Documentation ¶
Index ¶
- func GetConfing(path string, cfg *ControllerCfg) error
- func GetVolumeCapability(vcam []csi.VolumeCapability_AccessMode_Mode) []*csi.VolumeCapability
- func SetupControllerPlugin(cp *ControllerPlugin, cfg *jcom.JovianDSSCfg) (err error)
- type ControllerCfg
- type ControllerPlugin
- func (cp *ControllerPlugin) ControllerExpandVolume(ctx context.Context, in *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
- func (cp *ControllerPlugin) ControllerGetCapabilities(ctx context.Context, req *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
- func (cp *ControllerPlugin) ControllerGetVolume(ctx context.Context, in *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error)
- func (cp *ControllerPlugin) ControllerModifyVolume(ctx context.Context, in *csi.ControllerModifyVolumeRequest) (*csi.ControllerModifyVolumeResponse, error)
- func (cp *ControllerPlugin) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
- func (cp *ControllerPlugin) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
- func (cp *ControllerPlugin) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
- func (cp *ControllerPlugin) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
- func (cp *ControllerPlugin) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
- func (cp *ControllerPlugin) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
- func (cp *ControllerPlugin) GetCapacity(ctx context.Context, req *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
- func (cp *ControllerPlugin) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsRequest) (rsp *csi.ListSnapshotsResponse, err error)
- func (cp *ControllerPlugin) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
- func (cp *ControllerPlugin) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
- func (cp *ControllerPlugin) VolumeComply(ctx context.Context, vd *jdrvr.VolumeDesc, caprage *csi.CapacityRange, ...) (*int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfing ¶
func GetConfing(path string, cfg *ControllerCfg) error
func GetVolumeCapability ¶
func GetVolumeCapability(vcam []csi.VolumeCapability_AccessMode_Mode) []*csi.VolumeCapability
GetVolumeCapability volume related capabilities
func SetupControllerPlugin ¶
func SetupControllerPlugin(cp *ControllerPlugin, cfg *jcom.JovianDSSCfg) (err error)
SetupControllerPlugin set controller plugin struct with proper values
Types ¶
type ControllerCfg ¶
type ControllerCfg struct { RestEndpoint rest.StorageCfg Vnamelen int Vpasslen int Iqn string LLevel string `yaml:"llevel"` LPath string `yaml:"lpath"` }
ControllerCfg stores configaration properties of controller instance
type ControllerPlugin ¶
type ControllerPlugin struct {
// contains filtered or unexported fields
}
ControllerPlugin provides CSI controller plugin interface
func (*ControllerPlugin) ControllerExpandVolume ¶
func (cp *ControllerPlugin) ControllerExpandVolume(ctx context.Context, in *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
ControllerExpandVolume expands capacity of given volume
func (*ControllerPlugin) ControllerGetCapabilities ¶
func (cp *ControllerPlugin) ControllerGetCapabilities(ctx context.Context, req *csi.ControllerGetCapabilitiesRequest) ( *csi.ControllerGetCapabilitiesResponse, error, )
ControllerGetCapabilities all capabilities that controller supports
func (*ControllerPlugin) ControllerGetVolume ¶
func (cp *ControllerPlugin) ControllerGetVolume(ctx context.Context, in *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error)
ControllerGetVolume provides current information about the volume
func (*ControllerPlugin) ControllerModifyVolume ¶
func (cp *ControllerPlugin) ControllerModifyVolume(ctx context.Context, in *csi.ControllerModifyVolumeRequest) (*csi.ControllerModifyVolumeResponse, error)
ControllerModifyVolume allows to change mutable key attributes of a volume
func (*ControllerPlugin) ControllerPublishVolume ¶
func (cp *ControllerPlugin) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
ControllerPublishVolume create iscsi target for the volume
func (*ControllerPlugin) ControllerUnpublishVolume ¶
func (cp *ControllerPlugin) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
ControllerUnpublishVolume remove iscsi target for the volume
func (*ControllerPlugin) CreateSnapshot ¶
func (cp *ControllerPlugin) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
CreateSnapshot creates snapshot
func (*ControllerPlugin) CreateVolume ¶
func (cp *ControllerPlugin) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
CreateVolume create volume with properties
func (*ControllerPlugin) DeleteSnapshot ¶
func (cp *ControllerPlugin) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
DeleteSnapshot deletes snapshot
func (*ControllerPlugin) DeleteVolume ¶
func (cp *ControllerPlugin) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
DeleteVolume deletes volume or hides it for later deletion
func (*ControllerPlugin) GetCapacity ¶
func (cp *ControllerPlugin) GetCapacity(ctx context.Context, req *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
GetCapacity gets storage capacity
func (*ControllerPlugin) ListSnapshots ¶
func (cp *ControllerPlugin) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsRequest) (rsp *csi.ListSnapshotsResponse, err error)
ListSnapshots return the list of valid snapshots
func (*ControllerPlugin) ListVolumes ¶
func (cp *ControllerPlugin) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
ListVolumes return the list of volumes
func (*ControllerPlugin) ValidateVolumeCapabilities ¶
func (cp *ControllerPlugin) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
ValidateVolumeCapabilities checks if volume have give capability
func (*ControllerPlugin) VolumeComply ¶
func (cp *ControllerPlugin) VolumeComply(ctx context.Context, vd *jdrvr.VolumeDesc, caprage *csi.CapacityRange, source *csi.VolumeContentSource) (*int64, error)
VolumeComply checks if volume with specified properties exists
if volume with same name exists yet does not fall into requirments it fails with ALLREADY_EXISTS if volume does not exists it fails with NOT_FOUND if volume do exists and fit requirmnets it will return csi volume struct and nil as error