image: populate image status

The actual image pull happens in create container so we can fake
this out to keep the kubelet happy.

Signed-off-by: Mrunal Patel <mpatel@redhat.com>
This commit is contained in:
Mrunal Patel 2016-10-24 19:53:26 -04:00
parent d6ebc9d8b4
commit 30f94438be

View file

@ -29,7 +29,14 @@ func (s *Server) ImageStatus(ctx context.Context, req *pb.ImageStatusRequest) (*
// TODO // TODO
// containers/storage will take care of this by looking inside /var/lib/ocid/images // containers/storage will take care of this by looking inside /var/lib/ocid/images
// and getting the image status // and getting the image status
return &pb.ImageStatusResponse{}, nil
// HACK: Return fake status for now as the image pull actually happens in create container.
image := req.GetImage().GetImage()
return &pb.ImageStatusResponse{
Image: &pb.Image{
Id: &image,
},
}, nil
} }
// PullImage pulls a image with authentication config. // PullImage pulls a image with authentication config.