Update sandbox protobuf to match CRI
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
@@ -123,7 +123,7 @@ func (c *controllerLocal) Start(ctx context.Context, in *api.ControllerStartRequ
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (c *controllerLocal) Shutdown(ctx context.Context, in *api.ControllerShutdownRequest, opts ...grpc.CallOption) (*api.ControllerShutdownResponse, error) {
|
||||
func (c *controllerLocal) Stop(ctx context.Context, in *api.ControllerStopRequest, opts ...grpc.CallOption) (*api.ControllerStopResponse, error) {
|
||||
svc, err := c.getSandbox(ctx, in.SandboxID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -136,11 +136,15 @@ func (c *controllerLocal) Shutdown(ctx context.Context, in *api.ControllerShutdo
|
||||
return nil, fmt.Errorf("failed to stop sandbox: %w", err)
|
||||
}
|
||||
|
||||
return &api.ControllerStopResponse{}, nil
|
||||
}
|
||||
|
||||
func (c *controllerLocal) Delete(ctx context.Context, in *api.ControllerDeleteRequest, opts ...grpc.CallOption) (*api.ControllerDeleteResponse, error) {
|
||||
if err := c.shims.Delete(ctx, in.SandboxID); err != nil {
|
||||
return nil, fmt.Errorf("failed to delete sandbox shim: %w", err)
|
||||
}
|
||||
|
||||
return &api.ControllerShutdownResponse{}, nil
|
||||
return &api.ControllerDeleteResponse{}, nil
|
||||
}
|
||||
|
||||
func (c *controllerLocal) Wait(ctx context.Context, in *api.ControllerWaitRequest, opts ...grpc.CallOption) (*api.ControllerWaitResponse, error) {
|
||||
|
||||
@@ -74,9 +74,9 @@ func (s *controllerService) Start(ctx context.Context, req *api.ControllerStartR
|
||||
return s.local.Start(ctx, req)
|
||||
}
|
||||
|
||||
func (s *controllerService) Shutdown(ctx context.Context, req *api.ControllerShutdownRequest) (*api.ControllerShutdownResponse, error) {
|
||||
func (s *controllerService) Stop(ctx context.Context, req *api.ControllerStopRequest) (*api.ControllerStopResponse, error) {
|
||||
log.G(ctx).WithField("req", req).Debug("delete sandbox")
|
||||
return s.local.Shutdown(ctx, req)
|
||||
return s.local.Stop(ctx, req)
|
||||
}
|
||||
|
||||
func (s *controllerService) Wait(ctx context.Context, req *api.ControllerWaitRequest) (*api.ControllerWaitResponse, error) {
|
||||
@@ -88,3 +88,8 @@ func (s *controllerService) Status(ctx context.Context, req *api.ControllerStatu
|
||||
log.G(ctx).WithField("req", req).Debug("sandbox status")
|
||||
return s.local.Status(ctx, req)
|
||||
}
|
||||
|
||||
func (s *controllerService) Delete(ctx context.Context, req *api.ControllerDeleteRequest) (*api.ControllerDeleteResponse, error) {
|
||||
log.G(ctx).WithField("req", req).Debug("delete sandbox")
|
||||
return s.local.Delete(ctx, req)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user