| ... | ... |
@@ -878,7 +878,7 @@ func (cli *DockerCli) CmdHistory(args ...string) error {
|
| 878 | 878 |
} |
| 879 | 879 |
|
| 880 | 880 |
for _, out := range outs.Data {
|
| 881 |
- outID := out.Get("ID")
|
|
| 881 |
+ outID := out.Get("Id")
|
|
| 882 | 882 |
if !*quiet {
|
| 883 | 883 |
if *noTrunc {
|
| 884 | 884 |
fmt.Fprintf(w, "%s\t", outID) |
| ... | ... |
@@ -1170,7 +1170,7 @@ func (cli *DockerCli) CmdImages(args ...string) error {
|
| 1170 | 1170 |
} |
| 1171 | 1171 |
|
| 1172 | 1172 |
if filter != "" {
|
| 1173 |
- if filter == image.Get("ID") || filter == utils.TruncateID(image.Get("ID")) {
|
|
| 1173 |
+ if filter == image.Get("Id") || filter == utils.TruncateID(image.Get("Id")) {
|
|
| 1174 | 1174 |
startImage = image |
| 1175 | 1175 |
} |
| 1176 | 1176 |
|
| ... | ... |
@@ -1228,7 +1228,7 @@ func (cli *DockerCli) CmdImages(args ...string) error {
|
| 1228 | 1228 |
for _, repotag := range out.GetList("RepoTags") {
|
| 1229 | 1229 |
|
| 1230 | 1230 |
repo, tag := utils.ParseRepositoryTag(repotag) |
| 1231 |
- outID := out.Get("ID")
|
|
| 1231 |
+ outID := out.Get("Id")
|
|
| 1232 | 1232 |
if !*noTrunc {
|
| 1233 | 1233 |
outID = utils.TruncateID(outID) |
| 1234 | 1234 |
} |
| ... | ... |
@@ -1254,12 +1254,12 @@ func (cli *DockerCli) WalkTree(noTrunc bool, images *engine.Table, byParent map[ |
| 1254 | 1254 |
for index, image := range images.Data {
|
| 1255 | 1255 |
if index+1 == length {
|
| 1256 | 1256 |
printNode(cli, noTrunc, image, prefix+"└─") |
| 1257 |
- if subimages, exists := byParent[image.Get("ID")]; exists {
|
|
| 1257 |
+ if subimages, exists := byParent[image.Get("Id")]; exists {
|
|
| 1258 | 1258 |
cli.WalkTree(noTrunc, subimages, byParent, prefix+" ", printNode) |
| 1259 | 1259 |
} |
| 1260 | 1260 |
} else {
|
| 1261 | 1261 |
printNode(cli, noTrunc, image, prefix+"\u251C─") |
| 1262 |
- if subimages, exists := byParent[image.Get("ID")]; exists {
|
|
| 1262 |
+ if subimages, exists := byParent[image.Get("Id")]; exists {
|
|
| 1263 | 1263 |
cli.WalkTree(noTrunc, subimages, byParent, prefix+"\u2502 ", printNode) |
| 1264 | 1264 |
} |
| 1265 | 1265 |
} |
| ... | ... |
@@ -1267,7 +1267,7 @@ func (cli *DockerCli) WalkTree(noTrunc bool, images *engine.Table, byParent map[ |
| 1267 | 1267 |
} else {
|
| 1268 | 1268 |
for _, image := range images.Data {
|
| 1269 | 1269 |
printNode(cli, noTrunc, image, prefix+"└─") |
| 1270 |
- if subimages, exists := byParent[image.Get("ID")]; exists {
|
|
| 1270 |
+ if subimages, exists := byParent[image.Get("Id")]; exists {
|
|
| 1271 | 1271 |
cli.WalkTree(noTrunc, subimages, byParent, prefix+" ", printNode) |
| 1272 | 1272 |
} |
| 1273 | 1273 |
} |
| ... | ... |
@@ -1280,10 +1280,10 @@ func (cli *DockerCli) printVizNode(noTrunc bool, image *engine.Env, prefix strin |
| 1280 | 1280 |
parentID string |
| 1281 | 1281 |
) |
| 1282 | 1282 |
if noTrunc {
|
| 1283 |
- imageID = image.Get("ID")
|
|
| 1283 |
+ imageID = image.Get("Id")
|
|
| 1284 | 1284 |
parentID = image.Get("ParentId")
|
| 1285 | 1285 |
} else {
|
| 1286 |
- imageID = utils.TruncateID(image.Get("ID"))
|
|
| 1286 |
+ imageID = utils.TruncateID(image.Get("Id"))
|
|
| 1287 | 1287 |
parentID = utils.TruncateID(image.Get("ParentId"))
|
| 1288 | 1288 |
} |
| 1289 | 1289 |
if parentID == "" {
|
| ... | ... |
@@ -1300,9 +1300,9 @@ func (cli *DockerCli) printVizNode(noTrunc bool, image *engine.Env, prefix strin |
| 1300 | 1300 |
func (cli *DockerCli) printTreeNode(noTrunc bool, image *engine.Env, prefix string) {
|
| 1301 | 1301 |
var imageID string |
| 1302 | 1302 |
if noTrunc {
|
| 1303 |
- imageID = image.Get("ID")
|
|
| 1303 |
+ imageID = image.Get("Id")
|
|
| 1304 | 1304 |
} else {
|
| 1305 |
- imageID = utils.TruncateID(image.Get("ID"))
|
|
| 1305 |
+ imageID = utils.TruncateID(image.Get("Id"))
|
|
| 1306 | 1306 |
} |
| 1307 | 1307 |
|
| 1308 | 1308 |
fmt.Fprintf(cli.out, "%s%s Virtual Size: %s", prefix, imageID, utils.HumanSize(image.GetInt64("VirtualSize")))
|
| ... | ... |
@@ -1381,7 +1381,7 @@ func (cli *DockerCli) CmdPs(args ...string) error {
|
| 1381 | 1381 |
|
| 1382 | 1382 |
for _, out := range outs.Data {
|
| 1383 | 1383 |
var ( |
| 1384 |
- outID = out.Get("ID")
|
|
| 1384 |
+ outID = out.Get("Id")
|
|
| 1385 | 1385 |
outNames = out.GetList("Names")
|
| 1386 | 1386 |
) |
| 1387 | 1387 |
|
| ... | ... |
@@ -204,7 +204,7 @@ func TestGetImagesJSON(t *testing.T) {
|
| 204 | 204 |
} |
| 205 | 205 |
assertHttpNotError(r2, t) |
| 206 | 206 |
|
| 207 |
- images2 := engine.NewTable("ID", 0)
|
|
| 207 |
+ images2 := engine.NewTable("Id", 0)
|
|
| 208 | 208 |
if _, err := images2.ReadListFrom(r2.Body.Bytes()); err != nil {
|
| 209 | 209 |
t.Fatal(err) |
| 210 | 210 |
} |
| ... | ... |
@@ -215,7 +215,7 @@ func TestGetImagesJSON(t *testing.T) {
|
| 215 | 215 |
|
| 216 | 216 |
found = false |
| 217 | 217 |
for _, img := range images2.Data {
|
| 218 |
- if img.Get("ID") == unitTestImageID {
|
|
| 218 |
+ if img.Get("Id") == unitTestImageID {
|
|
| 219 | 219 |
found = true |
| 220 | 220 |
break |
| 221 | 221 |
} |
| ... | ... |
@@ -237,7 +237,7 @@ func TestGetImagesJSON(t *testing.T) {
|
| 237 | 237 |
} |
| 238 | 238 |
assertHttpNotError(r3, t) |
| 239 | 239 |
|
| 240 |
- images3 := engine.NewTable("ID", 0)
|
|
| 240 |
+ images3 := engine.NewTable("Id", 0)
|
|
| 241 | 241 |
if _, err := images3.ReadListFrom(r3.Body.Bytes()); err != nil {
|
| 242 | 242 |
t.Fatal(err) |
| 243 | 243 |
} |
| ... | ... |
@@ -339,7 +339,7 @@ func TestGetContainersJSON(t *testing.T) {
|
| 339 | 339 |
if len(containers.Data) != beginLen+1 {
|
| 340 | 340 |
t.Fatalf("Expected %d container, %d found (started with: %d)", beginLen+1, len(containers.Data), beginLen)
|
| 341 | 341 |
} |
| 342 |
- if id := containers.Data[0].Get("ID"); id != containerID {
|
|
| 342 |
+ if id := containers.Data[0].Get("Id"); id != containerID {
|
|
| 343 | 343 |
t.Fatalf("Container ID mismatch. Expected: %s, received: %s\n", containerID, id)
|
| 344 | 344 |
} |
| 345 | 345 |
} |
| ... | ... |
@@ -60,8 +60,8 @@ func cleanup(eng *engine.Engine, t *testing.T) error {
|
| 60 | 60 |
t.Fatal(err) |
| 61 | 61 |
} |
| 62 | 62 |
for _, image := range images.Data {
|
| 63 |
- if image.Get("ID") != unitTestImageID {
|
|
| 64 |
- mkServerFromEngine(eng, t).DeleteImage(image.Get("ID"), false)
|
|
| 63 |
+ if image.Get("Id") != unitTestImageID {
|
|
| 64 |
+ mkServerFromEngine(eng, t).DeleteImage(image.Get("Id"), false)
|
|
| 65 | 65 |
} |
| 66 | 66 |
} |
| 67 | 67 |
return nil |
| ... | ... |
@@ -288,7 +288,7 @@ func TestRestartKillWait(t *testing.T) {
|
| 288 | 288 |
} |
| 289 | 289 |
|
| 290 | 290 |
setTimeout(t, "Waiting on stopped container timedout", 5*time.Second, func() {
|
| 291 |
- job = srv.Eng.Job("wait", outs.Data[0].Get("ID"))
|
|
| 291 |
+ job = srv.Eng.Job("wait", outs.Data[0].Get("Id"))
|
|
| 292 | 292 |
var statusStr string |
| 293 | 293 |
job.Stdout.AddString(&statusStr) |
| 294 | 294 |
if err := job.Run(); err != nil {
|
| ... | ... |
@@ -472,7 +472,7 @@ func TestRmi(t *testing.T) {
|
| 472 | 472 |
} |
| 473 | 473 |
|
| 474 | 474 |
for _, image := range images.Data {
|
| 475 |
- if strings.Contains(unitTestImageID, image.Get("ID")) {
|
|
| 475 |
+ if strings.Contains(unitTestImageID, image.Get("Id")) {
|
|
| 476 | 476 |
continue |
| 477 | 477 |
} |
| 478 | 478 |
if image.GetList("RepoTags")[0] == "<none>:<none>" {
|
| ... | ... |
@@ -650,7 +650,7 @@ func assertContainerList(srv *docker.Server, all bool, limit int, since, before |
| 650 | 650 |
return false |
| 651 | 651 |
} |
| 652 | 652 |
for i := 0; i < len(outs.Data); i++ {
|
| 653 |
- if outs.Data[i].Get("ID") != expected[i] {
|
|
| 653 |
+ if outs.Data[i].Get("Id") != expected[i] {
|
|
| 654 | 654 |
return false |
| 655 | 655 |
} |
| 656 | 656 |
} |
| ... | ... |
@@ -776,7 +776,7 @@ func (srv *Server) Images(job *engine.Job) engine.Status {
|
| 776 | 776 |
delete(allImages, id) |
| 777 | 777 |
out.Set("ParentId", image.Parent)
|
| 778 | 778 |
out.SetList("RepoTags", []string{fmt.Sprintf("%s:%s", name, tag)})
|
| 779 |
- out.Set("ID", image.ID)
|
|
| 779 |
+ out.Set("Id", image.ID)
|
|
| 780 | 780 |
out.SetInt64("Created", image.Created.Unix())
|
| 781 | 781 |
out.SetInt64("Size", image.Size)
|
| 782 | 782 |
out.SetInt64("VirtualSize", image.getParentsSize(0)+image.Size)
|
| ... | ... |
@@ -797,7 +797,7 @@ func (srv *Server) Images(job *engine.Job) engine.Status {
|
| 797 | 797 |
out := &engine.Env{}
|
| 798 | 798 |
out.Set("ParentId", image.Parent)
|
| 799 | 799 |
out.SetList("RepoTags", []string{"<none>:<none>"})
|
| 800 |
- out.Set("ID", image.ID)
|
|
| 800 |
+ out.Set("Id", image.ID)
|
|
| 801 | 801 |
out.SetInt64("Created", image.Created.Unix())
|
| 802 | 802 |
out.SetInt64("Size", image.Size)
|
| 803 | 803 |
out.SetInt64("VirtualSize", image.getParentsSize(0)+image.Size)
|
| ... | ... |
@@ -879,7 +879,7 @@ func (srv *Server) ImageHistory(job *engine.Job) engine.Status {
|
| 879 | 879 |
outs := engine.NewTable("Created", 0)
|
| 880 | 880 |
err = image.WalkHistory(func(img *Image) error {
|
| 881 | 881 |
out := &engine.Env{}
|
| 882 |
- out.Set("ID", img.ID)
|
|
| 882 |
+ out.Set("Id", img.ID)
|
|
| 883 | 883 |
out.SetInt64("Created", img.Created.Unix())
|
| 884 | 884 |
out.Set("CreatedBy", strings.Join(img.ContainerConfig.Cmd, " "))
|
| 885 | 885 |
out.SetList("Tags", lookupMap[img.ID])
|
| ... | ... |
@@ -1027,7 +1027,7 @@ func (srv *Server) Containers(job *engine.Job) engine.Status {
|
| 1027 | 1027 |
} |
| 1028 | 1028 |
displayed++ |
| 1029 | 1029 |
out := &engine.Env{}
|
| 1030 |
- out.Set("ID", container.ID)
|
|
| 1030 |
+ out.Set("Id", container.ID)
|
|
| 1031 | 1031 |
out.SetList("Names", names[container.ID])
|
| 1032 | 1032 |
out.Set("Image", srv.runtime.repositories.ImageName(container.Image))
|
| 1033 | 1033 |
out.Set("Command", fmt.Sprintf("%s %s", container.Path, strings.Join(container.Args, " ")))
|