Update to the latest upstream API

Signed-off-by: Mrunal Patel <mpatel@redhat.com>
This commit is contained in:
Mrunal Patel 2016-11-16 17:20:37 -08:00
parent 9540eb9d2b
commit b62a150151
21 changed files with 2723 additions and 1306 deletions

View file

@ -405,16 +405,16 @@ func ListContainers(client pb.RuntimeServiceClient, opts listOptions) error {
filter.PodSandboxId = &opts.podID
}
if opts.state != "" {
st := pb.ContainerState_UNKNOWN
st := pb.ContainerState_CONTAINER_UNKNOWN
switch opts.state {
case "created":
st = pb.ContainerState_CREATED
st = pb.ContainerState_CONTAINER_CREATED
filter.State = &st
case "running":
st = pb.ContainerState_RUNNING
st = pb.ContainerState_CONTAINER_RUNNING
filter.State = &st
case "stopped":
st = pb.ContainerState_EXITED
st = pb.ContainerState_CONTAINER_EXITED
filter.State = &st
default:
log.Fatalf("--state should be one of created, running or stopped")

View file

@ -324,13 +324,13 @@ func ListPodSandboxes(client pb.RuntimeServiceClient, opts listOptions) error {
filter.Id = &opts.id
}
if opts.state != "" {
st := pb.PodSandBoxState_NOTREADY
st := pb.PodSandboxState_SANDBOX_NOTREADY
switch opts.state {
case "ready":
st = pb.PodSandBoxState_READY
st = pb.PodSandboxState_SANDBOX_READY
filter.State = &st
case "notready":
st = pb.PodSandBoxState_NOTREADY
st = pb.PodSandboxState_SANDBOX_NOTREADY
filter.State = &st
default:
log.Fatalf("--state should be ready or notready")