(sandbox: openshell_pb2.Sandbox)
| 805 | |
| 806 | |
| 807 | def _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 | |
| 819 | def _default_spec() -> openshell_pb2.SandboxSpec: |
no test coverage detected