MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / _sandbox_ref

Function _sandbox_ref

python/openshell/sandbox.py:807–816  ·  view source on GitHub ↗
(sandbox: openshell_pb2.Sandbox)

Source from the content-addressed store, hash-verified

805
806
807def _sandbox_ref(sandbox: openshell_pb2.Sandbox) -> SandboxRef:
808 status = sandbox.status if sandbox.HasField("status") else None
809 return SandboxRef(
810 id=sandbox.metadata.id if sandbox.metadata else "",
811 name=sandbox.metadata.name if sandbox.metadata else "",
812 status=SandboxStatusRef(
813 phase=status.phase if status else 0,
814 current_policy_version=status.current_policy_version if status else 0,
815 ),
816 )
817
818
819def _default_spec() -> openshell_pb2.SandboxSpec:

Callers 3

createMethod · 0.85
getMethod · 0.85
listMethod · 0.85

Calls 2

SandboxRefClass · 0.85
SandboxStatusRefClass · 0.85

Tested by

no test coverage detected