Skip to content

Use Cases

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

  1. Navigate to Operations > Setup > Validation Rules and click the + Add Validation Rule button.

  2. Fill in the form:

    • Name: Loopback Interfaces Up
    • Rule Type: EXACT_MATCH
    • Rule Options: (leave null)
    • Description: Ensure all Loopback interfaces are up
  3. Click Create

Create a new validation rule Create a new validation rule

Step 2: Create the Command Parser for Loopback Interfaces

  1. Navigate to Operations > Setup > Command Parsers and click the + Add Command Parser button.

  2. Fill in the form:

    • Parser: TEXTFSM
    • Command: show interfaces
    • NAPALM Getter: (leave blank — not used for TEXTFSM)
    • Validation Rule: Loopback Interfaces Up
    • Platform: cisco_ios
    • Path:
    [?starts_with(interface, 'Loopback')].[interface, link_status, protocol_status]
    

    (This JMESPath expression filters for interfaces whose name starts with "Loopback" and extracts their interface name, link status, and protocol status.)

    • Exclude: (leave empty list)
  3. 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

  1. Navigate to Operations > Setup > Validation Rule Groups and click the + Add Validation Rule Group button.

  2. Fill in the form:

    • Name: Pre/Post Change Validation
    • Validation Rules: Add the Loopback Interfaces Up validation rule
  3. Click Create

Create a new validation rule group Create a new validation rule group

Step 4: Take a "Pre" Snapshot

  1. Navigate to Operations > Manage > Snapshots and click the Take Snapshot button.

  2. Fill in the form:

    • Snapshot Name: (optional — a name will be auto-generated if left blank)
    • Validation Rules: Loopback Interfaces Up
    • Device: Select your device

    Tip

    You can also select a Validation Rule Group instead of individual rules, and filter devices by location, platform, role, tags, and more.

  3. Click Run Job

  4. Once the job completes, you should see your new snapshot in the Snapshots list. Click into it to verify the collected command output.

Step 5: Make a Change on the Device

SSH to your device and shut down a loopback interface:

conf t
interface Loopback10
shutdown
end

Step 6: Take a "Post" Snapshot

Repeat Step 4 to collect the "post" snapshot state. Navigate to Operations > Manage > Snapshots, click Take Snapshot, select the same rule and device, and run the job.

Step 7: Compare the Snapshots

  1. Navigate to Operations > Manage > Validation Results and click the Compare Snapshots button.

  2. Fill in the form:

    • Pre Snapshot: Select your "pre" snapshot
    • Post Snapshot: Select your "post" snapshot
  3. Click Run Job

Step 8: View the Results

Once the job completes, the Validation Results list will show a result for your device and rule. The Match column indicates whether the check passed or failed. Click into the result to see the full detail page with the diff.

Example Data

"Pre" Snapshot (Loopback10 up):

[
  ["Loopback0", "up", "up"],
  ["Loopback10", "up", "up"],
  ["Loopback109", "up", "up"]
]

"Post" Snapshot (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 snapshots.