Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
777789ac
Commit
777789ac
authored
Jul 09, 2017
by
Humble Chirammal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update heketi vendor dependencies.
Signed-off-by:
Humble Chirammal
<
hchiramm@redhat.com
>
parent
5ca03d67
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
55 deletions
+43
-55
Godeps.json
Godeps/Godeps.json
+6
-6
cluster.go
.../github.com/heketi/heketi/client/api/go-client/cluster.go
+2
-1
device.go
...r/github.com/heketi/heketi/client/api/go-client/device.go
+14
-39
node.go
vendor/github.com/heketi/heketi/client/api/go-client/node.go
+14
-3
types.go
vendor/github.com/heketi/heketi/pkg/glusterfs/api/types.go
+7
-6
No files found.
Godeps/Godeps.json
View file @
777789ac
...
...
@@ -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"
,
...
...
vendor/github.com/heketi/heketi/client/api/go-client/cluster.go
View file @
777789ac
...
...
@@ -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
)
{
...
...
vendor/github.com/heketi/heketi/client/api/go-client/device.go
View file @
777789ac
...
...
@@ -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
}
vendor/github.com/heketi/heketi/client/api/go-client/node.go
View file @
777789ac
...
...
@@ -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
}
vendor/github.com/heketi/heketi/pkg/glusterfs/api/types.go
View file @
777789ac
...
...
@@ -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"`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment