list-not-more operator
Syntax
id id; list-not-more { info string; err "string"; [err "string";] }
Description
Junos Snapshot Administrator test operator that
determines if the specified XML elements are present in the second
snapshot but are not present in the first snapshot. The list-not-more
test-operator validates the existence
in the first 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 example check chassis alarms. This configuration
uses both list-not-less
and list-not-more
to check for any changes in the alarms.
The data elements referenced in the list-not-more
err
section are elements from the second
snapshot that were not present in the first snapshot.
alarm-checks { command show chassis alarms; item alarm-summary { not-exists active-alarm-count { info No chassis alarms; err "There are %s chassis alarms", active-alarm-count; } } iterate alarm-detail { id alarm-description; list-not-less { info Alarm Gone Missing; err "-Alarm: %s", alarm-description; } list-not-more { info Alarm Got More; err "+Alarm: %s", alarm-description; } } }
Release Information
Operator introduced in Junos Snapshot Administrator Release 1.0.