Instruction Reference

This page is used for syntax verification. Please, visit the respective pages of documentation for details.

Text in lowercase at code examples below are placeholders just for reference.

Comments

Comments are for reference purposes and are ignored by sysopswork

#this is a comment

CLI Automation Instructions

Any CLI automation requires an OBJECT: instruction, so sysopswork knows where to implement the commands.

OBJECT: name(technology)

Pre-Implementation Test Instructions

x. is optional, unless used for variable extraction (command instruction only).

Command

x.PREIMPLEMENTATION-COMMAND: native command
# or its short version
x.PREC: native command

Results

x.PREIMPLEMENTATION-RESULTS: word or regex or precision syntax
# or its short version
x.PRER: word or regex or precision syntax

Success Alternate Action

x.PREIMPLEMENTATION-SUCCESS: stop
# or its short version
x.PRES: stop

Failure Alternate Action

x.PREIMPLEMENTATION-FAILURE: continue
# or its short version
x.PREF: continue

Implementation Instructions

x. is optional, unless used for variable extraction (command instruction only).

Single-Line Command

x.IMPLEMENTATION-COMMAND: native command
# or its short version
x.IMPC: native command

Multi-Line Command

x.IMPLEMENTATION-COMMAND-START:
native command
native command
native command
IMPLEMENTATION-COMMAND-END:

# or its short version

x.IMPCS:
native command
native command
native command
IMPCE:

Results

x.IMPLEMENTATION-RESULTS: word or regex or precision syntax
# or its short version
x.IMPR: word or regex or precision syntax

Success Alternate Action

x.IMPLEMENTATION-SUCCESS: stop
# or its short version
x.IMPS: stop

Failure Alternate Action

x.IMPLEMENTATION-FAILURE: continue
# or its short version
x.IMPF: continue

Post-Implementation Test Instructions

x. is optional, unless used for variable extraction (command instruction only).

Command

x.POSTIMPLEMENTATION-COMMAND: native command
# or its short version
x.POSTC: native command

Results

x.POSTIMPLEMENTATION-RESULTS: word or regex or precision syntax
# or its short version
x.POSTR: word or regex or precision syntax

Success Alternate Action

x.POSTIMPLEMENTATION-SUCCESS: stop
# or its short version
x.POSTS: stop

Failure Alternate Action

x.POSTIMPLEMENTATION-FAILURE: continue
# or its short version
x.POSTF: continue

Back-out Instructions

x. is optional, unless used for variable extraction (command instruction only).

Single-Line Command

x.BACKOUT-COMMAND: native command
# or its short version
x.BACKC: native command

Multi-Line Command

x.BACKOUT-COMMAND-START:
native command
native command
native command
BACKOUT-COMMAND-END:

# or its short version

x.BACKCS:
native command
native command
native command
BACKCE:

Results

x.BACKOUT-RESULTS: word or regex or precision syntax
# or its short version
x.BACKR: word or regex or precision syntax

Success Alternate Action

x.BACKOUT-SUCCESS: stop
# or its short version
x.BACKS: stop

Failure Alternate Action

x.BACKOUT-FAILURE: continue
# or its short version
x.BACKF: continue

Final-Test Instructions

x. is optional, unless used for variable extraction (command instruction only).

Command

x.FINALTEST-COMMAND: native command
# or its short version
x.FINC: native command

Results

x.FINALTEST-RESULTS: word or regex or precision syntax
# or its short version
x.FINR: word or regex or precision syntax

Success Alternate Action

x.FINALTEST-SUCCESS: stop
# or its short version
x.FINS: stop

Failure Alternate Action

x.FINALTEST-FAILURE: continue
# or its short version
x.FINF: continue

REST Automation Instructions

Implementation Life Cycle Step

x. is optional.

x.REST-STEP: PRE or IMP or POST or BACK or FIN
# or its short version
x.RESTS: PRE or IMP or POST or BACK or FIN

HTTP Method

x. is optional.

