CCS uses four basic building blocks for job automation, which are called sections in each CCS script. Script SectionAction SectionSimple ActionLoginCommandsDevices/ Device-Group•Script–the
- Script – the written CCS script, written using a text editor and imported into NetMRI, or written using NetMRI's built-in Edit Script feature. The Script section identifies the working set of network devices to be acted on by the CCS script. The script runs only on the devices that the user wants to run it upon. One Script section can be defined per script. The device identification is carried out through subordinate elements such as variables and filters. The Script section precedes all other section types, including Actions, Issues and Triggers. The simple script workflow example here shows a Script section that enables the script to run on a specific device or device group (by logging in to the device), and then passes the execution on to an Action section, which operates on each logged-in device in turn, sending a batch of CLI commands.
- Action–An – An Action section defines a sequence of CLI commands to be executed by the script on the matching device(s). The CLI commands are derived from the command syntax for the network infrastructure devices involved in the job–Ciscojob – Cisco, Extreme, Juniper, and so on. Any CCS script must contain at least one Action section.
- Issue–An – An Issue section processes the output of the CLI commands (the responses produced by the device as a response to the executed CLI command) and generates a custom CCS issue. An Issue is similar to a custom type of Trigger (see the following paragraph for more). Those custom issues are added to NetMRI's Issues list (Network Analysis –> -> Issues) and affect the NetMRI appliance's Network Scorecard values.
- Trigger–A – A trigger section responds to CLI output by issuing new sequences of CLI commands to change device configurations, or to generate further output from the network device in an attempt to activate a second trigger. Thus, you can nest triggers in scripts to perform more complex processing.
Other vital elements of the CCS scripting language include the following:
- Variables (see the section CCS Variables Usage for more);
- Attributes, which are the parts making up each section (see the topics in the section Standard CCS Attributes for more);
- Looping (see the section Looping with CCS Scripting for more).
...