in-range operator
Syntax
in-range xpath-expression, integer-start, integer-end { info string; err "string"; [err "string";] }
Description
Junos Snapshot Administrator test operator that tests if an XML element value is within a given numeric range.
Parameters
err string | Statement generated when the test case returns false. |
info string | Description of the test case. |
integer-start | Numeric value defining the start of the range. |
integer-end | Numeric value defining the end of the range. |
xpath-expression | XPath expression selecting the elements to evaluate. |
Usage Examples
The following test case checks the OSPF database and
tests if each router has between 5 and 10 links. If the link-count
value falls outside the specified range,
the code reports an error.
ospf-db-checks { command show ospf database detail; iterate //ospf-router-lsa { in-range link-count, 5, 10 { info OSPF router links [5 - 10]; err "Router %s has %s links", ../advertising-router, link-count; } } }
Release Information
Operator introduced in Junos Snapshot Administrator Release 1.0.