@@ -79,6 +79,7 @@ type controller struct {
79
79
authMgr common.AuthorizationService
80
80
authMgrs map [string ]* common.AuthManager
81
81
topologyMgr commoncotypes.ControllerTopologyService
82
+ csi.UnimplementedControllerServer
82
83
}
83
84
84
85
var (
@@ -2005,7 +2006,7 @@ func (c *controller) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequ
2005
2006
volumeType := prometheus .PrometheusUnknownVolumeType
2006
2007
createVolumeInternal := func () (
2007
2008
* csi.CreateVolumeResponse , string , error ) {
2008
- log .Infof ("CreateVolume: called with args %+v" , * req )
2009
+ log .Infof ("CreateVolume: called with args %+v" , req )
2009
2010
// TODO: If the err is returned by invoking CNS API, then faultType should be
2010
2011
// populated by the underlying layer.
2011
2012
// If the request failed due to validate the request, "csi.fault.InvalidArgument" will be return.
@@ -2098,7 +2099,7 @@ func (c *controller) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequ
2098
2099
2099
2100
deleteVolumeInternal := func () (
2100
2101
* csi.DeleteVolumeResponse , string , error ) {
2101
- log .Infof ("DeleteVolume: called with args: %+v" , * req )
2102
+ log .Infof ("DeleteVolume: called with args: %+v" , req )
2102
2103
// TODO: If the err is returned by invoking CNS API, then faultType should be
2103
2104
// populated by the underlying layer.
2104
2105
// If the request failed due to validate the request, "csi.fault.InvalidArgument" will be return.
@@ -2241,7 +2242,7 @@ func (c *controller) ControllerPublishVolume(ctx context.Context, req *csi.Contr
2241
2242
2242
2243
controllerPublishVolumeInternal := func () (
2243
2244
* csi.ControllerPublishVolumeResponse , string , error ) {
2244
- log .Infof ("ControllerPublishVolume: called with args %+v" , * req )
2245
+ log .Infof ("ControllerPublishVolume: called with args %+v" , req )
2245
2246
// TODO: If the err is returned by invoking CNS API, then faultType should be
2246
2247
// populated by the underlying layer.
2247
2248
// If the request failed due to validate the request, "csi.fault.InvalidArgument" will be return.
@@ -2252,7 +2253,7 @@ func (c *controller) ControllerPublishVolume(ctx context.Context, req *csi.Contr
2252
2253
if err != nil {
2253
2254
2254
2255
return nil , csifault .CSIInvalidArgumentFault , logger .LogNewErrorCodef (log , codes .Internal ,
2255
- "validation for PublishVolume Request: %+v has failed. Error: %v" , * req , err )
2256
+ "validation for PublishVolume Request: %+v has failed. Error: %v" , req , err )
2256
2257
}
2257
2258
publishInfo := make (map [string ]string )
2258
2259
_ , volumeManager , err := getVCenterAndVolumeManagerForVolumeID (ctx , c , req .VolumeId , volumeInfoService )
@@ -2389,7 +2390,7 @@ func (c *controller) ControllerUnpublishVolume(ctx context.Context, req *csi.Con
2389
2390
controllerUnpublishVolumeInternal := func () (
2390
2391
* csi.ControllerUnpublishVolumeResponse , string , error ) {
2391
2392
var faultType string
2392
- log .Infof ("ControllerUnpublishVolume: called with args %+v" , * req )
2393
+ log .Infof ("ControllerUnpublishVolume: called with args %+v" , req )
2393
2394
// TODO: If the err is returned by invoking CNS API, then faultType should be
2394
2395
// populated by the underlying layer.
2395
2396
// If the request failed due to validate the request, "csi.fault.InvalidArgument" will be return.
@@ -2399,7 +2400,7 @@ func (c *controller) ControllerUnpublishVolume(ctx context.Context, req *csi.Con
2399
2400
err := validateVanillaControllerUnpublishVolumeRequest (ctx , req )
2400
2401
if err != nil {
2401
2402
return nil , csifault .CSIInvalidArgumentFault , logger .LogNewErrorCodef (log , codes .Internal ,
2402
- "validation for UnpublishVolume Request: %+v has failed. Error: %v" , * req , err )
2403
+ "validation for UnpublishVolume Request: %+v has failed. Error: %v" , req , err )
2403
2404
}
2404
2405
2405
2406
_ , volumeManager , err := getVCenterAndVolumeManagerForVolumeID (ctx , c , req .VolumeId , volumeInfoService )
@@ -2532,7 +2533,7 @@ func (c *controller) ControllerExpandVolume(ctx context.Context, req *csi.Contro
2532
2533
faultType string
2533
2534
)
2534
2535
2535
- log .Infof ("ControllerExpandVolume: called with args %+v" , * req )
2536
+ log .Infof ("ControllerExpandVolume: called with args %+v" , req )
2536
2537
// TODO: If the err is returned by invoking CNS API, then faultType should be
2537
2538
// populated by the underlying layer.
2538
2539
// If the request failed due to validate the request, "csi.fault.InvalidArgument" will be return.
@@ -2569,7 +2570,8 @@ func (c *controller) ControllerExpandVolume(ctx context.Context, req *csi.Contro
2569
2570
isOnlineExpansionEnabled := commonco .ContainerOrchestratorUtility .IsFSSEnabled (ctx , common .OnlineVolumeExtend )
2570
2571
err = validateVanillaControllerExpandVolumeRequest (ctx , req , isOnlineExpansionEnabled , isOnlineExpansionSupported )
2571
2572
if err != nil {
2572
- msg := fmt .Sprintf ("validation for ExpandVolume Request: %+v has failed. Error: %v" , * req , err )
2573
+ msg := fmt .Sprintf ("validation for ExpandVolume Request: %+v has failed. Error: %v" ,
2574
+ req , err )
2573
2575
log .Error (msg )
2574
2576
return nil , csifault .CSIInternalFault , err
2575
2577
}
@@ -2654,7 +2656,7 @@ func (c *controller) ValidateVolumeCapabilities(ctx context.Context, req *csi.Va
2654
2656
* csi.ValidateVolumeCapabilitiesResponse , error ) {
2655
2657
ctx = logger .NewContextWithLogger (ctx )
2656
2658
log := logger .GetLogger (ctx )
2657
- log .Infof ("ControllerGetCapabilities: called with args %+v" , * req )
2659
+ log .Infof ("ControllerGetCapabilities: called with args %+v" , req )
2658
2660
volCaps := req .GetVolumeCapabilities ()
2659
2661
var confirmed * csi.ValidateVolumeCapabilitiesResponse_Confirmed
2660
2662
if err := common .IsValidVolumeCapabilities (ctx , volCaps ); err == nil {
@@ -2686,7 +2688,7 @@ func (c *controller) ListVolumes(ctx context.Context, req *csi.ListVolumesReques
2686
2688
}
2687
2689
2688
2690
listVolumesInternal := func () (* csi.ListVolumesResponse , string , error ) {
2689
- log .Debugf ("ListVolumes: called with args %+v" , * req )
2691
+ log .Debugf ("ListVolumes: called with args %+v" , req )
2690
2692
2691
2693
startingToken := 0
2692
2694
if req .StartingToken != "" {
@@ -2918,7 +2920,7 @@ func (c *controller) GetCapacity(ctx context.Context, req *csi.GetCapacityReques
2918
2920
* csi.GetCapacityResponse , error ) {
2919
2921
ctx = logger .NewContextWithLogger (ctx )
2920
2922
log := logger .GetLogger (ctx )
2921
- log .Infof ("GetCapacity: called with args %+v" , * req )
2923
+ log .Infof ("GetCapacity: called with args %+v" , req )
2922
2924
return nil , logger .LogNewErrorCode (log , codes .Unimplemented , "getCapacity" )
2923
2925
}
2924
2926
@@ -2962,7 +2964,7 @@ func (c *controller) ControllerGetCapabilities(ctx context.Context, req *csi.Con
2962
2964
* csi.ControllerGetCapabilitiesResponse , error ) {
2963
2965
ctx = logger .NewContextWithLogger (ctx )
2964
2966
log := logger .GetLogger (ctx )
2965
- log .Infof ("ControllerGetCapabilities: called with args %+v" , * req )
2967
+ log .Infof ("ControllerGetCapabilities: called with args %+v" , req )
2966
2968
2967
2969
controllerCaps := []csi.ControllerServiceCapability_RPC_Type {
2968
2970
csi .ControllerServiceCapability_RPC_CREATE_DELETE_VOLUME ,
@@ -3003,7 +3005,7 @@ func (c *controller) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshot
3003
3005
granularMaxSnapshotsPerBlockVolumeInVSAN int
3004
3006
granularMaxSnapshotsPerBlockVolumeInVVOL int
3005
3007
)
3006
- log .Infof ("CreateSnapshot: called with args %+v" , * req )
3008
+ log .Infof ("CreateSnapshot: called with args %+v" , req )
3007
3009
3008
3010
isBlockVolumeSnapshotEnabled := commonco .ContainerOrchestratorUtility .IsFSSEnabled (ctx , common .BlockVolumeSnapshot )
3009
3011
if ! isBlockVolumeSnapshotEnabled {
@@ -3033,7 +3035,7 @@ func (c *controller) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshot
3033
3035
// Validate CreateSnapshotRequest
3034
3036
if err := validateVanillaCreateSnapshotRequestRequest (ctx , req ); err != nil {
3035
3037
return nil , logger .LogNewErrorCodef (log , codes .Internal ,
3036
- "validation for CreateSnapshot Request: %+v has failed. Error: %v" , * req , err )
3038
+ "validation for CreateSnapshot Request: %+v has failed. Error: %v" , req , err )
3037
3039
}
3038
3040
3039
3041
// Check if the source volume is migrated vSphere volume
@@ -3174,7 +3176,7 @@ func (c *controller) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshot
3174
3176
volumeManager cnsvolume.Manager
3175
3177
err error
3176
3178
)
3177
- log .Infof ("DeleteSnapshot: called with args %+v" , * req )
3179
+ log .Infof ("DeleteSnapshot: called with args %+v" , req )
3178
3180
3179
3181
isBlockVolumeSnapshotEnabled :=
3180
3182
commonco .ContainerOrchestratorUtility .IsFSSEnabled (ctx , common .BlockVolumeSnapshot )
@@ -3250,7 +3252,7 @@ func (c *controller) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsRe
3250
3252
nextToken string
3251
3253
err error
3252
3254
)
3253
- log .Infof ("ListSnapshots: called with args %+v" , * req )
3255
+ log .Infof ("ListSnapshots: called with args %+v" , req )
3254
3256
err = validateVanillaListSnapshotRequest (ctx , req )
3255
3257
if err != nil {
3256
3258
return nil , err
@@ -3525,14 +3527,14 @@ func (c *controller) ControllerGetVolume(ctx context.Context, req *csi.Controlle
3525
3527
* csi.ControllerGetVolumeResponse , error ) {
3526
3528
ctx = logger .NewContextWithLogger (ctx )
3527
3529
log := logger .GetLogger (ctx )
3528
- log .Infof ("ControllerGetVolume: called with args %+v" , * req )
3530
+ log .Infof ("ControllerGetVolume: called with args %+v" , req )
3529
3531
return nil , logger .LogNewErrorCode (log , codes .Unimplemented , "controllerGetVolume" )
3530
3532
}
3531
3533
3532
3534
func (c * controller ) ControllerModifyVolume (ctx context.Context , req * csi.ControllerModifyVolumeRequest ) (
3533
3535
* csi.ControllerModifyVolumeResponse , error ) {
3534
3536
ctx = logger .NewContextWithLogger (ctx )
3535
3537
log := logger .GetLogger (ctx )
3536
- log .Infof ("ControllerModifyVolume: called with args %+v" , * req )
3538
+ log .Infof ("ControllerModifyVolume: called with args %+v" , req )
3537
3539
return nil , logger .LogNewErrorCode (log , codes .Unimplemented , "ControllerModifyVolume" )
3538
3540
}
0 commit comments