API Documentation

Overview

aioRunbookHttpServer

aioRunbookScheduler

adaptors

aioStdin

aioSshConnect

aioTelnetConnect

aioRtbRestConnect

aioSftp

aioSnmpConnect

analyzers

textFsmCheck

jsonCheck

diffCheck

postProcessing

cacheCheckResults

helperFunctions

tools.helperFunctions._isInDictionary(searchKey, inDictionary, defaultValue)

verify the presence of a dict key

Parameters:
  • searchKey (string) – attribute name to be checked
  • inDictionary (dict) – the dictionary to be searched
  • defaultValue (object) – the default value, in case the attribute is not present
Returns:

either dict attribute object, respectively a default object.

tools.helperFunctions._substitudeVarsInString(myObject, varDict={}, loopIndex=0, stepIndex=0)

variable substitution with Jinja2

Parameters:
  • myObject (string) – string which might contain Jinja2 variable patterns
  • varDict (dict) – dictionary which contains the variables. Could contain sub dicts and lists
  • loopIndex (int) – list iterator for loops. Will be set by aioRunbookScheduler.execSteps
  • stepIndex – list iterator for steps, Will be set by aioRunbookScheduler.execSteps
Returns:

possibly amended string, respctevely the original object

tools.helperFunctions._addTimeStampsToStepDict(t1, stepDict, commandCounter=0)

simple function, which adds the end timestamps to the output dict.

Parameters:
  • t1 (datetime.datetime) – timestamp for the start
  • stepDict (dict) – applicable stepDict
  • commandCounter (int) – provides the command index, in order to identify the proper output dict,
tools.helperFunctions._setHostfileAttributes(stepDict, hostDict)

searches for a host reference in the strpDict name and applies conditioanlly attributes from the host reference

Parameters:
  • stepCounter (int) – stepCounter
  • stepType (string) – copy of the stepId (=stepType)
  • stepDict (dict) – stepDict
  • loopCounter (int) – loopCounter