From e07863e239c9712be392bb3c33a3bb877edfe03e Mon Sep 17 00:00:00 2001 From: Humble Chirammal Date: Mon, 24 Oct 2016 22:36:28 +0530 Subject: [PATCH] Update heketi dependency to release3. commit hash#28b5cc4cc6d2b9bdfa91ed1b93efaab4931aa697 Signed-off-by: Humble Chirammal --- Godeps/Godeps.json | 9 +++------ .../heketi/heketi/pkg/glusterfs/api/types.go | 1 + .../heketi/heketi/pkg/utils/bodystring.go | 3 ++- vendor/github.com/heketi/heketi/pkg/utils/log.go | 13 ++++++++++++- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index ce29d4f2a06..af77c0ff8ab 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1418,18 +1418,15 @@ }, { "ImportPath": "github.com/heketi/heketi/client/api/go-client", - "Comment": "v2.1.0-dev-2-gcb07059", - "Rev": "cb07059aed8760ef857a58d37598b9e51c36a9ae" + "Rev": "28b5cc4cc6d2b9bdfa91ed1b93efaab4931aa697" }, { "ImportPath": "github.com/heketi/heketi/pkg/glusterfs/api", - "Comment": "v2.1.0-dev-2-gcb07059", - "Rev": "cb07059aed8760ef857a58d37598b9e51c36a9ae" + "Rev": "28b5cc4cc6d2b9bdfa91ed1b93efaab4931aa697" }, { "ImportPath": "github.com/heketi/heketi/pkg/utils", - "Comment": "v2.1.0-dev-2-gcb07059", - "Rev": "cb07059aed8760ef857a58d37598b9e51c36a9ae" + "Rev": "28b5cc4cc6d2b9bdfa91ed1b93efaab4931aa697" }, { "ImportPath": "github.com/howeyc/gopass", diff --git a/vendor/github.com/heketi/heketi/pkg/glusterfs/api/types.go b/vendor/github.com/heketi/heketi/pkg/glusterfs/api/types.go index 8a1e094e503..45435ac178f 100644 --- a/vendor/github.com/heketi/heketi/pkg/glusterfs/api/types.go +++ b/vendor/github.com/heketi/heketi/pkg/glusterfs/api/types.go @@ -155,6 +155,7 @@ type VolumeCreateRequest struct { Clusters []string `json:"clusters,omitempty"` Name string `json:"name"` Durability VolumeDurabilityInfo `json:"durability,omitempty"` + Gid int64 `json:"gid,omitempty"` Snapshot struct { Enable bool `json:"enable"` Factor float32 `json:"factor"` diff --git a/vendor/github.com/heketi/heketi/pkg/utils/bodystring.go b/vendor/github.com/heketi/heketi/pkg/utils/bodystring.go index 5eff7be69fe..1b415157d13 100644 --- a/vendor/github.com/heketi/heketi/pkg/utils/bodystring.go +++ b/vendor/github.com/heketi/heketi/pkg/utils/bodystring.go @@ -21,6 +21,7 @@ import ( "io" "io/ioutil" "net/http" + "strings" ) // Return the body from a response as a string @@ -39,5 +40,5 @@ func GetErrorFromResponse(r *http.Response) error { if err != nil { return err } - return errors.New(s) + return errors.New(strings.TrimSpace(s)) } diff --git a/vendor/github.com/heketi/heketi/pkg/utils/log.go b/vendor/github.com/heketi/heketi/pkg/utils/log.go index d07e77d0639..ed2200319ec 100644 --- a/vendor/github.com/heketi/heketi/pkg/utils/log.go +++ b/vendor/github.com/heketi/heketi/pkg/utils/log.go @@ -114,10 +114,12 @@ func (l *Logger) Critical(format string, v ...interface{}) { } // Log error string -func (l *Logger) LogError(format string, v ...interface{}) { +func (l *Logger) LogError(format string, v ...interface{}) error { if l.level >= LEVEL_ERROR { logWithLongFile(l.errorlog, format, v...) } + + return fmt.Errorf(format, v...) } // Log error variable @@ -136,6 +138,15 @@ func (l *Logger) Warning(format string, v ...interface{}) { } } +// Log error variable as a warning +func (l *Logger) WarnErr(err error) error { + if l.level >= LEVEL_WARNING { + logWithLongFile(l.warninglog, "%v", err) + } + + return err +} + // Log string func (l *Logger) Info(format string, v ...interface{}) { if l.level >= LEVEL_INFO {