Change Container interface to include Info

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby 2017-02-15 16:59:58 -08:00
parent c869eb0c61
commit 47ececd6b8
8 changed files with 23 additions and 23 deletions

View file

@ -47,6 +47,7 @@ func (s *Service) Create(ctx context.Context, r *api.CreateRequest) (*api.Create
}
state, err := c.State(ctx)
if err != nil {
s.s.Delete(ctx, r.ID)
return nil, err
}
return &api.CreateResponse{
@ -92,7 +93,7 @@ func (s *Service) List(ctx context.Context, r *api.ListRequest) (*api.ListRespon
status = container.Status_PAUSED
}
resp.Containers = append(resp.Containers, &container.Container{
ID: c.ID(),
ID: c.Info().ID,
Pid: state.Pid(),
Status: status,
})