Use Intent Template via ADT as Follow-up Diagnosis
You can use Intent Template via ADT to dynamically obtain NIT as follow-up NIT from the predefined ADT (intent template group) based on the matching conditions.
For example, you have a well-maintained ADT as follows, and NITs in the Seed Intent column of this ADT are filtered by match conditions (Control-1, Control-2). Make the new intents are cloned from the filtered NITs based on the seed devices in the follow-up diagnosis definition. Then, the cloned intent will be executed as follow-up intent diagnosis.
Number | Control1 | Control2 | Macro1 | Macro2 | Macro3 | Seed Intent | Note |
---|---|---|---|---|---|---|---|
1 | ACL | IOS | $vrf@sd1 | Nit1:VRF Check | For rep device 1 | ||
2 | ACL | JunOS | |||||
3 | QOS | JunOS | $vlan@sd1 | Nit2: VLAN Check | For rep device 2 | ||
4 | VLAN | IOS | $IP@sd1 | Nit3: QOS Check | For rep device 3 | ||
5 | Route | IOS | $IP@sd1 | Nit4: Route Check | For rep device 4 | ||
6 | “for match NITi” | “for NIT’s macro” | "Seed Intent Template" |
- From the drop-down list of Add Action, select Follow-up Intent > Intent Template via ADT.
- Select the predefined ADT and define the following two aspects in general.
Determine Which NIT to Execute
The following settings determine which NIT can be executed as the follow-up NIT.
- Column with Intent Template: Determine the range used to match NITs. You should select an NIT column (such as the ‘Seed Intent’ column in the predefined ADT above) in the selected ADT to match the required NIT.
- Filter Intent Template by: Define a set of conditions to find the specific NITs.
The left side is the column of the selected ADT, and the right side is the available variables in the current intent.
For example, if the condition is Control1 Matched ACL, the filtered NITs are the NITs in the rows numbered 1 and 2 in the predefined ADT.Note: You can use the Maximum number of Intent Template matched to be used to control the NIT number.
Settings to Replicate Matched Intent Template
- Device by variable: Define based on which devices to replicate to generate new intents.
Note: Only the current device and its variables are supported here, not its neighbors.
If there are macro variables in the matched NIT, you should configure the following settings to assign values for these macro variables.
- Set Macro Variables: This function is disabled by default since the NIT is not determined at first.
When you enable this function, you need to select the macro variable column in the ADT and these macro variables will be listed below. Then assign values to these macro variables in the ‘Set Variable’ column.
After the above definition, the main logics are completed. You can define more related settings.
- Draw Arrow from This Device to Next: Draw an arrow directly from the current device to the next device whose intent is to be replicated.
- Annotation for Diagnosis Tree: Annotations are displayed on the line of the diagnosis tree.
Diagnosis Tree
Open the diagnosis tree to view the ADT details.
In the pre-execution mode, the ADT is displayed as a node and the ADT Details pane is provided for you.
In the post-execution mode, the ADT intent and ADT nodes are also both displayed.