Documentation ¶
Index ¶
- Constants
- 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
- func ParseEndpoint(ep string) (string, string, error)
- type ListNodesResponse
- type NonBlockingGRPCServer
- type Plugin
- func NewAllInOnePlugin(nodeName, endpoint, caCert, clientCert, clientKey string, ...) (*Plugin, error)
- func NewControllerPlugin(nodeName, endpoint string, orchestrator core.Orchestrator, ...) (*Plugin, error)
- func NewNodePlugin(nodeName, endpoint, caCert, clientCert, clientKey string, ...) (*Plugin, error)
- func (p *Plugin) Activate() error
- func (p *Plugin) ControllerExpandVolume(ctx context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
- func (p *Plugin) ControllerGetCapabilities(ctx context.Context, req *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
- func (p *Plugin) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
- func (p *Plugin) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
- func (p *Plugin) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
- func (p *Plugin) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
- func (p *Plugin) Deactivate() error
- func (p *Plugin) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
- func (p *Plugin) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
- func (p *Plugin) GetCapacity(ctx context.Context, req *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
- func (p *Plugin) GetName() string
- func (p *Plugin) GetPluginCapabilities(ctx context.Context, req *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
- func (p *Plugin) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
- func (p *Plugin) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
- func (p *Plugin) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
- func (p *Plugin) NodeExpandVolume(ctx context.Context, req *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
- func (p *Plugin) NodeGetCapabilities(ctx context.Context, req *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
- func (p *Plugin) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
- func (p *Plugin) NodeGetVolumeStats(ctx context.Context, req *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
- func (p *Plugin) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
- func (p *Plugin) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
- func (p *Plugin) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
- func (p *Plugin) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
- func (p *Plugin) Probe(ctx context.Context, req *csi.ProbeRequest) (*csi.ProbeResponse, error)
- func (p *Plugin) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
- func (p *Plugin) Version() string
- type RequestHandler
- type RestClient
Constants ¶
const ( Version = "1.1" Provisioner = "csi.trident.netapp.io" LegacyProvisioner = "netapp.io/trident" // CSI supported features CSIBlockVolumes helpers.Feature = "CSI_BLOCK_VOLUMES" ExpandCSIVolumes helpers.Feature = "EXPAND_CSI_VOLUMES" )
const ( CSIController = "controller" CSINode = "node" CSIAllInOne = "allInOne" )
Variables ¶
This section is empty.
Functions ¶
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 ListNodesResponse ¶
type NonBlockingGRPCServer ¶
type NonBlockingGRPCServer interface { // Start services at the endpoint Start(endpoint string, ids csi.IdentityServer, cs csi.ControllerServer, ns csi.NodeServer) // GracefulStop Stops the service gracefully GracefulStop() // Stops the service forcefully Stop() }
NonBlockingGRPCServer Defines Non blocking GRPC server interfaces
func NewNonBlockingGRPCServer ¶
func NewNonBlockingGRPCServer() NonBlockingGRPCServer
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func NewAllInOnePlugin ¶
func NewAllInOnePlugin( nodeName, endpoint, caCert, clientCert, clientKey string, orchestrator core.Orchestrator, helper *helpers.HybridPlugin, ) (*Plugin, error)
The NewAllInOnePlugin is required to support the CSI Sanity test suite. CSI Sanity expects a single process to respond to controller, node, and identity interfaces.
func NewControllerPlugin ¶
func NewControllerPlugin( nodeName, endpoint string, orchestrator core.Orchestrator, helper *helpers.HybridPlugin, ) (*Plugin, error)
func NewNodePlugin ¶
func NewNodePlugin( nodeName, endpoint, caCert, clientCert, clientKey string, orchestrator core.Orchestrator, ) (*Plugin, error)
func (*Plugin) ControllerExpandVolume ¶
func (p *Plugin) ControllerExpandVolume( ctx context.Context, req *csi.ControllerExpandVolumeRequest, ) (*csi.ControllerExpandVolumeResponse, error)
func (*Plugin) ControllerGetCapabilities ¶
func (p *Plugin) ControllerGetCapabilities( ctx context.Context, req *csi.ControllerGetCapabilitiesRequest, ) (*csi.ControllerGetCapabilitiesResponse, error)
func (*Plugin) ControllerPublishVolume ¶
func (p *Plugin) ControllerPublishVolume( ctx context.Context, req *csi.ControllerPublishVolumeRequest, ) (*csi.ControllerPublishVolumeResponse, error)
func (*Plugin) ControllerUnpublishVolume ¶
func (p *Plugin) ControllerUnpublishVolume( ctx context.Context, req *csi.ControllerUnpublishVolumeRequest, ) (*csi.ControllerUnpublishVolumeResponse, error)
func (*Plugin) CreateSnapshot ¶
func (p *Plugin) CreateSnapshot( ctx context.Context, req *csi.CreateSnapshotRequest, ) (*csi.CreateSnapshotResponse, error)
func (*Plugin) CreateVolume ¶
func (p *Plugin) CreateVolume( ctx context.Context, req *csi.CreateVolumeRequest, ) (*csi.CreateVolumeResponse, error)
func (*Plugin) Deactivate ¶
func (*Plugin) DeleteSnapshot ¶
func (p *Plugin) DeleteSnapshot( ctx context.Context, req *csi.DeleteSnapshotRequest, ) (*csi.DeleteSnapshotResponse, error)
func (*Plugin) DeleteVolume ¶
func (p *Plugin) DeleteVolume( ctx context.Context, req *csi.DeleteVolumeRequest, ) (*csi.DeleteVolumeResponse, error)
func (*Plugin) GetCapacity ¶
func (p *Plugin) GetCapacity( ctx context.Context, req *csi.GetCapacityRequest, ) (*csi.GetCapacityResponse, error)
func (*Plugin) GetPluginCapabilities ¶
func (p *Plugin) GetPluginCapabilities( ctx context.Context, req *csi.GetPluginCapabilitiesRequest, ) (*csi.GetPluginCapabilitiesResponse, error)
func (*Plugin) GetPluginInfo ¶
func (p *Plugin) GetPluginInfo( ctx context.Context, req *csi.GetPluginInfoRequest, ) (*csi.GetPluginInfoResponse, error)
func (*Plugin) ListSnapshots ¶
func (p *Plugin) ListSnapshots( ctx context.Context, req *csi.ListSnapshotsRequest, ) (*csi.ListSnapshotsResponse, error)
func (*Plugin) ListVolumes ¶
func (p *Plugin) ListVolumes( ctx context.Context, req *csi.ListVolumesRequest, ) (*csi.ListVolumesResponse, error)
func (*Plugin) NodeExpandVolume ¶
func (p *Plugin) NodeExpandVolume( ctx context.Context, req *csi.NodeExpandVolumeRequest, ) (*csi.NodeExpandVolumeResponse, error)
The CO only calls NodeExpandVolume for the Block protocol as the filesystem has to be mounted to perform the resize. This is enforced in our ControllerExpandVolume method where we return true for nodeExpansionRequired when the protocol is Block and return false when the protocol is file.
func (*Plugin) NodeGetCapabilities ¶
func (p *Plugin) NodeGetCapabilities( ctx context.Context, req *csi.NodeGetCapabilitiesRequest, ) (*csi.NodeGetCapabilitiesResponse, error)
func (*Plugin) NodeGetInfo ¶
func (p *Plugin) NodeGetInfo( ctx context.Context, req *csi.NodeGetInfoRequest, ) (*csi.NodeGetInfoResponse, error)
func (*Plugin) NodeGetVolumeStats ¶
func (p *Plugin) NodeGetVolumeStats( ctx context.Context, req *csi.NodeGetVolumeStatsRequest, ) (*csi.NodeGetVolumeStatsResponse, error)
func (*Plugin) NodePublishVolume ¶
func (p *Plugin) NodePublishVolume( ctx context.Context, req *csi.NodePublishVolumeRequest, ) (*csi.NodePublishVolumeResponse, error)
func (*Plugin) NodeStageVolume ¶
func (p *Plugin) NodeStageVolume( ctx context.Context, req *csi.NodeStageVolumeRequest, ) (*csi.NodeStageVolumeResponse, error)
func (*Plugin) NodeUnpublishVolume ¶
func (p *Plugin) NodeUnpublishVolume( ctx context.Context, req *csi.NodeUnpublishVolumeRequest, ) (*csi.NodeUnpublishVolumeResponse, error)
func (*Plugin) NodeUnstageVolume ¶
func (p *Plugin) NodeUnstageVolume( ctx context.Context, req *csi.NodeUnstageVolumeRequest, ) (*csi.NodeUnstageVolumeResponse, error)
func (*Plugin) Probe ¶
func (p *Plugin) Probe( ctx context.Context, req *csi.ProbeRequest, ) (*csi.ProbeResponse, error)
func (*Plugin) ValidateVolumeCapabilities ¶
func (p *Plugin) ValidateVolumeCapabilities( ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest, ) (*csi.ValidateVolumeCapabilitiesResponse, error)
type RequestHandler ¶
type RestClient ¶
type RestClient struct {
// contains filtered or unexported fields
}
func CreateTLSRestClient ¶
func CreateTLSRestClient(url, caFile, certFile, keyFile string) (*RestClient, error)
func (*RestClient) CreateNode ¶
func (c *RestClient) CreateNode(node *utils.Node) error
CreateNode registers the node with the CSI controller server
func (*RestClient) DeleteNode ¶
func (c *RestClient) DeleteNode(name string) error
DeleteNode deregisters the node with the CSI controller server
func (*RestClient) GetNodes ¶
func (c *RestClient) GetNodes() ([]string, error)
GetNodes returns a list of nodes registered with the controller
func (*RestClient) InvokeAPI ¶
func (c *RestClient) InvokeAPI(requestBody []byte, method string, resourcePath string) (*http.Response, []byte, error)
InvokeAPI makes a REST call to the CSI Controller REST endpoint. The body must be a marshaled JSON byte array ( or nil). The method is the HTTP verb (i.e. GET, POST, ...). The resource path is appended to the base URL to identify the desired server resource; it should start with '/'.