is-gt operator
Syntax
is-gt xpath-expression, integer-value { info string; err "string"; [err "string";] }
Description
Junos Snapshot Administrator test operator that tests if an XML element value is greater than a given numeric value.
Parameters
err string | Statement generated when the test case returns false. |
info string | Description of the test case. |
integer-value | Numeric value against which to compare the XML element value. |
xpath-expression | XPath expression selecting the elements to evaluate. |
Usage Examples
The following test case checks that each OSPF interface
has at least 1 neighbor by verifying that the neighbor-count
is greater than 0. If the neighbor count is 0, the code reports
an error.
ospf-int-checks { command show ospf interface; iterate ospf-interface { is-gt neighbor-count, 0 { info OSPF interfaces must have at least 1 neighbor; err "OSPF interface %s does not have any neighbors", interface-name; } } }
Release Information
Operator introduced in Junos Snapshot Administrator Release 1.0.