Skip to content

Commit

Permalink
incorporate review comments
Browse files Browse the repository at this point in the history
Signed-off-by: sonasingh46 <sonasingh46@gmail.com>
  • Loading branch information
sonasingh46 committed Dec 19, 2018
1 parent accaa57 commit 351f4fc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cmd/maya-apiserver/spc-watcher/handler.go
Expand Up @@ -19,11 +19,11 @@ package spc
import (
"github.com/golang/glog"
apis "github.com/openebs/maya/pkg/apis/openebs.io/v1alpha1"
"github.com/pkg/errors"
k8serror "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/client-go/tools/cache"
"github.com/pkg/errors"
)

// syncHandler compares the actual state with the desired, and attempts to
Expand Down
2 changes: 1 addition & 1 deletion cmd/maya-apiserver/spc-watcher/select_disk.go
Expand Up @@ -19,9 +19,9 @@ package spc
import (
mach_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
//openebs "github.com/openebs/maya/pkg/client/clientset/versioned"
"github.com/pkg/errors"
"github.com/openebs/maya/pkg/apis/openebs.io/v1alpha1"
openebs "github.com/openebs/maya/pkg/client/generated/clientset/internalclientset"
"github.com/pkg/errors"
"k8s.io/apimachinery/pkg/util/runtime"
)

Expand Down
8 changes: 4 additions & 4 deletions cmd/maya-apiserver/spc-watcher/storagepool_create.go
Expand Up @@ -22,8 +22,8 @@ import (
apis "github.com/openebs/maya/pkg/apis/openebs.io/v1alpha1"
"github.com/openebs/maya/pkg/client/k8s"
"github.com/openebs/maya/pkg/storagepool"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"github.com/pkg/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// Cas template is a custom resource which has a list of runTasks.
Expand Down Expand Up @@ -74,7 +74,7 @@ func poolCreateWorker(pool *apis.CasPool) error {

storagepoolOps, err := storagepool.NewCasPoolOperation(pool)
if err != nil {
return errors.Wrapf(err, "NewCasPoolOperation failed error '%s'")
return errors.Wrapf(err, "NewCasPoolOperation failed error")
}
_, err = storagepoolOps.Create()
if err != nil {
Expand Down Expand Up @@ -119,7 +119,7 @@ func (newClientSet *clientSet) casPoolBuilder(casPool *apis.CasPool, spc *apis.S
for _, v := range nodeDisks.disks.diskList {
gotDisk, err := newClientSet.oecs.OpenebsV1alpha1().Disks().Get(v, metav1.GetOptions{})
if err != nil {
return nil, errors.Wrapf(err,"Failed to get device id for disk:failed to list the disks")
return nil, errors.Wrapf(err, "Failed to get device id for disk:failed to list the disks")
}
if len(gotDisk.Spec.DevLinks) != 0 && len(gotDisk.Spec.DevLinks[0].Links) != 0 {
// Fill device Id of the disk to the CasPool object.
Expand All @@ -136,4 +136,4 @@ func (newClientSet *clientSet) casPoolBuilder(casPool *apis.CasPool, spc *apis.S
// Fill the disks attached to this node to the CasPool object.
casPool.DiskList = nodeDisks.disks.diskList
return casPool, nil
}
}

0 comments on commit 351f4fc

Please sign in to comment.