not-exists operator
Syntax
not-exists xpath-expression {
info string;
err "string";
[err "string";]
}Description
Junos Snapshot Administrator test operator that verifies the lack of existence of an XML element in the snapshot.
Parameters
| err string | Statement generated when the test case returns false. |
| info string | Description of the test case. |
| xpath-expression | XPath expression specifying the elements to test. |
Usage Examples
The following test case checks for active chassis alarms.
If the active-alarm-count element does
not exist, there are no active chassis alarms. Otherwise, the code
reports an error indicating that there are active alarms.
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;
}
}
}
Release Information
Operator introduced in Junos Snapshot Administrator Release 1.0.