mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-22 06:10:22 +00:00
util: remove unimplemented methods
As we are using UnimplementedControllerServer we dont need to implement mock methods. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
e5d2d3eeb4
commit
b062479012
@ -28,40 +28,8 @@ import (
|
||||
|
||||
// DefaultControllerServer points to default driver.
|
||||
type DefaultControllerServer struct {
|
||||
Driver *CSIDriver
|
||||
csi.UnimplementedControllerServer
|
||||
}
|
||||
|
||||
// ControllerPublishVolume publish volume on node.
|
||||
func (cs *DefaultControllerServer) ControllerPublishVolume(
|
||||
ctx context.Context,
|
||||
req *csi.ControllerPublishVolumeRequest,
|
||||
) (*csi.ControllerPublishVolumeResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "")
|
||||
}
|
||||
|
||||
// ControllerUnpublishVolume unpublish on node.
|
||||
func (cs *DefaultControllerServer) ControllerUnpublishVolume(
|
||||
ctx context.Context,
|
||||
req *csi.ControllerUnpublishVolumeRequest,
|
||||
) (*csi.ControllerUnpublishVolumeResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "")
|
||||
}
|
||||
|
||||
// ListVolumes lists volumes.
|
||||
func (cs *DefaultControllerServer) ListVolumes(
|
||||
ctx context.Context,
|
||||
req *csi.ListVolumesRequest,
|
||||
) (*csi.ListVolumesResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "")
|
||||
}
|
||||
|
||||
// GetCapacity get volume capacity.
|
||||
func (cs *DefaultControllerServer) GetCapacity(
|
||||
ctx context.Context,
|
||||
req *csi.GetCapacityRequest,
|
||||
) (*csi.GetCapacityResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "")
|
||||
Driver *CSIDriver
|
||||
}
|
||||
|
||||
// ControllerGetCapabilities implements the default GRPC callout.
|
||||
@ -79,19 +47,3 @@ func (cs *DefaultControllerServer) ControllerGetCapabilities(
|
||||
Capabilities: cs.Driver.capabilities,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// ListSnapshots lists snapshots.
|
||||
func (cs *DefaultControllerServer) ListSnapshots(
|
||||
ctx context.Context,
|
||||
req *csi.ListSnapshotsRequest,
|
||||
) (*csi.ListSnapshotsResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "")
|
||||
}
|
||||
|
||||
// ControllerGetVolume fetch volume information.
|
||||
func (cs *DefaultControllerServer) ControllerGetVolume(
|
||||
ctx context.Context,
|
||||
req *csi.ControllerGetVolumeRequest,
|
||||
) (*csi.ControllerGetVolumeResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "")
|
||||
}
|
||||
|
@ -28,8 +28,8 @@ import (
|
||||
|
||||
// DefaultIdentityServer stores driver object.
|
||||
type DefaultIdentityServer struct {
|
||||
Driver *CSIDriver
|
||||
csi.UnimplementedControllerServer
|
||||
Driver *CSIDriver
|
||||
}
|
||||
|
||||
// GetPluginInfo returns plugin information.
|
||||
|
@ -22,8 +22,6 @@ import (
|
||||
"github.com/ceph/ceph-csi/internal/util/log"
|
||||
|
||||
"github.com/container-storage-interface/spec/lib/go/csi"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
mount "k8s.io/mount-utils"
|
||||
)
|
||||
|
||||
@ -35,14 +33,6 @@ type DefaultNodeServer struct {
|
||||
Mounter mount.Interface
|
||||
}
|
||||
|
||||
// NodeExpandVolume returns unimplemented response.
|
||||
func (ns *DefaultNodeServer) NodeExpandVolume(
|
||||
ctx context.Context,
|
||||
req *csi.NodeExpandVolumeRequest,
|
||||
) (*csi.NodeExpandVolumeResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "")
|
||||
}
|
||||
|
||||
// NodeGetInfo returns node ID.
|
||||
func (ns *DefaultNodeServer) NodeGetInfo(
|
||||
ctx context.Context,
|
||||
|
Loading…
Reference in New Issue
Block a user