Skip to content

Commit

Permalink
fix opensds version
Browse files Browse the repository at this point in the history
  • Loading branch information
jackhaibo committed Jul 11, 2019
1 parent d92821d commit 352c266
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@

[[constraint]]
name = "github.com/kubernetes-csi/csi-test"
version = "v1.1.0"
version = "1.1.0"

[prune]
non-go = true
Expand Down
7 changes: 3 additions & 4 deletions csi/server/plugin/opensds/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ func (p *Plugin) CreateVolume(

func checkInputParameters(params map[string]string) error {
if params == nil {
return errors.New("volume creation parameters cannot be nil")
return errors.New("input parameters cannot be nil")
}

keyList := []string{ParamProfile, ParamEnableReplication, ParamSecondaryAZ, PublishAttachMode, StorageType}

for k, _ := range params {
if !util.Contained(k, keyList) {
return fmt.Errorf("invalid volume creation paramter key: %s. It should be one of %s,%s,%s,%s,%s",
return fmt.Errorf("invalid input paramter key: %s. It should be one of %s,%s,%s,%s,%s",
k, ParamProfile, ParamEnableReplication, ParamSecondaryAZ, PublishAttachMode, StorageType)
}
}
Expand Down Expand Up @@ -148,7 +148,7 @@ func (p *Plugin) ControllerPublishVolume(ctx context.Context,
return nil, status.Error(codes.InvalidArgument, msg)
}

if req.GetNodeId() == "" {
if req.NodeId == "" {
msg := "node ID must be provided"
glog.Error(msg)
return nil, status.Error(codes.InvalidArgument, msg)
Expand Down Expand Up @@ -540,7 +540,6 @@ func (p *Plugin) ListSnapshots(

filterResult = snapshotsFilterById
break
case (0 != snapshotIDLen) && (0 != sourceVolumeIdLen):
case (0 != snapshotIDLen) && (0 != sourceVolumeIdLen):
for _, snapshot := range snapshotsFilterById {
if snapshot.VolumeId == sourceVolumeId {
Expand Down

0 comments on commit 352c266

Please sign in to comment.