Update heketi dependency to release3.

commit hash#28b5cc4cc6d2b9bdfa91ed1b93efaab4931aa697

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
Humble Chirammal
2016-10-24 22:36:28 +05:30
parent 33ebe1f18b
commit e07863e239
4 changed files with 18 additions and 8 deletions

View File

@@ -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"`

View File

@@ -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))
}

View File

@@ -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 {