etr  4.0-pre
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
etr.plugins.nomad.Plugin Class Reference

Nomad plugin that enables deployment of Nomad jobs. More...

Public Member Functions

def __init__ (self, ConfigurationContext ctx)
 
def setup (self, SetupContext ctx)
 Deploy system under test. More...
 
def teardown (self, TeardownContext ctx)
 Undeploy system under test. More...
 

Static Public Member Functions

def add_options (parser)
 Add --nomad-host option. More...
 

Static Public Attributes

int order = 10000
 
string config_schema
 

Detailed Description

Nomad plugin that enables deployment of Nomad jobs.

Example config:

Version
: "1.0" plugins:
Definition: nomad.py:1
nomad: jobs:
- "src/foo.nomad"

Constructor & Destructor Documentation

◆ __init__()

def etr.plugins.nomad.Plugin.__init__ (   self,
ConfigurationContext  ctx 
)

Member Function Documentation

◆ add_options()

def etr.plugins.nomad.Plugin.add_options (   parser)
static

Add --nomad-host option.

◆ setup()

def etr.plugins.nomad.Plugin.setup (   self,
SetupContext  ctx 
)

Deploy system under test.

   1. Convert HCL file to json,
   2. Add job
     - If job already exist, fail.
   3. Start job
   4. Wait for job to stabilize

◆ teardown()

def etr.plugins.nomad.Plugin.teardown (   self,
TeardownContext  ctx 
)

Undeploy system under test.

Member Data Documentation

◆ config_schema

string etr.plugins.nomad.Plugin.config_schema
static
Initial value:
= """
type: object
additionalProperties: False
properties:
jobs:
type: array
items:
type: string
"""

◆ order

int etr.plugins.nomad.Plugin.order = 10000
static

The documentation for this class was generated from the following file: