Table of Contents

Class SandboxSpec

Namespace
Openshell.V1
Assembly
OpenShell.Sdk.dll

Desired sandbox configuration provided through the public API.

public sealed class SandboxSpec : IMessage<SandboxSpec>, IEquatable<SandboxSpec>, IDeepCloneable<SandboxSpec>, IBufferMessage, IMessage
Inheritance
SandboxSpec
Implements
IMessage<SandboxSpec>
IDeepCloneable<SandboxSpec>
IBufferMessage
IMessage
Inherited Members

Constructors

SandboxSpec()

public SandboxSpec()

SandboxSpec(SandboxSpec)

public SandboxSpec(SandboxSpec other)

Parameters

other SandboxSpec

Fields

CommandFieldNumber

Field number for the "command" field.

public const int CommandFieldNumber = 12

Field Value

int

EnvironmentFieldNumber

Field number for the "environment" field.

public const int EnvironmentFieldNumber = 5

Field Value

int

LogLevelFieldNumber

Field number for the "log_level" field.

public const int LogLevelFieldNumber = 1

Field Value

int

PolicyFieldNumber

Field number for the "policy" field.

public const int PolicyFieldNumber = 7

Field Value

int

ProviderAttachmentEpochFieldNumber

Field number for the "provider_attachment_epoch" field.

public const int ProviderAttachmentEpochFieldNumber = 14

Field Value

int

ProvidersFieldNumber

Field number for the "providers" field.

public const int ProvidersFieldNumber = 8

Field Value

int

ResourceRequirementsFieldNumber

Field number for the "resource_requirements" field.

public const int ResourceRequirementsFieldNumber = 9

Field Value

int

RestartPolicyFieldNumber

Field number for the "restart_policy" field.

public const int RestartPolicyFieldNumber = 15

Field Value

int

TemplateFieldNumber

Field number for the "template" field.

public const int TemplateFieldNumber = 6

Field Value

int

TtyFieldNumber

Field number for the "tty" field.

public const int TtyFieldNumber = 13

Field Value

int

Properties

Command

Canonical command launched once by the sandbox supervisor. No shell parsing is performed. The gateway normalizes an omitted command to the portable scratch login shell before persistence.

public RepeatedField<string> Command { get; }

Property Value

RepeatedField<string>

Descriptor

public static MessageDescriptor Descriptor { get; }

Property Value

MessageDescriptor

Environment

Environment variables injected into the sandbox runtime.

public MapField<string, string> Environment { get; }

Property Value

MapField<string, string>

LogLevel

Log level exposed to processes running inside the sandbox.

public string LogLevel { get; set; }

Property Value

string

Parser

public static MessageParser<SandboxSpec> Parser { get; }

Property Value

MessageParser<SandboxSpec>

Policy

Required sandbox policy configuration.

public SandboxPolicy Policy { get; set; }

Property Value

SandboxPolicy

ProviderAttachmentEpoch

Gateway-owned attachment identity, changed atomically with the provider set. Equality only: detach and reattach must not revive an older receipt.

public string ProviderAttachmentEpoch { get; set; }

Property Value

string

Providers

Provider names to attach to this sandbox.

public RepeatedField<string> Providers { get; }

Property Value

RepeatedField<string>

ResourceRequirements

Portable resource requirements used by the gateway for driver selection and by drivers for provisioning.

public ResourceRequirements ResourceRequirements { get; set; }

Property Value

ResourceRequirements

RestartPolicy

Gateway-owned policy for replacing the sandbox runtime after the canonical main process exits. Unspecified is normalized to Never before persistence.

public SandboxRestartPolicy RestartPolicy { get; set; }

Property Value

SandboxRestartPolicy

Template

Container or VM template used to provision the sandbox.

public SandboxTemplate Template { get; set; }

Property Value

SandboxTemplate

Tty

Allocate a retained pseudo-terminal for the main process.

public bool Tty { get; set; }

Property Value

bool

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 SandboxSpec Clone()

Returns

SandboxSpec

A deep clone of this object.

Equals(SandboxSpec)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(SandboxSpec other)

Parameters

other SandboxSpec

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(SandboxSpec)

Merges the given message into this one.

public void MergeFrom(SandboxSpec other)

Parameters

other SandboxSpec

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.