Return DeleteResponse from ContainerService.Delete

The message was defined but the method was returning empty, plumb through the
result from the shim layer.

Compile tested only.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
This commit is contained in:
Ian Campbell 2017-03-01 14:58:05 +00:00
parent 4793f968e5
commit 186a9a2acd
6 changed files with 54 additions and 52 deletions

View file

@ -116,7 +116,7 @@ func (s *Service) Start(ctx context.Context, r *api.StartRequest) (*google_proto
return empty, nil
}
func (s *Service) Delete(ctx context.Context, r *api.DeleteRequest) (*google_protobuf.Empty, error) {
func (s *Service) Delete(ctx context.Context, r *api.DeleteRequest) (*api.DeleteResponse, error) {
c, err := s.getContainer(r.ID)
if err != nil {
return nil, err
@ -125,10 +125,11 @@ func (s *Service) Delete(ctx context.Context, r *api.DeleteRequest) (*google_pro
if err != nil {
return nil, err
}
if err := runtime.Delete(ctx, c); err != nil {
status, err := runtime.Delete(ctx, c)
if err != nil {
return nil, err
}
return empty, nil
return &api.DeleteResponse{ExitStatus: status}, nil
}
func containerFromContainerd(ctx context.Context, c containerd.Container) (*container.Container, error) {