Example: Pre/Post-Change Interface State Validation¶
Scenario: Validate that all Loopback interfaces are up before a change, then intentionally shut down a loopback interface, and use the app to detect and highlight the change.
Step 1: Create the "Loopback Interfaces Up" Validation Rule¶
-
Navigate to:
Operations→Operational Compliance→Validation RulesClick the+button to create a new rule. -
Fill in the form:
- Name:
Loopback Interfaces Up - Rule Type:
EXACT_MATCH - Rule Options: (leave blank)
- Description:
Ensure all Loopback interfaces are up
- Name:
-
Click:
Create
Step 2: Create the Command Parser for Loopback Interfaces¶
-
Navigate to:
Operations→Operational Compliance→Command ParsersClick the+button. -
Fill in the form:
- Parser:
TEXTFSM - Command:
show interfaces - Validation Rule:
Loopback Interfaces Up - Platform:
cisco_ios - Path:
(This JMESPath expression filters for interfaces whose name starts with "Loopback" and extracts their interface name, link status, and protocol status.)
- Parser:
-
Click:
Create
Note
Try to use the long form of the command (e.g. show interfaces) rather than an abbreviated form (e.g. sh int) to ensure the best chance of matching the command to a parser template in any Git repositories.
Step 3: Create a Validation Rule Group¶
-
Navigate to:
Operations→Operational Compliance→Validation Rule GroupsClick the+button. -
Fill in the form:
- Name:
Pre/Post Change Validation - Validation Rules: Add the
Loopback Interfaces Upvalidation rule
- Name:
-
Click:
Create
Step 4: Collect Command Outputs (Pre-Change)¶
-
Navigate to:
Operations→Operational Compliance→Command Outputs. Click the+button. -
Fill in the form:
- Validation Rules:
Loopback Interfaces Up - Devices: Select your device
- Validation Rules:
-
Click:
Collect Command Outputs -
Navigate to the Command Outputs page and you can view the output of the command.
Step 5: Make a Change on the Device¶
SSH to your device and shut down a loopback interface:
Step 6: Collect Command Outputs (Post-Change)¶
Repeat Step 4 to collect the post-change state.
Step 7: Compare the Command Outputs¶
-
Navigate to:
Operations→Operational Compliance→Validation ResultsClick the+button. -
Fill in the form:
- Device: Select your device
- Validation Rule:
Loopback Interfaces Up - Pre Check: Select your pre-change command output
- Post Check: Select your post-change command output
-
Click:
Compare Command Outputs
Example Data¶
Pre-Change (Loopback10 up):
Post-Change (Loopback10 down):
[
["Loopback0", "up", "up"],
["Loopback10", "administratively down", "down"],
["Loopback109", "up", "up"]
]
Example Diff Output:
{
"index_element[1][1]": {
"new_value": "administratively down",
"old_value": "up"
},
"index_element[1][2]": {
"new_value": "down",
"old_value": "up"
}
}
How to read this diff:
index_element[1][1]means the second interface in the list (Loopback10), second field (link_status), changed from"up"to"administratively down".index_element[1][2]means the second interface, third field (protocol_status), changed from"up"to"down".
This shows exactly which interface and fields changed between the two results.









