Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cisco XR fix show vrf all detail template #1373

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions ntc_templates/templates/cisco_xr_show_vrf_all_detail.textfsm
Original file line number Diff line number Diff line change
@@ -1,17 +1,29 @@
Value VRF (\S+)
Value RD (\S+|not set)
Value List RT_IMPORT (\S+)
Value List RT_EXPORT (\S+)
Value VPN_ID (\S+|not set)
Value MODE (\S+)
Value DESCRIPTION (\S+|not set)
Value DESCRIPTION ([\S\s]+|not set)
Value List INTERFACES ([\w\./-]+)

Start
^\s*VRF\s\S+;\sRD\s.+;\sVPN\sID\s.+\s*$$ -> Continue.Record
^\s*VRF ${VRF}; RD ${RD}; VPN ID ${VPN_ID}\s*$$
^\s*VRF mode: ${MODE}\s*$$
^\s*Description ${DESCRIPTION}\s*$$
^\s*Address family.+$$ -> Record
^\s*Import\sVPN.*:+\s*$$ -> Rt_Import
^\s*Export\sVPN.*:+\s*$$ -> Rt_Export
^\s*Interfaces:+s*$$ -> Interfaces

Interfaces
^\s*${INTERFACES}\s*$$
^\s*Address family.+$$ -> Record Start
^\s*Address family.+$$ -> Start

Rt_Import
^\s*${RT_IMPORT}\s*$$
^\s*(Export\sVPN.*:|No\simport\sroute\spolicy)+\s*$$ -> Rt_Export

Rt_Export
^\s*${RT_EXPORT}\s*$$
^\s*No\simport\sroute\spolicy+\s*$$ -> Start
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,20 @@ Address family IPV6 Unicast
No import VPN route-target communities
No export VPN route-target communities
No import route policy
No export route policy
No export route policy

VRF vrf-test; RD not set; VPN ID not set
VRF mode: Regular
Description this is a description
Address family IPV4 Unicast
Import VPN route-target communities:
RT:65000:42
Export VPN route-target communities:
RT:65000:43
No import route policy
No export route policy
Address family IPV6 Unicast
No import VPN route-target communities
No export VPN route-target communities
No import route policy
No export route policy
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,25 @@ parsed_sample:
vpn_id: "not set"
mode: "Regular"
description: "not set"
rt_import: []
rt_export: []
interfaces: []
- vrf: "blue"
rd: "not set"
vpn_id: "not set"
mode: "Regular"
description: "not set"
rt_import: []
rt_export: []
interfaces:
- "BVI10"
- vrf: "green"
rd: "not set"
vpn_id: "not set"
mode: "Regular"
description: "not set"
rt_import: []
rt_export: []
interfaces:
- "GigabitEthernet200/0/0/1"
- "GigabitEthernet200/0/0/2"
Expand All @@ -37,6 +43,8 @@ parsed_sample:
vpn_id: "not set"
mode: "Regular"
description: "not set"
rt_import: []
rt_export: []
interfaces:
- "Loopback1"
- "Bundle-Ether10.10"
Expand All @@ -56,8 +64,18 @@ parsed_sample:
vpn_id: "not set"
mode: "Regular"
description: "not set"
rt_import: []
rt_export: []
interfaces:
- "GigabitEthernet100/0/0/10"
- "GigabitEthernet300/0/0/20"
- "Bundle-Ether10.10"
- "Bundle-Ether10.20"
- vrf: "vrf-test"
rd: "not set"
vpn_id: "not set"
mode: "Regular"
description: "this is a description"
rt_import: ["RT:65000:42"]
rt_export: ["RT:65000:43"]
interfaces: []