Class Sandbox
- Namespace
- Openshell.V1
- Assembly
- OpenShell.Sdk.dll
Public sandbox resource exposed by the OpenShell API.
This is the canonical gateway-owned view of a sandbox. It merges user intent
(spec) with gateway-managed metadata and status derived from internal
compute-driver observations.
Note: The namespace field has been removed from the public API. It remains
in the internal DriverSandbox message as a compute-driver implementation detail.
public sealed class Sandbox : IMessage<Sandbox>, IEquatable<Sandbox>, IDeepCloneable<Sandbox>, IBufferMessage, IMessage
- Inheritance
-
Sandbox
- Inherited Members
Constructors
Sandbox()
public Sandbox()
Sandbox(Sandbox)
public Sandbox(Sandbox other)
Parameters
otherSandbox
Fields
CreatedFromWorkloadTemplateFieldNumber
Field number for the "created_from_workload_template" field.
public const int CreatedFromWorkloadTemplateFieldNumber = 20
Field Value
HostKeyFingerprintFieldNumber
Field number for the "host_key_fingerprint" field.
public const int HostKeyFingerprintFieldNumber = 6
Field Value
MetadataFieldNumber
Field number for the "metadata" field.
public const int MetadataFieldNumber = 1
Field Value
SpecFieldNumber
Field number for the "spec" field.
public const int SpecFieldNumber = 2
Field Value
StatusFieldNumber
Field number for the "status" field.
public const int StatusFieldNumber = 3
Field Value
Properties
CreatedFromWorkloadTemplate
Read-only provenance for sandboxes created from a reusable workload template.
public SandboxWorkloadTemplateProvenance CreatedFromWorkloadTemplate { get; set; }
Property Value
Descriptor
public static MessageDescriptor Descriptor { get; }
Property Value
- MessageDescriptor
HostKeyFingerprint
Read-only SSH host identity in OpenSSH SHA256:<base64> form. Stable for this sandbox's lifetime, including runtime restarts. Empty on legacy runtimes that do not provide a gateway-managed SSH identity.
public string HostKeyFingerprint { get; set; }
Property Value
Metadata
Kubernetes-style metadata (id, name, labels, timestamps, resource version).
public ObjectMeta Metadata { get; set; }
Property Value
Parser
public static MessageParser<Sandbox> Parser { get; }
Property Value
- MessageParser<Sandbox>
Spec
Desired sandbox configuration submitted through the API.
public SandboxSpec Spec { get; set; }
Property Value
Status
Latest user-facing observed status derived by the gateway.
public SandboxStatus Status { get; set; }
Property Value
Methods
CalculateSize()
Calculates the size of this message in Protocol Buffer wire format, in bytes.
public int CalculateSize()
Returns
- int
The number of bytes required to write this message to a coded output stream.
Clone()
Creates a deep clone of this object.
public Sandbox Clone()
Returns
- Sandbox
A deep clone of this object.
Equals(Sandbox)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(Sandbox other)
Parameters
otherSandboxAn object to compare with this object.
Returns
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object other)
Parameters
otherobject
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
MergeFrom(CodedInputStream)
Merges the data from the specified coded input stream with the current message.
public void MergeFrom(CodedInputStream input)
Parameters
inputCodedInputStream
Remarks
See the user guide for precise merge semantics.
MergeFrom(Sandbox)
Merges the given message into this one.
public void MergeFrom(Sandbox other)
Parameters
otherSandbox
Remarks
See the user guide for precise merge semantics.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
WriteTo(CodedOutputStream)
Writes the data to the given coded output stream.
public void WriteTo(CodedOutputStream output)
Parameters
outputCodedOutputStreamCoded output stream to write the data to. Must not be null.