Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Sequential mode requires all input lines to appear in the source in the same order as entered. Additional text/lines may appear between them.

Example Input

...

3:

Code Block
languagetext
interface Ethernet1
 ip address 10.0.0.1/24

...

Both input lines appear in the source in the correct order. The "description Uplink" line between them is ignored.

Example Input

...

4:

Code Block
languagetext
 ip address 10.0.0.1/24
interface Ethernet1

...

Strict mode requires input lines to appear consecutively in the source. No additional text/lines may exist between the matching lines in the source.

Example Input

...

5:

Code Block
languagetext
interface Ethernet1
 description Uplink
 ip address 10.0.0.1/24

...

All three lines appear consecutively in the source.

Example Input

...

6:

Code Block
languagetext
interface Ethernet1
 ip address 10.0.0.1/24

...

The same three match modes is available for the Source matches regex condition type. Each input line is treated as a separate regular expression and matched against the source. The selected match mode controls how these regex inputs are matched: whether they can match in any order, must match in the specified order, or must match consecutively.

Loose Mode

Example Input 7:

Code Block
languagetext
router ospf
hostname R[0-9]+

...

This verifies that the device follows the R<number> hostname convention and has OSPF enabled. The two matches are independent, so their order does not matter.

Sequential Mode

Example Input 8:

Code Block
languagetext
router ospf
 network [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/([0-9]+) area [0-9]+

...

This verifies that an OSPF network statement appears after the router ospf command. Other matching lines may appear between the two lines.

Strict Mode

Example Input 9:

Code Block
languagetext
interface Loopback[0-9]+
 description Management Loopback
 ip address 10\.255\.255\.[0-9]+ 255\.255\.255\.255

...