x.REST-METHOD: GET or POST or PUT or PATCH or DELETE
# or its short version
x.RESTM: GET or POST or PUT or PATCH or DELETE

HTTP URL

x. is optional, unless used for variable extraction.

x.REST-URL: url
# or its short version
x.RESTU: url

HTTP Headers

x. is optional.

x.REST-HEADERS: headers in json key-value format
# or its short version
x.RESTH: headers in json key-value format

HTTP Request Enclosed-Body Data Single-Line

x. is optional.

x.REST-DATA: single-line enclosed-body data
# or its short version
x.RESTD: single-line enclosed-body data

HTTP Request Enclosed-Body Data Multi-Line

x. is optional.

x.REST-DATA-START:
enclosed-body data line
enclosed-body data line
enclosed-body data line
x.REST-DATA-END:

# or its short version

x.RESTDS:
enclosed-body data line
enclosed-body data line
enclosed-body data line
x.RESTDE:

HTTP Response Enclosed-Body Data Verification

x. is optional.

x.REST-DATA-RESULTS: parse comparison "value" or results_regex
# or its short version
x.RESTDR: parse comparison "value" or results_regex

HTTP Response Header Verification

x. is optional.

x.REST-HEADERS-RESULTS: results_regex
# or its short version
x.RESTHR: results_regex

Additional Instructions

ADDOBJ:

Optional. The syntax is:

ADDOBJ: {"name": "OBJECT_NAME", "ip_address": "IP_ADDRESS", "access_method": "ACCESS_METHOD", "login_mode": "LOGIN_MODE", "prompt": "PROMPT", "public_port": "PUBLIC_PORT", "service": "TECHNOLOGY"}

You can also enter credentials on ADDOBJ using the following valid keys: - “username” - “password” - “keyfilepath” - “passphrase” - “thumbprint”

TEXT

Optional. For existing text files, use:

TEXT-FILE: "path_to_existing_file"
# or its short version
TEXT: "path_to_existing_file"

For new temporary files, use:

TEXT-FILE-START: "filename"
text line
text line with {{variable}}
text line
TEXT-FILE-END:

# or its short version

TEXTS: "filename"
text line
text line with {{variable}}
text line
TEXTE:

QUESTION: & ANSWER:

Optional. The syntax is:

QUESTION: question statement
ANSWER: variable_name

instruction with {{variable_name}}

PROMPT:

Optional. In its simplest form, PROMPT: has the following syntax:

PROMPT: query$answer

answer has to be enclosed within valid delimiters. The valid delimeters are: /, %, or |.

You can also use your credentials for a specific object. The syntax is:

PROMPT: password$password

The valid credentials are: $user, $password.

# COMMENT

Optional. The syntax is:

# This is a comment!

EXIT:

Optional. The syntax is:

EXIT: exit command

WAIT:

Optional. The syntax is:

WAIT: seconds

PRINT:

Optional. The syntax is:

PRINT: value

Variables

Variables are used at instructions with {{variable_id}} (enclosed within double curly brackets) and the respective instruction line is evaluated to replace the variable with its respective value before it is implemented.

Static String

Syntax:

variable_id = "value"

Static List

Syntax:

variable_id = ("value1", "value2", "value3")

List values are accessed by index. First value is accessed as variable_id[0].

Dynamic Variable

Syntax:

VARIABLE_IDENTIFIER = {[EXTRACT_INSTRUCTION] [REFERENCE]}

Control Flow

Conditional Iteration

ELSE IF and ELSE are optional.

IF condition {
        instructions
} ELSE IF condition {
        instructions
} ELSE {
        instructions
}

While Loop

Usage:

WHILE condition {
        instructions
}

For Each Loop

Usage:

FOR EACH local_var IN list {
        instruction with {{local_var}}
}

Altering Loop Flow

CONTINUE

Usage:

WHILE condition {
        instructions
        IF condition {
                CONTINUE
        }
}

BREAK

Usage:

FOR EACH local_var IN list {
        instructions
        IF condition {
                BREAK
        }
}