Fix unparam issues

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
This commit is contained in:
Madhu Rajanna 2019-01-17 13:29:29 +05:30
parent 284c5801c3
commit 36f99e36ca
3 changed files with 5 additions and 4 deletions

View File

@ -96,7 +96,7 @@ func createCephUser(volOptions *volumeOptions, adminCr *credentials, volID volum
"osd", caps.Osd, "osd", caps.Osd,
} }
if err := execCommandJSON(&ents, "ceph", args[:]...); err != nil { if err := execCommandJSON(&ents, args[:]...); err != nil {
return nil, fmt.Errorf("error creating ceph user: %v", err) return nil, fmt.Errorf("error creating ceph user: %v", err)
} }

View File

@ -103,7 +103,7 @@ func (cs *ControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol
} }
func (cs *ControllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error) { func (cs *ControllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error) {
if err := cs.validateDeleteVolumeRequest(req); err != nil { if err := cs.validateDeleteVolumeRequest(); err != nil {
glog.Errorf("DeleteVolumeRequest validation failed: %v", err) glog.Errorf("DeleteVolumeRequest validation failed: %v", err)
return nil, err return nil, err
} }

View File

@ -53,7 +53,8 @@ func execCommandAndValidate(program string, args ...string) error {
return nil return nil
} }
func execCommandJSON(v interface{}, program string, args ...string) error { func execCommandJSON(v interface{}, args ...string) error {
program := "ceph"
out, err := execCommand(program, args...) out, err := execCommand(program, args...)
if err != nil { if err != nil {
@ -126,7 +127,7 @@ func (cs *ControllerServer) validateCreateVolumeRequest(req *csi.CreateVolumeReq
return nil return nil
} }
func (cs *ControllerServer) validateDeleteVolumeRequest(req *csi.DeleteVolumeRequest) error { func (cs *ControllerServer) validateDeleteVolumeRequest() error {
if err := cs.Driver.ValidateControllerServiceRequest(csi.ControllerServiceCapability_RPC_CREATE_DELETE_VOLUME); err != nil { if err := cs.Driver.ValidateControllerServiceRequest(csi.ControllerServiceCapability_RPC_CREATE_DELETE_VOLUME); err != nil {
return fmt.Errorf("invalid DeleteVolumeRequest: %v", err) return fmt.Errorf("invalid DeleteVolumeRequest: %v", err)
} }