View Only
last person joined: 3 days ago 

Ask questions and share experiences about Apstra, Paragon, and all things network automation.
  • 1.  Question on JSNAPy

    Posted 11-09-2023 15:52


    Here is a test file that posts an error message if an interface status changes between snapshots.

    Test interfaces:
     - command: show interfaces terse
     - iterate:
         xpath: physical-interface
         id: name
           - no-diff: oper-status
             err: "Test Failed: oper-status of {{id_0}} got changed from <{{pre['oper-status']}}> to <{{post['oper-status']}}>"
             info: "Test Passed: oper-status is the same, before it was <{{pre['oper-status']}}>, now it is <{{post['oper-status']}}>"

    I know that {{ id_0 }} is a variable containing the name of the interface whose status has changed. But what does the "_0" in the variable name stand for?



  • 2.  RE: Question on JSNAPy
    Best Answer

    Posted 11-09-2023 19:12

    the id is a Key Value for elements in pre and post checks 

    See Point 7 at the below Document

    David Divins

  • 3.  RE: Question on JSNAPy

    Posted 12-13-2023 00:52

    Thanks David for your reply.