mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-17 20:00:23 +00:00
Fix unparam issues
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
This commit is contained in:
parent
284c5801c3
commit
36f99e36ca
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user