Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

delta operator

Syntax (Junos Snapshot Administrator - SLAX)

Syntax (JSNAPy)

Description

Junos Snapshot Administrator test operator that compares the change in value of a specified data element, which must be present in both snapshots, to a specified delta. You can define the delta as an absolute, positive, or negative percentage, or as an absolute, positive, or negative fixed value.

When you use the delta operator, you must include the id parameter with one or more values. By providing an id, the tool can correctly map the data item in the first snapshot to the equivalent item in the second snapshot and compare them.

Parameters

delta-value

Delta value expressed as a percentage or fixed value and against which the change in the element value is compared.

Expressed as a percentage:

  • Absolute percentage—Indicates that either an increase or decrease in the value greater than the absolute percentage is an error, for example, 10%.

  • Positive percentage—Indicates that only an increase in the value greater than the absolute percentage is an error, for example, +10%.

  • Negative percentage—Indicates that only a decrease in the value greater than the absolute percentage is an error, for example, -10%.

Expressed as a fixed value:

  • Absolute fixed value—Indicates that either an increase or decrease in the value greater than the absolute value is an error, for example, 500.

  • Positive fixed value—Indicates that only an increase in the value greater than the absolute value is an error, for example, +500.

  • Negative fixed value—Indicates that only a decrease in the value greater than the absolute value is an error, for example, -500.

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:

  • In SLAX, define multiple id statements.

  • In Python, define a list or a string of comma-separated IDs.

info string

Description of the test case.

xpath-expression

XPath expression selecting the elements to evaluate.

Usage Examples

The following Junos Snapshot Administrator (SLAX) test cases check the BGP route prefix count after a maintenance window. To ensure that the BGP peers were restored, the code checks the prefix counts for a delta change of -10%. That is, if the new prefix count is less than 90% of the original prefix count, the test reports an error.

The following JSNAPy test case checks the BGP active prefix count after a maintenance window. If the active prefix count changes by more than 20 percent, the test fails.

Release Information

Operator introduced in Junos Snapshot Administrator Release 1.0.