Commit 5865ab75 authored by Dawn Chen's avatar Dawn Chen

Merge pull request #2808 from simon3z/master

api: add container's id to ContainerStatus
parents f81ec248 4af64b89
......@@ -405,7 +405,8 @@ type ContainerStatus struct {
// not just PodInfo. Now we need this to remove docker.Container from API
PodIP string `json:"podIP,omitempty"`
// TODO(dchen1107): Need to decide how to represent this in v1beta3
Image string `json:"image"`
Image string `json:"image"`
ContainerID string `json:"containerID,omitempty" description:"container's ID in the format 'docker://<container_id>'"`
}
// PodInfo contains one entry for every container with available info.
......
......@@ -364,7 +364,8 @@ type ContainerStatus struct {
// not just PodInfo. Now we need this to remove docker.Container from API
PodIP string `json:"podIP,omitempty" description:"pod's IP address"`
// TODO(dchen1107): Need to decide how to reprensent this in v1beta3
Image string `json:"image" description:"image of the container"`
Image string `json:"image" description:"image of the container"`
ContainerID string `json:"containerID,omitempty" description:"container's ID in the format 'docker://<container_id>'"`
}
// PodInfo contains one entry for every container with available info.
......
......@@ -329,7 +329,8 @@ type ContainerStatus struct {
// not just PodInfo. Now we need this to remove docker.Container from API
PodIP string `json:"podIP,omitempty" description:"pod's IP address"`
// TODO(dchen1107): Need to decide how to reprensent this in v1beta3
Image string `json:"image" description:"image of the container"`
Image string `json:"image" description:"image of the container"`
ContainerID string `json:"containerID,omitempty" description:"container's ID in the format 'docker://<container_id>'"`
}
// PodInfo contains one entry for every container with available info.
......
......@@ -423,6 +423,7 @@ type ContainerStatus struct {
RestartCount int `json:"restartCount"`
// TODO(dchen1107): Introduce our own NetworkSettings struct here?
// TODO(dchen1107): Which image the container is running with?
ContainerID string `json:"containerID,omitempty" description:"container's ID in the format 'docker://<container_id>'"`
}
// PodInfo contains one entry for every container with available info.
......
......@@ -389,7 +389,8 @@ func inspectContainer(client DockerInterface, dockerID, containerName, tPath str
glog.V(3).Infof("Container inspect result: %+v", *inspectResult)
containerStatus := api.ContainerStatus{
Image: inspectResult.Config.Image,
Image: inspectResult.Config.Image,
ContainerID: "docker://" + dockerID,
}
waiting := true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment