sandbox: start sandbox with options
Signed-off-by: Zhang Tianyang <burning9699@gmail.com>
This commit is contained in:
parent
dc03a4baa2
commit
56274749c8
@ -63,8 +63,8 @@ func (s *controllerService) Register(server *grpc.Server) error {
|
|||||||
|
|
||||||
func (s *controllerService) Create(ctx context.Context, req *api.ControllerCreateRequest) (*api.ControllerCreateResponse, error) {
|
func (s *controllerService) Create(ctx context.Context, req *api.ControllerCreateRequest) (*api.ControllerCreateResponse, error) {
|
||||||
log.G(ctx).WithField("req", req).Debug("create sandbox")
|
log.G(ctx).WithField("req", req).Debug("create sandbox")
|
||||||
// TODO: Rootfs, any
|
// TODO: Rootfs
|
||||||
err := s.local.Create(ctx, req.GetSandboxID())
|
err := s.local.Create(ctx, req.GetSandboxID(), sandbox.WithOptions(req.GetOptions()))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return &api.ControllerCreateResponse{}, errdefs.ToGRPC(err)
|
return &api.ControllerCreateResponse{}, errdefs.ToGRPC(err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user