Update heketi vendor dependencies.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
Humble Chirammal 2017-07-09 21:26:57 +05:30
parent 5ca03d674e
commit 777789ac93
5 changed files with 43 additions and 55 deletions

12
Godeps/Godeps.json generated
View File

@ -1687,18 +1687,18 @@
},
{
"ImportPath": "github.com/heketi/heketi/client/api/go-client",
"Comment": "v4.0.0-22-g7a54b6f",
"Rev": "7a54b6fc903feab1e7cb6573177ca09b544eb1e2"
"Comment": "2017-06-21T10:47:05Z",
"Rev": "aaf40619d85fda757e7a1c1ea1b5118cea65594b"
},
{
"ImportPath": "github.com/heketi/heketi/pkg/glusterfs/api",
"Comment": "v4.0.0-22-g7a54b6f",
"Rev": "7a54b6fc903feab1e7cb6573177ca09b544eb1e2"
"Comment": "2017-06-21T10:47:05Z",
"Rev": "aaf40619d85fda757e7a1c1ea1b5118cea65594b"
},
{
"ImportPath": "github.com/heketi/heketi/pkg/utils",
"Comment": "v4.0.0-22-g7a54b6f",
"Rev": "7a54b6fc903feab1e7cb6573177ca09b544eb1e2"
"Comment": "2017-06-21T10:47:05Z",
"Rev": "aaf40619d85fda757e7a1c1ea1b5118cea65594b"
},
{
"ImportPath": "github.com/howeyc/gopass",

View File

@ -14,9 +14,10 @@ package client
import (
"bytes"
"net/http"
"github.com/heketi/heketi/pkg/glusterfs/api"
"github.com/heketi/heketi/pkg/utils"
"net/http"
)
func (c *Client) ClusterCreate() (*api.ClusterInfoResponse, error) {

View File

@ -15,10 +15,11 @@ package client
import (
"bytes"
"encoding/json"
"github.com/heketi/heketi/pkg/glusterfs/api"
"github.com/heketi/heketi/pkg/utils"
"net/http"
"time"
"github.com/heketi/heketi/pkg/glusterfs/api"
"github.com/heketi/heketi/pkg/utils"
)
func (c *Client) DeviceAdd(request *api.DeviceAddRequest) error {
@ -131,42 +132,6 @@ func (c *Client) DeviceDelete(id string) error {
return nil
}
func (c *Client) DeviceRemove(id string) error {
// Create a request
req, err := http.NewRequest("POST",
c.host+"/devices/"+id+"/remove",
nil)
if err != nil {
return err
}
// Set token
err = c.setToken(req)
if err != nil {
return err
}
// Send request
r, err := c.do(req)
if err != nil {
return err
}
if r.StatusCode != http.StatusAccepted {
return utils.GetErrorFromResponse(r)
}
// Wait for response
r, err = c.waitForResponseWithTimer(r, time.Second)
if err != nil {
return err
}
if r.StatusCode != http.StatusNoContent {
return utils.GetErrorFromResponse(r)
}
return nil
}
func (c *Client) DeviceState(id string,
request *api.StateRequest) error {
@ -196,8 +161,18 @@ func (c *Client) DeviceState(id string,
if err != nil {
return err
}
if r.StatusCode != http.StatusOK {
if r.StatusCode != http.StatusAccepted {
return utils.GetErrorFromResponse(r)
}
// Wait for response
r, err = c.waitForResponseWithTimer(r, time.Second)
if err != nil {
return err
}
if r.StatusCode != http.StatusNoContent {
return utils.GetErrorFromResponse(r)
}
return nil
}

View File

@ -15,10 +15,11 @@ package client
import (
"bytes"
"encoding/json"
"github.com/heketi/heketi/pkg/glusterfs/api"
"github.com/heketi/heketi/pkg/utils"
"net/http"
"time"
"github.com/heketi/heketi/pkg/glusterfs/api"
"github.com/heketi/heketi/pkg/utils"
)
func (c *Client) NodeAdd(request *api.NodeAddRequest) (*api.NodeInfoResponse, error) {
@ -167,8 +168,18 @@ func (c *Client) NodeState(id string, request *api.StateRequest) error {
if err != nil {
return err
}
if r.StatusCode != http.StatusOK {
if r.StatusCode != http.StatusAccepted {
return utils.GetErrorFromResponse(r)
}
// Wait for response
r, err = c.waitForResponseWithTimer(r, time.Second)
if err != nil {
return err
}
if r.StatusCode != http.StatusNoContent {
return utils.GetErrorFromResponse(r)
}
return nil
}

View File

@ -148,12 +148,13 @@ type VolumeDurabilityInfo struct {
type VolumeCreateRequest struct {
// Size in GB
Size int `json:"size"`
Clusters []string `json:"clusters,omitempty"`
Name string `json:"name"`
Durability VolumeDurabilityInfo `json:"durability,omitempty"`
Gid int64 `json:"gid,omitempty"`
Snapshot struct {
Size int `json:"size"`
Clusters []string `json:"clusters,omitempty"`
Name string `json:"name"`
Durability VolumeDurabilityInfo `json:"durability,omitempty"`
Gid int64 `json:"gid,omitempty"`
GlusterVolumeOptions []string `json:"glustervolumeoptions,omitempty"`
Snapshot struct {
Enable bool `json:"enable"`
Factor float32 `json:"factor"`
} `json:"snapshot"`