R12.1-JA-2025June05
Intent Diagnosis Block
The differences between Intent Diagnosis and Device Diagnosis are as follows:
- Each intent can have only one intent diagnosis block, which will be displayed and executed after all device diagnoses.
- Intent Diagnosis has no parser and command baseline data and includes diagnosis blocks (if/then/else).
- Device diagnosis can access the variables of all intent devices and intent variables. Intent diagnosis can only access the variables that do not belong to intent device variables.
- Device diagnosis can use all supported logic, and intent diagnosis can only use the device-independent logic, including Intent Status Code, Follow-up Intent, Send Email, Call Webhook API, Call Qapp, and Export CSV Report.
Along with global variables, intent diagnosis block provides a way to support:
- Analyze logic on a few previous device sections and use the intent diagnosis block to loop through the intent table to output the final diagnosis, including NI status code, diagnosis message, CSV report, or trigger follow-up.
- Intent-level diagnosis - handle ADT update and ADT-based follow-up intent (using Macro and Intent Variable to match intents inside ADT).
You can define a global variable that can be reached and modified in the intent:
- Add/remove/update the table row and use the data row of this table.
- Define the singleton variable with an initial value and update the value in the device diagnosis.
Example 1: Add an intent block to use ADT as input and define ADT-based diagnosis to check Critical Failover link change.
-
Define Critical Failover Link ADT.
-
Build intent to define an ADT-based diagnosis. Define intent variables and intent table.
-
Define an intent diagnosis block to loop the ADT (no need to input device) as follows:
-
Click the
icon in the Intent Edit Mode and select Add Intent Diagnosis Block.
- Select the Loop Table Rows check box, then select the created ADT.
- You can also add status code or more logics for the intent.
-
Click the
-
Define a follow-up intent template to detect if the failover states of the primary/secondary devices have changed.
Example 2: Use the operator Intent Status Codes in IF diagnosis block and define a follow-up intent if there is an error status code at intent level.
-
Build an intent to check the state of OSPF Neighbor.
-
Define an Intent diagnosis node to check the status codes output of all devices and intents diagnosis blocks of the current intent as follows:
- Select Add Intent Diagnosis from the drop-down list of Add Command.
-
Add If-then statement and select the operator Intent Status Codes and Have error.
- Navigate to the Add Action > Follow-up Intent to add a follow-up intent to execute and check if the intent status codes contain an error in any of the diagnosis block.
-
Click OK.
-
Intent Diagnosis Block will appear as the last diagnosis in action table. You can Edit/Delete the diagnosis as needed.
- Select Add Intent Diagnosis from the drop-down list of Add Command.