list-not-less operator
Syntax
id id; list-not-less { info string; err "string"; [err "string";] }
Description
Junos Snapshot Administrator test operator that
determines if the specified XML elements are present in the first
snapshot but are not present in the second snapshot. The list-not-less
test-operator validates the existence
in the second snapshot of the elements defined by the id
statement.
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. |
Usage Examples
The following test case checks if the OSPF neighbors that existed before the device maintenance are present after the device maintenance. If any OSPF neighbors present in the first snapshot are missing from the second snapshot, the code reports an error.
ospf-check { command show ospf neighbor; iterate ospf-neighbor { id interface-name; list-not-less { info OSPF interface list check; err "OSPF interface gone missing: %s going to %s", interface-name, neighbor-address; } } }
Release Information
Operator introduced in Junos Snapshot Administrator Release 1.0.