Documentation ¶
Overview ¶
Package csi is CSI driver interface for OSD Copyright 2017 Portworx
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package csi is CSI driver interface for OSD Copyright 2017 Portworx
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package csi is CSI driver interface for OSD Copyright 2017 Portworx
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package csi is CSI driver interface for OSD Copyright 2017 Portworx
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package csi is CSI driver interface for OSD Copyright 2017 Portworx
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- type OsdCsiServer
- func (s *OsdCsiServer) Address() string
- func (s *OsdCsiServer) ControllerGetCapabilities(ctx context.Context, req *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
- func (s *OsdCsiServer) ControllerPublishVolume(context.Context, *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
- func (s *OsdCsiServer) ControllerUnpublishVolume(context.Context, *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
- func (s *OsdCsiServer) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
- func (s *OsdCsiServer) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
- func (s *OsdCsiServer) GetNodeID(ctx context.Context, req *csi.GetNodeIDRequest) (*csi.GetNodeIDResponse, error)
- func (s *OsdCsiServer) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
- func (s *OsdCsiServer) GetSupportedVersions(context.Context, *csi.GetSupportedVersionsRequest) (*csi.GetSupportedVersionsResponse, error)
- func (s *OsdCsiServer) IsRunning() bool
- func (s *OsdCsiServer) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
- func (s *OsdCsiServer) NodeGetCapabilities(ctx context.Context, req *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
- func (s *OsdCsiServer) NodeProbe(ctx context.Context, req *csi.NodeProbeRequest) (*csi.NodeProbeResponse, error)
- func (s *OsdCsiServer) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
- func (s *OsdCsiServer) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
- func (s *OsdCsiServer) Start() error
- func (s *OsdCsiServer) Stop()
- func (s *OsdCsiServer) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
- type OsdCsiServerConfig
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OsdCsiServer ¶
type OsdCsiServer struct { Server // contains filtered or unexported fields }
OsdCsiServer is a OSD CSI compliant server which proxies CSI requests for a single specific driver
func (*OsdCsiServer) Address ¶
func (s *OsdCsiServer) Address() string
Address returns the address of the server which can be used by clients to connect.
func (*OsdCsiServer) ControllerGetCapabilities ¶
func (s *OsdCsiServer) ControllerGetCapabilities( ctx context.Context, req *csi.ControllerGetCapabilitiesRequest, ) (*csi.ControllerGetCapabilitiesResponse, error)
ControllerGetCapabilities is a CSI API functions which returns to the caller the capabilities of the OSD CSI driver.
func (*OsdCsiServer) ControllerPublishVolume ¶
func (s *OsdCsiServer) ControllerPublishVolume( context.Context, *csi.ControllerPublishVolumeRequest, ) (*csi.ControllerPublishVolumeResponse, error)
ControllerPublishVolume is a CSI API implements the attachment of a volume on to a node.
func (*OsdCsiServer) ControllerUnpublishVolume ¶
func (s *OsdCsiServer) ControllerUnpublishVolume( context.Context, *csi.ControllerUnpublishVolumeRequest, ) (*csi.ControllerUnpublishVolumeResponse, error)
ControllerUnpublishVolume is a CSI API which implements the detaching of a volume onto a node.
func (*OsdCsiServer) CreateVolume ¶
func (s *OsdCsiServer) CreateVolume( ctx context.Context, req *csi.CreateVolumeRequest, ) (*csi.CreateVolumeResponse, error)
CreateVolume is a CSI API which creates a volume on OSD This function supports snapshots if the parent volume id is supplied in the parameters.
func (*OsdCsiServer) DeleteVolume ¶
func (s *OsdCsiServer) DeleteVolume( ctx context.Context, req *csi.DeleteVolumeRequest, ) (*csi.DeleteVolumeResponse, error)
DeleteVolume is a CSI API which deletes a volume
func (*OsdCsiServer) GetNodeID ¶
func (s *OsdCsiServer) GetNodeID(ctx context.Context, req *csi.GetNodeIDRequest) (*csi.GetNodeIDResponse, error)
GetNodeID is a CSI API which gets the PX NodeId for the local node
func (*OsdCsiServer) GetPluginInfo ¶
func (s *OsdCsiServer) GetPluginInfo( ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
GetPluginInfo is a CSI API which returns the information about the plugin. This includes name, version, and any other OSD specific information
func (*OsdCsiServer) GetSupportedVersions ¶
func (s *OsdCsiServer) GetSupportedVersions( context.Context, *csi.GetSupportedVersionsRequest) (*csi.GetSupportedVersionsResponse, error)
GetSupportedVersions is a CSI API which returns the supported CSI version
func (*OsdCsiServer) IsRunning ¶
func (s *OsdCsiServer) IsRunning() bool
IsRunning returns true if the server is currently running
func (*OsdCsiServer) ListVolumes ¶
func (s *OsdCsiServer) ListVolumes( ctx context.Context, req *csi.ListVolumesRequest, ) (*csi.ListVolumesResponse, error)
ListVolumes is a CSI API which returns to the caller all volume ids on this cluster. This includes ids created by CSI and ids created using other interfaces. This is important because the user could be requesting to mount a OSD volume created using non-CSI interfaces.
This call does not yet implement tokens to due to the following issue: https://github.com/container-storage-interface/spec/issues/138
func (*OsdCsiServer) NodeGetCapabilities ¶
func (s *OsdCsiServer) NodeGetCapabilities( ctx context.Context, req *csi.NodeGetCapabilitiesRequest, ) (*csi.NodeGetCapabilitiesResponse, error)
NodeGetCapabilities is a CSI API function which seems to be setup for future patches
func (*OsdCsiServer) NodeProbe ¶
func (s *OsdCsiServer) NodeProbe( ctx context.Context, req *csi.NodeProbeRequest, ) (*csi.NodeProbeResponse, error)
NodeProbe is a CSI API function which asks the driver to check if the node has all the necessary components to run successfully.
func (*OsdCsiServer) NodePublishVolume ¶
func (s *OsdCsiServer) NodePublishVolume( ctx context.Context, req *csi.NodePublishVolumeRequest, ) (*csi.NodePublishVolumeResponse, error)
NodePublishVolume is a CSI API call which mounts the volume on the specified target path on the node.
TODO: Support READ ONLY Mounts
func (*OsdCsiServer) NodeUnpublishVolume ¶
func (s *OsdCsiServer) NodeUnpublishVolume( ctx context.Context, req *csi.NodeUnpublishVolumeRequest, ) (*csi.NodeUnpublishVolumeResponse, error)
NodeUnpublishVolume is a CSI API call which unmounts the volume.
func (*OsdCsiServer) Start ¶
func (s *OsdCsiServer) Start() error
Start is used to start the server. It will return an error if the server is already running.
func (*OsdCsiServer) Stop ¶
func (s *OsdCsiServer) Stop()
Stop is used to stop the gRPC CSI complient server. It can be called multiple times. It does nothing if the server has already been stopped.
func (*OsdCsiServer) ValidateVolumeCapabilities ¶
func (s *OsdCsiServer) ValidateVolumeCapabilities( ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest, ) (*csi.ValidateVolumeCapabilitiesResponse, error)
ValidateVolumeCapabilities is a CSI API used by container orchestration systems to make sure a volume specification is validiated by the CSI driver. Note: The method used here to return errors is still not part of the spec. See: https://github.com/container-storage-interface/spec/pull/115 Discussion: https://groups.google.com/forum/#!topic/kubernetes-sig-storage-wg-csi/TpTrNFbRa1I
type OsdCsiServerConfig ¶
type OsdCsiServerConfig struct { Net string Address string DriverName string Cluster cluster.Cluster }
OsdCsiServerConfig provides the configuration to the the gRPC CSI server created by NewOsdCsiServer()
type Server ¶
type Server interface { csi.ControllerServer csi.IdentityServer csi.NodeServer // Start the server. If called on a running server it will return an error. Start() error // Stop the server. If called on a stopped server it will have no effect Stop() // IsRunning tell the caller if the server is currently running IsRunning() bool // Address returns the address used by clients to connect to the server Address() string }
Server is an interface to a CSI Compatible gRPC server which implements not only the CSI spec APIs but also server management APIs.
func NewOsdCsiServer ¶
func NewOsdCsiServer(config *OsdCsiServerConfig) (Server, error)
NewOsdCsiServer creates a gRPC CSI complient server on the specified port and transport.