Class SandboxTemplate
- Namespace
- Openshell.V1
- Assembly
- OpenShell.Sdk.dll
Historical inline compute template mapped onto compute-driver template inputs.
Despite its name, this is not a reusable named sandbox template resource. It
is an inline part of SandboxSpec kept for v1 compatibility. A future
breaking API cleanup may rename this message to free SandboxTemplate for
the reusable template resource now represented by SandboxWorkloadTemplate.
public sealed class SandboxTemplate : IMessage<SandboxTemplate>, IEquatable<SandboxTemplate>, IDeepCloneable<SandboxTemplate>, IBufferMessage, IMessage
- Inheritance
-
SandboxTemplate
- Implements
-
IMessage<SandboxTemplate>IDeepCloneable<SandboxTemplate>IBufferMessageIMessage
- Inherited Members
Constructors
SandboxTemplate()
public SandboxTemplate()
SandboxTemplate(SandboxTemplate)
public SandboxTemplate(SandboxTemplate other)
Parameters
otherSandboxTemplate
Fields
AgentSocketFieldNumber
Field number for the "agent_socket" field.
public const int AgentSocketFieldNumber = 3
Field Value
AnnotationsFieldNumber
Field number for the "annotations" field.
public const int AnnotationsFieldNumber = 5
Field Value
DriverConfigFieldNumber
Field number for the "driver_config" field.
public const int DriverConfigFieldNumber = 11
Field Value
EnvironmentFieldNumber
Field number for the "environment" field.
public const int EnvironmentFieldNumber = 6
Field Value
ImageFieldNumber
Field number for the "image" field.
public const int ImageFieldNumber = 1
Field Value
LabelsFieldNumber
Field number for the "labels" field.
public const int LabelsFieldNumber = 4
Field Value
ResourcesFieldNumber
Field number for the "resources" field.
public const int ResourcesFieldNumber = 7
Field Value
RuntimeClassNameFieldNumber
Field number for the "runtime_class_name" field.
public const int RuntimeClassNameFieldNumber = 2
Field Value
UserNamespacesFieldNumber
Field number for the "user_namespaces" field.
public const int UserNamespacesFieldNumber = 10
Field Value
Properties
AgentSocket
Optional agent socket path exposed to the workload.
public string AgentSocket { get; set; }
Property Value
Annotations
Annotations applied to compute-platform resources for this sandbox.
public MapField<string, string> Annotations { get; }
Property Value
Descriptor
public static MessageDescriptor Descriptor { get; }
Property Value
- MessageDescriptor
DriverConfig
Driver-keyed opaque config envelope supplied by the caller. The gateway selects the block matching the active compute driver and forwards only that inner Struct to DriverSandboxTemplate.driver_config. The selected driver owns nested schema validation.
public Struct DriverConfig { get; set; }
Property Value
- Struct
Environment
Additional environment variables injected by the template.
public MapField<string, string> Environment { get; }
Property Value
HasUserNamespaces
Gets whether the "user_namespaces" field is set
public bool HasUserNamespaces { get; }
Property Value
Image
Fully-qualified OCI image reference used to boot the sandbox.
public string Image { get; set; }
Property Value
Labels
Labels applied to compute-platform resources for this sandbox.
public MapField<string, string> Labels { get; }
Property Value
Parser
public static MessageParser<SandboxTemplate> Parser { get; }
Property Value
- MessageParser<SandboxTemplate>
Resources
Platform-specific compute resource requirements and limits.
public Struct Resources { get; set; }
Property Value
- Struct
RuntimeClassName
Optional runtime class name requested from the compute platform.
public string RuntimeClassName { get; set; }
Property Value
UserNamespaces
Enable Kubernetes user namespace isolation (hostUsers: false). When true, container UID 0 maps to a non-root host UID and capabilities become namespaced. Requires Kubernetes 1.33+ with user namespace support available (beta through 1.35, GA in 1.36+) and a supporting runtime. When unset, the cluster-wide default is used.
public bool UserNamespaces { 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.
ClearUserNamespaces()
Clears the value of the "user_namespaces" field
public void ClearUserNamespaces()
Clone()
Creates a deep clone of this object.
public SandboxTemplate Clone()
Returns
- SandboxTemplate
A deep clone of this object.
Equals(SandboxTemplate)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(SandboxTemplate other)
Parameters
otherSandboxTemplateAn 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(SandboxTemplate)
Merges the given message into this one.
public void MergeFrom(SandboxTemplate other)
Parameters
otherSandboxTemplate
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.