(
self,
*,
spec: openshell_pb2.SandboxSpec | None = None,
)
| 394 | return self._stub.Health(openshell_pb2.HealthRequest(), timeout=self._timeout) |
| 395 | |
| 396 | def create( |
| 397 | self, |
| 398 | *, |
| 399 | spec: openshell_pb2.SandboxSpec | None = None, |
| 400 | ) -> SandboxRef: |
| 401 | request_spec = spec if spec is not None else _default_spec() |
| 402 | response = self._stub.CreateSandbox( |
| 403 | openshell_pb2.CreateSandboxRequest(spec=request_spec), |
| 404 | timeout=self._timeout, |
| 405 | ) |
| 406 | sandbox_ref = _sandbox_ref(response.sandbox) |
| 407 | if sandbox_ref.id == "": |
| 408 | raise SandboxError("CreateSandbox returned empty sandbox id") |
| 409 | return sandbox_ref |
| 410 | |
| 411 | def create_session( |
| 412 | self, |
no test coverage detected