Skip to content

Commit

Permalink
cisco_ios_show_vrf.texfsm: Parse a vrf with no interfaces (#918)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpnetca authored Jul 7, 2021
1 parent 7578d4a commit 6032adb
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions ntc_templates/templates/cisco_ios_show_vrf.textfsm
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ Start_record
^\s{2}\S+ -> Continue.Record
^\s{60}\s+${INTERFACES}
^\s+${NAME}\s+${DEFAULT_RD}\s+${PROTOCOLS}\s+${INTERFACES}
^\s+${NAME}\s+${DEFAULT_RD}\s+${PROTOCOLS}

5 changes: 5 additions & 0 deletions tests/cisco_ios/show_vrf/cisco_ios_show_vrf_no_interface.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Name Default RD Protocols Interfaces
OOB-MGMT <not set> ipv4 Gi0/3
vpn21 65201:21 ipv4,ipv6 Gi0/0.21
Gi0/1.21
vpn22 65201:22 ipv4
17 changes: 17 additions & 0 deletions tests/cisco_ios/show_vrf/cisco_ios_show_vrf_no_interface.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
parsed_sample:
- default_rd: "<not set>"
interfaces:
- "Gi0/3"
name: "OOB-MGMT"
protocols: "ipv4"
- default_rd: "65201:21"
interfaces:
- "Gi0/0.21"
- "Gi0/1.21"
name: "vpn21"
protocols: "ipv4,ipv6"
- default_rd: "65201:22"
interfaces: []
name: "vpn22"
protocols: "ipv4"

0 comments on commit 6032adb

Please sign in to comment.