is-equal operator
Syntax
is-equal xpath-expression, value { info string; err "string"; [err "string";] }
Description
Junos Snapshot Administrator test operator that tests if the XML element string or integer value matches a given value.
Parameters
err string | Statement generated when the test case returns false. |
info string | Description of the test case. |
value | String or integer value against which the element value is compared. Enclose string values in quotation marks. |
xpath-expression | XPath expression selecting the elements to evaluate. |
Usage Examples
The following test case prints an error if the Routing Engine in slot 0 (re0) is not the primary Routing Engine.
re0-master { command show chassis routing-engine; item route-engine[slot = '0'] { is-equal mastership-state, "master" { info re0 is always master; err " re0 is not master, rather %s", mastership-state; err " Correct so that re0 is the master Routing Engine!"; } } }
Release Information
Operator introduced in Junos Snapshot Administrator Release 1.0.