Table of Contents

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
Implements
IMessage<Sandbox>
IDeepCloneable<Sandbox>
IBufferMessage
IMessage
Inherited Members

Constructors

Sandbox()

public Sandbox()

Sandbox(Sandbox)

public Sandbox(Sandbox other)

Parameters

other Sandbox

Fields

CreatedFromWorkloadTemplateFieldNumber

Field number for the "created_from_workload_template" field.

public const int CreatedFromWorkloadTemplateFieldNumber = 20

Field Value

int

HostKeyFingerprintFieldNumber

Field number for the "host_key_fingerprint" field.

public const int HostKeyFingerprintFieldNumber = 6

Field Value

int

MetadataFieldNumber

Field number for the "metadata" field.

public const int MetadataFieldNumber = 1

Field Value

int

SpecFieldNumber

Field number for the "spec" field.

public const int SpecFieldNumber = 2

Field Value

int

StatusFieldNumber

Field number for the "status" field.

public const int StatusFieldNumber = 3

Field Value

int

Properties

CreatedFromWorkloadTemplate

Read-only provenance for sandboxes created from a reusable workload template.

public SandboxWorkloadTemplateProvenance CreatedFromWorkloadTemplate { get; set; }

Property Value

SandboxWorkloadTemplateProvenance

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

string

Metadata

Kubernetes-style metadata (id, name, labels, timestamps, resource version).

public ObjectMeta Metadata { get; set; }

Property Value

ObjectMeta

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

SandboxSpec

Status

Latest user-facing observed status derived by the gateway.

public SandboxStatus Status { get; set; }

Property Value

SandboxStatus

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

other Sandbox

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object other)

Parameters

other object

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

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

input CodedInputStream

Remarks

See the user guide for precise merge semantics.

MergeFrom(Sandbox)

Merges the given message into this one.

public void MergeFrom(Sandbox other)

Parameters

other Sandbox

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

output CodedOutputStream

Coded output stream to write the data to. Must not be null.