mirror of
https://github.com/rancher/os.git
synced 2025-08-28 11:12:59 +00:00
Fix rename container in docker client
This commit is contained in:
parent
529ce4336d
commit
b9c8b5baf4
2
Godeps/Godeps.json
generated
2
Godeps/Godeps.json
generated
@ -137,7 +137,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/fsouza/go-dockerclient",
|
"ImportPath": "github.com/fsouza/go-dockerclient",
|
||||||
"Rev": "c726ee4dd0cdd42a8dd8397d005698d2e881460d"
|
"Rev": "d7ce918e02502d8f1b539703ef308977364385c6"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/kless/term",
|
"ImportPath": "github.com/kless/term",
|
||||||
|
13
Godeps/_workspace/src/github.com/fsouza/go-dockerclient/container.go
generated
vendored
13
Godeps/_workspace/src/github.com/fsouza/go-dockerclient/container.go
generated
vendored
@ -226,15 +226,12 @@ type Container struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// See for more details.
|
// See for more details.
|
||||||
func (c *Client) RenameContainer(id string, name string) error {
|
func (c *Client) RenameContainer(id string, newName string) error {
|
||||||
qs := struct {
|
_, _, err := c.do("POST", fmt.Sprintf("/containers/"+id+"/rename?%s", queryString(struct {
|
||||||
new_name string
|
Name string `json:"name,omitempty"`
|
||||||
}{
|
}{
|
||||||
new_name: name,
|
Name: newName,
|
||||||
}
|
})), nil)
|
||||||
|
|
||||||
_, _, err := c.do("POST", fmt.Sprintf("/containers/"+id+"/rename?%s",
|
|
||||||
queryString(qs)), nil)
|
|
||||||
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user