Introduction to Scenarios or Tasks

Created by Sanjay Kumar, Modified on Fri, 6 Sep at 1:24 AM by Sanjay Kumar

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.

CategoryCommandDescription
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
Miscellaneous
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) Namesyslog_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

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article