-
Notifications
You must be signed in to change notification settings - Fork 713
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhancement: split IP_ADDRESS_MASK into its two parts IP_ADDRESS and (#…
…1429) PREFIX_LENGTH
- Loading branch information
Showing
2 changed files
with
64 additions
and
51 deletions.
There are no files selected for viewing
5 changes: 3 additions & 2 deletions
5
ntc_templates/templates/cisco_ios_show_ip_ospf_interface_brief.textfsm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
Value INTERFACE (\S+) | ||
Value PROCESS (\d+) | ||
Value AREA (\d+) | ||
Value IP_ADDRESS_MASK (\d+\.\d+\.\d+\.\d+/\d+) | ||
Value IP_ADDRESS (\d+\.\d+\.\d+\.\d+) | ||
Value PREFIX_LENGTH (\d+) | ||
Value COST (\d+) | ||
Value STATE (\S+) | ||
Value NEIGHBORS_FC (\d+/\d+) | ||
|
||
Start | ||
^${INTERFACE}\s+${PROCESS}\s+${AREA}\s+${IP_ADDRESS_MASK}\s+${COST}\s+${STATE}\s+${NEIGHBORS_FC} -> Record | ||
^${INTERFACE}\s+${PROCESS}\s+${AREA}\s+${IP_ADDRESS}\/${PREFIX_LENGTH}\s+${COST}\s+${STATE}\s+${NEIGHBORS_FC} -> Record | ||
# Capture time-stamp if vty line has command time-stamping turned on | ||
^Load\s+for\s+ | ||
^Time\s+source\s+is |
110 changes: 61 additions & 49 deletions
110
tests/cisco_ios/show_ip_ospf_interface_brief/cisco_ios_show_ip_ospf_interface_brief.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,86 +1,98 @@ | ||
--- | ||
parsed_sample: | ||
- interface: "Lo0" | ||
process: "1" | ||
area: "0" | ||
ip_address_mask: "172.16.0.11/32" | ||
- area: "0" | ||
cost: "1" | ||
state: "LOOP" | ||
interface: "Lo0" | ||
ip_address: "172.16.0.11" | ||
neighbors_fc: "0/0" | ||
- interface: "Se0/0/0.100" | ||
prefix_length: "32" | ||
process: "1" | ||
area: "0" | ||
ip_address_mask: "172.16.1.1/30" | ||
state: "LOOP" | ||
- area: "0" | ||
cost: "50" | ||
state: "P2P" | ||
interface: "Se0/0/0.100" | ||
ip_address: "172.16.1.1" | ||
neighbors_fc: "1/1" | ||
- interface: "Fa0/0" | ||
prefix_length: "30" | ||
process: "1" | ||
area: "0" | ||
ip_address_mask: "10.0.0.5/24" | ||
state: "P2P" | ||
- area: "0" | ||
cost: "1" | ||
state: "BDR" | ||
interface: "Fa0/0" | ||
ip_address: "10.0.0.5" | ||
neighbors_fc: "1/1" | ||
- interface: "Fa0/1" | ||
prefix_length: "24" | ||
process: "1" | ||
area: "11" | ||
ip_address_mask: "10.1.2.1/24" | ||
state: "BDR" | ||
- area: "11" | ||
cost: "1" | ||
state: "DR" | ||
interface: "Fa0/1" | ||
ip_address: "10.1.2.1" | ||
neighbors_fc: "0/0" | ||
- interface: "Tu1610" | ||
prefix_length: "24" | ||
process: "1" | ||
area: "0" | ||
ip_address_mask: "0.0.0.0/0" | ||
state: "DR" | ||
- area: "0" | ||
cost: "50" | ||
state: "P2P" | ||
interface: "Tu1610" | ||
ip_address: "0.0.0.0" | ||
neighbors_fc: "0/0" | ||
- interface: "Lo5" | ||
prefix_length: "0" | ||
process: "1" | ||
area: "0" | ||
ip_address_mask: "10.48.8.5/32" | ||
state: "P2P" | ||
- area: "0" | ||
cost: "1" | ||
state: "LOOP" | ||
interface: "Lo5" | ||
ip_address: "10.48.8.5" | ||
neighbors_fc: "0/0" | ||
- interface: "Lo4" | ||
prefix_length: "32" | ||
process: "1" | ||
area: "0" | ||
ip_address_mask: "10.48.8.4/32" | ||
cost: "1" | ||
state: "LOOP" | ||
- area: "0" | ||
cost: "1" | ||
interface: "Lo4" | ||
ip_address: "10.48.8.4" | ||
neighbors_fc: "0/0" | ||
- interface: "Tu1603" | ||
prefix_length: "32" | ||
process: "1" | ||
area: "0" | ||
ip_address_mask: "0.0.0.0/0" | ||
state: "LOOP" | ||
- area: "0" | ||
cost: "50" | ||
state: "DOWN" | ||
interface: "Tu1603" | ||
ip_address: "0.0.0.0" | ||
neighbors_fc: "0/0" | ||
- interface: "Tu1602" | ||
prefix_length: "0" | ||
process: "1" | ||
area: "0" | ||
ip_address_mask: "0.0.0.0/0" | ||
state: "DOWN" | ||
- area: "0" | ||
cost: "50" | ||
state: "P2P" | ||
interface: "Tu1602" | ||
ip_address: "0.0.0.0" | ||
neighbors_fc: "0/0" | ||
- interface: "PO4/0" | ||
prefix_length: "0" | ||
process: "1" | ||
area: "0" | ||
ip_address_mask: "10.1.232.6/30" | ||
cost: "6" | ||
state: "P2P" | ||
- area: "0" | ||
cost: "6" | ||
interface: "PO4/0" | ||
ip_address: "10.1.232.6" | ||
neighbors_fc: "1/1" | ||
- interface: "Se3/2:0" | ||
prefix_length: "30" | ||
process: "1" | ||
area: "0" | ||
ip_address_mask: "10.1.224.218/30" | ||
cost: "6" | ||
state: "P2P" | ||
- area: "0" | ||
cost: "6" | ||
interface: "Se3/2:0" | ||
ip_address: "10.1.224.218" | ||
neighbors_fc: "1/1" | ||
- interface: "Se3/1:0" | ||
prefix_length: "30" | ||
process: "1" | ||
area: "0" | ||
ip_address_mask: "10.1.225.150/30" | ||
cost: "6" | ||
state: "P2P" | ||
- area: "0" | ||
cost: "6" | ||
interface: "Se3/1:0" | ||
ip_address: "10.1.225.150" | ||
neighbors_fc: "1/1" | ||
prefix_length: "30" | ||
process: "1" | ||
state: "P2P" |