Introduction to Scenarios or Tasks

Introduction to Scenarios or Tasks

What are scenarios/tasks?

Scenarios allow you to define the workflow steps as to how you want the communication with the device to be, including all associated processes, notifications and integrations. Like templates, you can build a library of scenarios. You can execute specific scenarios within your job by using the 'tasks' command. 

How to Access Scenarios

Scenarios can be accessed under Operate -> Scenarios
Or Search for Scenarios under Search 

Basic Introduction to Scenario/task Commands

Scenario Commands are used in Scenarios. They return or don't return values. When they fail, the <error>-variable is set.
Below are some often used Scenario Commands.

Command Execution
cmd_exec_basicExecutes configs to the CMDB node.  This also performs config save, config backup(pre and post).
cmd_execExecutes configs to the YCE node. This also performs config save, config backup(pre and post).
Parsingparse_cmdParsing text/values from the command outputs for further usage
Config Management
config_createCreate configs for execution
config_restoreRestore specific configuration to a node
File Transferfile_getTransfer file from NetYCE to the node
waitDelay subsequent action for specified time
reachableTest if node is reachable via ssh or telnet

See here for a complete list of Scenario Commands.  

Creating a New Scenario/task

Operate -> Scenarios -> New -> (1) Name: syslog_config -> (2) Description -> (3) Text -> (4) Save
Going through Scenario Text, we are using two scenario commands here.
config_create -> This is to generate syslog configuration and it is stored in the file name sys.cfg
cmd_exec_basic -> This is to execute configuration generated from the file named sys.cfg

Executing/Using the Scenario/task

(1) Operate -> New Jobs -> CMDB Jobs or YCE Jobs(based on the type of node) -> (2) Select the required node -> (3) Next

 (1)  Update the task name to the scenario/task we created task = syslog_config -> (2) Update the appropriate description
(3) Save Job As : Syslog Configuration -> (4) Save -> (5) Select the node -> (6) Schedule -> Now or (7) appropriate time

Job-status can be reviewed under Operate -> Job Status -> Job Logs
Job logs can be viewed as per How to Review Job logs

Note: We can also call a scenario/task from other scenarios/tasks using the task command

    • Related Articles

    • Parsing values from the commands

      Parsing purpose Parsing deals with extracting interested part of information from the specific text.  The text can be command output(Command parsing) or from device configuration(Config parsing). In this article we are dealing with Command parsing. ...
    • OS Repository

      Overview OS repository allows us to manage the OS images and other files(license, bootfile) that are used for OS Upgrades. It can be accessed going to (1) Build -> (2) OS Repository GUI Steps to add new image (1) Build -> OS repository -> (2) Create ...
    • How to run Basic command Job

      Introduction Basic command Jobs are basically used to automate day to day jobs. This article is about executing our first job, with minimal information.  Below are the 5 steps involved. Select the Node Load the Job Define the config commands to ...
    • Triggering jobs from events through syslog

      Overview We can trigger netyce jobs from syslog messages. The event manager(SEC) can be used to match the syslog message pattern to trigger the suitable job.. The events on the device can be like config change, port/neighbor flap etc. Below is an ...