mirror of https://github.com/docker/docs.git
update Godeps to get Labels in container
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
This commit is contained in:
parent
cf946d35f9
commit
4f6df9704f
|
|
@ -60,7 +60,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/samalba/dockerclient",
|
"ImportPath": "github.com/samalba/dockerclient",
|
||||||
"Rev": "c37a52f55ab5a9edb9ffd4cf6e78692962b29b8d"
|
"Rev": "8b9427265e82fddde577648b986fbe78d816b333"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/samuel/go-zookeeper/zk",
|
"ImportPath": "github.com/samuel/go-zookeeper/zk",
|
||||||
|
|
|
||||||
|
|
@ -310,6 +310,20 @@ func (client *DockerClient) StopAllMonitorStats() {
|
||||||
atomic.StoreInt32(&client.monitorStats, 0)
|
atomic.StoreInt32(&client.monitorStats, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (client *DockerClient) TagImage(nameOrID string, repo string, tag string, force bool) error {
|
||||||
|
v := url.Values{}
|
||||||
|
v.Set("repo", repo)
|
||||||
|
v.Set("tag", tag)
|
||||||
|
if force {
|
||||||
|
v.Set("force", "1")
|
||||||
|
}
|
||||||
|
uri := fmt.Sprintf("/%s/images/%s/tag?%s", APIVersion, nameOrID, v.Encode())
|
||||||
|
if _, err := client.doRequest("POST", uri, nil, nil); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func (client *DockerClient) Version() (*Version, error) {
|
func (client *DockerClient) Version() (*Version, error) {
|
||||||
uri := fmt.Sprintf("/%s/version", APIVersion)
|
uri := fmt.Sprintf("/%s/version", APIVersion)
|
||||||
data, err := client.doRequest("GET", uri, nil, nil)
|
data, err := client.doRequest("GET", uri, nil, nil)
|
||||||
|
|
@ -444,3 +458,9 @@ func (client *DockerClient) Exec(config *ExecConfig) (string, error) {
|
||||||
}
|
}
|
||||||
return createExecResp.Id, nil
|
return createExecResp.Id, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (client *DockerClient) RenameContainer(oldName string, newName string) error {
|
||||||
|
uri := fmt.Sprintf("/containers/%s/rename?name=%s", oldName, newName)
|
||||||
|
_, err := client.doRequest("POST", uri, nil, nil)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ type Client interface {
|
||||||
StopAllMonitorEvents()
|
StopAllMonitorEvents()
|
||||||
StartMonitorStats(id string, cb StatCallback, ec chan error, args ...interface{})
|
StartMonitorStats(id string, cb StatCallback, ec chan error, args ...interface{})
|
||||||
StopAllMonitorStats()
|
StopAllMonitorStats()
|
||||||
|
TagImage(nameOrID string, repo string, tag string, force bool) error
|
||||||
Version() (*Version, error)
|
Version() (*Version, error)
|
||||||
PullImage(name string, auth *AuthConfig) error
|
PullImage(name string, auth *AuthConfig) error
|
||||||
LoadImage(reader io.Reader) error
|
LoadImage(reader io.Reader) error
|
||||||
|
|
@ -32,4 +33,5 @@ type Client interface {
|
||||||
RemoveImage(name string) ([]*ImageDelete, error)
|
RemoveImage(name string) ([]*ImageDelete, error)
|
||||||
PauseContainer(name string) error
|
PauseContainer(name string) error
|
||||||
UnpauseContainer(name string) error
|
UnpauseContainer(name string) error
|
||||||
|
RenameContainer(oldName string, newName string) error
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,11 @@ func (client *MockClient) StopAllMonitorEvents() {
|
||||||
client.Mock.Called()
|
client.Mock.Called()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (client *MockClient) TagImage(nameOrID string, repo string, tag string, force bool) error {
|
||||||
|
args := client.Mock.Called(nameOrID, repo, tag, force)
|
||||||
|
return args.Error(0)
|
||||||
|
}
|
||||||
|
|
||||||
func (client *MockClient) StartMonitorStats(id string, cb dockerclient.StatCallback, ec chan error, args ...interface{}) {
|
func (client *MockClient) StartMonitorStats(id string, cb dockerclient.StatCallback, ec chan error, args ...interface{}) {
|
||||||
client.Mock.Called(id, cb, ec, args)
|
client.Mock.Called(id, cb, ec, args)
|
||||||
}
|
}
|
||||||
|
|
@ -125,3 +130,8 @@ func (client *MockClient) Exec(config *dockerclient.ExecConfig) (string, error)
|
||||||
args := client.Mock.Called(config)
|
args := client.Mock.Called(config)
|
||||||
return args.String(0), args.Error(1)
|
return args.String(0), args.Error(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (client *MockClient) RenameContainer(oldName string, newName string) error {
|
||||||
|
args := client.Mock.Called(oldName, newName)
|
||||||
|
return args.Error(0)
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -130,6 +130,7 @@ type Container struct {
|
||||||
Ports []Port
|
Ports []Port
|
||||||
SizeRw int64
|
SizeRw int64
|
||||||
SizeRootFs int64
|
SizeRootFs int64
|
||||||
|
Labels map[string]string
|
||||||
}
|
}
|
||||||
|
|
||||||
type Event struct {
|
type Event struct {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue