Skip to content

Commit 291bf0b

Browse files
committed
cleanup: remove unused code
fix
1 parent cbd5318 commit 291bf0b

10 files changed

+43
-643
lines changed

pkg/blob/blob.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,6 @@ type DriverOptions struct {
131131
type Driver struct {
132132
csicommon.CSIDriver
133133

134-
// Embed these structs to inherit interfaces implementation from csicommon
135-
// Each of them contains a pointer to CSIDriver struct
136-
csicommon.DefaultIdentityServer
137-
csicommon.DefaultControllerServer
138-
csicommon.DefaultNodeServer
139-
140134
cloud *azure.Cloud
141135
cloudConfigSecretName string
142136
cloudConfigSecretNamespace string
@@ -187,10 +181,6 @@ func NewDriver(options *DriverOptions) *Driver {
187181
d.Version = driverVersion
188182
d.NodeID = options.NodeID
189183

190-
d.DefaultControllerServer.Driver = &d.CSIDriver
191-
d.DefaultIdentityServer.Driver = &d.CSIDriver
192-
d.DefaultNodeServer.Driver = &d.CSIDriver
193-
194184
var err error
195185
getter := func(key string) (interface{}, error) { return nil, nil }
196186
if d.accountSearchCache, err = azcache.NewTimedcache(time.Minute, getter); err != nil {

pkg/blob/controllerserver.go

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,44 @@ func (d *Driver) ValidateVolumeCapabilities(ctx context.Context, req *csi.Valida
421421
}, nil
422422
}
423423

424+
func (d *Driver) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error) {
425+
return nil, status.Error(codes.Unimplemented, "ControllerPublishVolume is not yet implemented")
426+
}
427+
428+
func (d *Driver) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error) {
429+
return nil, status.Error(codes.Unimplemented, "ControllerUnpublishVolume is not yet implemented")
430+
}
431+
432+
// ControllerGetVolume get volume
433+
func (d *Driver) ControllerGetVolume(context.Context, *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error) {
434+
return nil, status.Error(codes.Unimplemented, "ControllerGetVolume is not yet implemented")
435+
}
436+
437+
// GetCapacity returns the capacity of the total available storage pool
438+
func (d *Driver) GetCapacity(ctx context.Context, req *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error) {
439+
return nil, status.Error(codes.Unimplemented, "GetCapacity is not yet implemented")
440+
}
441+
442+
// ListVolumes return all available volumes
443+
func (d *Driver) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error) {
444+
return nil, status.Error(codes.Unimplemented, "ListVolumes is not yet implemented")
445+
}
446+
447+
// CreateSnapshot create snapshot
448+
func (d *Driver) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error) {
449+
return nil, status.Error(codes.Unimplemented, "CreateSnapshot is not yet implemented")
450+
}
451+
452+
// DeleteSnapshot delete snapshot
453+
func (d *Driver) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error) {
454+
return nil, status.Error(codes.Unimplemented, "DeleteSnapshot is not yet implemented")
455+
}
456+
457+
// ListSnapshots list snapshots
458+
func (d *Driver) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error) {
459+
return nil, status.Error(codes.Unimplemented, "ListSnapshots is not yet implemented")
460+
}
461+
424462
// ControllerGetCapabilities returns the capabilities of the Controller plugin
425463
func (d *Driver) ControllerGetCapabilities(ctx context.Context, req *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error) {
426464
return &csi.ControllerGetCapabilitiesResponse{

pkg/blob/nodeserver.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,11 @@ func (d *Driver) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoRequest) (
381381
}, nil
382382
}
383383

384+
// NodeExpandVolume node expand volume
385+
func (d *Driver) NodeExpandVolume(ctx context.Context, req *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error) {
386+
return nil, status.Error(codes.Unimplemented, "NodeExpandVolume is not yet implemented")
387+
}
388+
384389
// NodeGetVolumeStats get volume stats
385390
func (d *Driver) NodeGetVolumeStats(ctx context.Context, req *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error) {
386391
if len(req.VolumeId) == 0 {

pkg/csi-common/controllerserver-default.go

Lines changed: 0 additions & 99 deletions
This file was deleted.

pkg/csi-common/controllerserver-default_test.go

Lines changed: 0 additions & 196 deletions
This file was deleted.

0 commit comments

Comments
 (0)