netunicorn.base.environment_definitions.ShellExecution

class ShellExecution(commands=<factory>, runtime_context=<factory>)[source]

Bases: EnvironmentDefinition

This class represents Environment Definition that’s created by executing commands in OS’s shell.

Parameters:
  • runtime_context (RuntimeContext, default: <factory>) – runtime context for this environment definition

  • commands (List[str], default: <factory>)

Attributes

commands

A list of commands that should be executed to create an environment.

runtime_context

Runtime context for this environment definition

Methods

from_json

Creates ShellExecution from JSON representation.

classmethod from_json(_data)[source]

Creates ShellExecution from JSON representation.

Parameters:

_data (EnvironmentDefinitionRepresentation) – JSON representation of ShellExecution

Returns:

ShellExecution – Deserialized ShellExecution

commands: List[str][source]

A list of commands that should be executed to create an environment.

runtime_context: RuntimeContext[source]

Runtime context for this environment definition