...
| Code Block | ||
|---|---|---|
| ||
description LAN hostname R1 |
ResultStatus: Condition successful
Although the order of the input lines differs from the source, both lines are present.
...
| Code Block | ||
|---|---|---|
| ||
hostname R1 description WAN |
ResultStatus: Condition failed
The line description WAN does not exist in the source.
...
| Code Block | ||
|---|---|---|
| ||
router ospf hostname R[0-9]+ |
ResultStatus: Condition successful
This verifies that the device follows the R<number> hostname convention and has OSPF enabled. The order of the matches does not matter.
...
| Code Block | ||
|---|---|---|
| ||
router ospf hostname R[A-Z]+ |
ResultStatus: Condition failed
The router ospf line matches the source, but hostname R[A-Z]+ regex does not match hostname R1. Because all input lines must match the source, the condition fails.
...
| Code Block | ||
|---|---|---|
| ||
interface Ethernet1 ip address 10.0.0.1 255.255.255.0 |
ResultStatus: Condition successful
Both input lines appear in the source in the correct order. The "description Uplink" line between them is ignored.
...
| Code Block | ||
|---|---|---|
| ||
ip address 10.0.0.1 255.255.255.0 interface Ethernet1 |
ResultStatus: Condition failed
The input lines appear in the source in reverse order.
...
| Code Block | ||
|---|---|---|
| ||
router ospf network [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+ 0\.0\.0\.[0-9]+ area [0-9]+ |
ResultStatus: Condition successful
This verifies that an OSPF network statement appears after the "router ospf" command. Other matching lines may appear between the two lines.
...
| Code Block | ||
|---|---|---|
| ||
network [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+ 0\.0\.0\.[0-9]+ area [0-9]+ router ospf |
ResultStatus: Condition failed
Both lines are present in the source, but they appear in the opposite order. Sequential mode therefore fails.
...
| Code Block | ||
|---|---|---|
| ||
interface Ethernet1 description Uplink ip address 10.0.0.1 255.255.255.0 |
ResultStatus: Condition successful
All three lines appear consecutively in the source.
...
| Code Block | ||
|---|---|---|
| ||
interface Ethernet1 ip address 10.0.0.1 255.255.255.0 |
ResultStatus: Condition failed
The source contains the line "description Uplink" between the two input lines. Strict mode therefore fails.
...
| Code Block | ||
|---|---|---|
| ||
interface Loopback[0-9]+ description Management Loopback ip address 10\.255\.255\.[0-9]+ 255\.255\.255\.255 |
ResultStatus: Condition successful
This verifies that a Loopback interface with a variable interface number has the required "Management Loopback" description and uses a /32 address matching the 10.255.255.x pattern.
...
| Code Block | ||
|---|---|---|
| ||
interface Loopback[0-9]+ ip address 10\.255\.255\.[0-9]+ 255\.255\.255\.255 |
ResultStatus: Condition failed
Both lines match in the source, but the description Management Loopback line appears between them. Strict mode requires the matching lines to be consecutive, so the condition fails.
...