Clean latest api doc from PortMapping and outdated error check

Regarding the outdated error check, there's no `docker.PortMapping`
struct anymore and this is linked to something really old #1334

Signed-off-by: Antonio Murdaca <runcom@linux.com>
This commit is contained in:
Antonio Murdaca 2015-09-03 11:01:55 +02:00
Родитель ee4de4d163
Коммит 137c12f19a
2 изменённых файлов: 2 добавлений и 6 удалений

Просмотреть файл

@ -8,7 +8,6 @@ import (
"io/ioutil" "io/ioutil"
"os" "os"
"path/filepath" "path/filepath"
"strings"
"sync" "sync"
"syscall" "syscall"
"time" "time"
@ -105,8 +104,7 @@ func (container *Container) fromDisk() error {
dec := json.NewDecoder(jsonSource) dec := json.NewDecoder(jsonSource)
// Load container settings // Load container settings
// udp broke compat of docker.PortMapping, but it's not used when loading a container, we can skip it if err := dec.Decode(container); err != nil {
if err := dec.Decode(container); err != nil && !strings.Contains(err.Error(), "docker.PortMapping") {
return err return err
} }

Просмотреть файл

@ -422,7 +422,6 @@ Return low-level information on the container `id`
"IPAddress": "", "IPAddress": "",
"IPPrefixLen": 0, "IPPrefixLen": 0,
"MacAddress": "", "MacAddress": "",
"PortMapping": null,
"Ports": null "Ports": null
}, },
"Path": "/bin/sh", "Path": "/bin/sh",
@ -2244,7 +2243,6 @@ Return low-level information about the `exec` command `id`.
"MacAddress" : "02:42:ac:11:00:02", "MacAddress" : "02:42:ac:11:00:02",
"Gateway" : "172.17.42.1", "Gateway" : "172.17.42.1",
"Bridge" : "docker0", "Bridge" : "docker0",
"PortMapping" : null,
"Ports" : {} "Ports" : {}
}, },
"ResolvConfPath" : "/var/lib/docker/containers/8f177a186b977fb451136e0fdf182abff5599a08b3c7f6ef0d36a55aaf89634c/resolv.conf", "ResolvConfPath" : "/var/lib/docker/containers/8f177a186b977fb451136e0fdf182abff5599a08b3c7f6ef0d36a55aaf89634c/resolv.conf",
@ -2258,7 +2256,7 @@ Return low-level information about the `exec` command `id`.
"ProcessLabel" : "", "ProcessLabel" : "",
"AppArmorProfile" : "", "AppArmorProfile" : "",
"RestartCount" : 0, "RestartCount" : 0,
"Mounts" : [], "Mounts" : []
} }
} }