Populate state in pod status

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
Mrunal Patel 2016-09-26 11:18:35 -07:00
parent def5ebdae7
commit 204b2a645b

View file

@ -331,6 +331,11 @@ func (s *Server) PodSandboxStatus(ctx context.Context, req *pb.PodSandboxStatusR
ip = "" ip = ""
} }
rStatus := pb.PodSandBoxState_NOTREADY
if cState.Status == "running" {
rStatus = pb.PodSandBoxState_READY
}
return &pb.PodSandboxStatusResponse{ return &pb.PodSandboxStatusResponse{
Status: &pb.PodSandboxStatus{ Status: &pb.PodSandboxStatus{
Id: sbID, Id: sbID,
@ -341,6 +346,7 @@ func (s *Server) PodSandboxStatus(ctx context.Context, req *pb.PodSandboxStatusR
}, },
}, },
Network: &pb.PodSandboxNetworkStatus{Ip: &ip}, Network: &pb.PodSandboxNetworkStatus{Ip: &ip},
State: &rStatus,
}, },
}, nil }, nil
} }