Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Understanding Junos Snapshot Administrator Reference Variables

Junos Snapshot Administrator provides special variables that can be used within test case err statements to reference a specific data element as defined by an id statement XPath expression or to reference a data element in a specific snapshot. Available variables include:

  • $ID.num—Variable mapped to a specific id statement that can be used in place of XPath expressions in the test case.

  • $PRE—Anchor variable that is prepended to an XPath expression and that references data elements from the first snapshot.

  • $POST—Anchor variable that is prepended to an XPath expression and that references data elements from the second snapshot.

In the following example, the err statements use $ID.1 to reference the connection-id element, $ID.2 to reference the ../local-site-id element, and $ID.3 to reference the ancestor::instance/instance-name element.

The following example prepends the $PRE and $POST variables to neighbor-address in the test case err statements to reference the value of the OSPF neighbor address from the first and second snapshots, respectively.