R12.3-20260213

Macro Variable in Network Intent

NI supports Macro Variables, which are variables with a pre-defined default value. They can be used in cloning NI, NI diagnosis and CSV report, or in Network Intent Cluster (NIC) to help generate Member NI. They are treated as constants during NI execution.

  1. In NI edit mode, click the enabled Intent Template link to open the Intent Replication Settings.
     
  2. In the Intent Replication Settings window, you can add command macro variable and device variable.
  • Define the command macro variables, which are macro variables used in CLI commands. For example, show $ospf_neighbor_ip. See Define Command Variable for more details.
     

  • On the Advanced Settings tab, define device macro variables, which are used in NI diagnosis conditions. For example, device variables can be defined as BGP AS numbers.
  1. Macro variables can be used in diagnosis conditions, diagnosis notes, status code definition, CSV reports, and etc.

Information

Note: When a variable is deleted or missing, it is displayed in red with a tooltip on hover, helping you quickly identify errors.

For example, the macro variable bgp_neighbor is deleted, all its usages in the If condition and message are highlighted in red.