R12.1-JA-2025June05

Use Multi-command Parser in Other Features

Many features in NetworkBrain will use parser variables for automation. These features are also improved to support multi-command in parser.

Select Primary Format for a Parser In Intent Creation

  • In Intent creation, parser format can have independent CLI command defined, and CLI command qualification can be defined.
  • For Load Parser from Library and Copy from Verified Parser operations, after selecting a parser, the system will loop all the parser formats according to device type of current device, find the matched CLI Commands by CLI command qualification and use it as primary format.
  • The CLI command selected in the primary format will be used in the current intent, e.g., in Variable Manager, Replication Settings in NI.
  • Parser variables parsed in the primary format will be selected and used in the current NI.
  • The command texts in the primary format will be the intent baseline for the current NI.

Deal with Multi Commands of a Parser in Intent Template Settings 

When defining Command Macro Variable in Intent Replication Logic Settings in NI, each device command section may contain several CLI commands, and users can define command macro variable for each CLI command. It is noted that the command macro variables defined for different commands in the same command section must be the same.

Decode NIT

In NIT decoding, the decode results will include the qualified CLI commands and parser format for each device command. These information will help to find the proper CLI command for device during intent replication.

Intent Replication via NIT

During intent replication via NIT, the parser format data can be got from decode results, then the command text of the current device recorded in decode result will replace the sample text of the primary format. At the same time, all other formats of the current device will be copied.

This logic also applies to intent replication via NIC, intent replication in follow-up NIT, triggered NIT, and Auto Intent.

Run Intent

The CLI commands used for intent device in intent replication have been selected, which is presented in the primary format. The CLI command in the primary format will be directly used in intent execution, then a proper format parser will be used to parse the returned command text.

Run Parser in Run DVT, Qapp and Other Features

In many features, parser will run to parser variables. The CLI command for retrieving data is selected following the ‘Auto Choose Command When Parser Runs on Target Device’ rule, then the retrieved command text will match the parser format to be parsed.

The features that involve running parser with multi-command support are listed below:

  • Interactively run DVT / Qapp from Runbook / Map
  • Trigger to run Qapp
  • Schedule to run DVT / Qapp
  • SPOG
  • Probe

Find Parser of CLI Command

In some features, including Runbook (Execute CLI Commands Node), Quick Intent, instant Qapp, an existing parser will be selected to run CLI command. The rule for finding proper parser for the CLI command is optimized like this: The CLI command will try to match all the CLI commands of a given parser, and the parser can be used if any CLI commands match.