no-diff operator
Syntax
id id; no-diff xpath-expression { info string; err "string"; [err "string";] }
Description
Junos Snapshot Administrator test operator that compares specified data elements that are present in both the first and second snapshot collections and verifies that the value is the same.
Parameters
err string | Statement generated when the test case returns false. |
id id | XPath expression relative to the data content that specifies
a unique data element that maps the first snapshot data item to the
second snapshot data item. To create a unique ID based on multiple
element values, define multiple |
info string | Description of the test case. |
xpath-expression | XPath expression selecting the elements to evaluate. |
Usage Examples
The following test case reports an error if the OSPF
neighbor address has changed. The $PRE
and $POST
variables in the second err
statement reference the first and second data collections, respectively.
ospf-check { command show ospf neighbor; iterate ospf-neighbor { id interface-name; no-diff neighbor-address { info OSPF neighbor change check; err "OSPF interface %s neighbor changed!", interface-name; err " was going to %s, now going to %s", $PRE/neighbor-address, $POST/neighbor-address; } } }
Release Information
Operator introduced in Junos Snapshot Administrator Release 1.0.