-
Notifications
You must be signed in to change notification settings - Fork 788
Add cisco_xr_show_running-config_interface #2241
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
Open
jorlandobr
wants to merge
35
commits into
networktocode:master
Choose a base branch
from
jorlandobr:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
a4d07d8
Create cisco_xr_show_running-config_interface.raw
jorlandobr ebb351e
Add files via upload
jorlandobr d3a5b69
Add files via upload
jorlandobr 658c2a9
Update index
jorlandobr 7b93b86
Update index
jorlandobr f4a36b2
Update ntc_templates/templates/cisco_xr_show_running-config_interface…
jorlandobr ce6591b
Update ntc_templates/templates/cisco_xr_show_running-config_interface…
jorlandobr a09bdac
Update ntc_templates/templates/cisco_xr_show_running-config_interface…
jorlandobr ada1cb0
Update ntc_templates/templates/cisco_xr_show_running-config_interface…
jorlandobr 5233e42
Update cisco_xr_show_running-config_interface.raw
jorlandobr f1d3408
Regenerate XR test data with MTU defined
mjbear 1e99cfd
Add files via upload
jorlandobr b58d0c5
Update cisco_xr_show_running-config_interface.yml
jorlandobr 1f8a092
Update cisco_xr_show_running-config_interface.yml
jorlandobr cbb6180
Update cisco_xr_show_running-config_interface.yml
jorlandobr 5d56720
Update cisco_xr_show_running-config_interface.yml
jorlandobr b45cc54
Update cisco_xr_show_running-config_interface.yml
jorlandobr 6f00d42
Update cisco_xr_show_running-config_interface.yml
jorlandobr 7d54747
Update cisco_xr_show_running-config_interface.yml
jorlandobr de84e12
Update ntc_templates/templates/cisco_xr_show_running-config_interface…
jorlandobr 6dba580
Normalize IP_NETMASK to be NETMASK
mjbear 01fad39
Normalize inner/outer Q-in-Q capture groups
mjbear 96a7bab
Change recording pattern and match date
mjbear af9cac4
Add ipv4 secondary address to test data
mjbear 4c32ccc
Add second IPv6 address and handle eui-64 ones
mjbear 819e346
Change IP address capture groups to plural
mjbear ffd946a
Change IPv6 prefix length capture group name
mjbear 8feb15d
Change netmask and IPv6 prefix length to plural
mjbear 7bab46b
Refactor regex patterns in Cisco XR template
jorlandobr e4590b7
Update running-config for new interfaces and settings
jorlandobr cb4f1e1
Refactor interface configurations in YAML file
jorlandobr 8570e97
Refactor interface configuration in YAML file
jorlandobr b027dd7
Replace null with 'None' in prefixv6_lengths
jorlandobr e9671e9
Change ip_netmasks to netmasks (normalization)
mjbear 20f7d97
Change prefixv6_lengths to ipv6_prefix_lengths
mjbear File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
59 changes: 59 additions & 0 deletions
59
ntc_templates/templates/cisco_xr_show_running-config_interface.textfsm
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| Value Required INTERFACE (\S+) | ||
| Value DESCRIPTION (.*) | ||
| Value BANDWIDTH (\d+) | ||
| Value OUTER_VLAN (\d+) | ||
| Value INNER_VLAN (\d+) | ||
| Value VRF (\S+) | ||
| Value MAC_ADDRESS (\S+?) | ||
| Value List IP_ADDRESSES (\d+.\d+.\d+.\d+) | ||
| Value List NETMASKS (\d+.\d+.\d+.\d+) | ||
| Value List IPV6_ADDRESSES ([0-9a-fA-F:]+) | ||
| Value List IPV6_PREFIX_LENGTHS (\d+) | ||
| Value LOAD_INTERVAL (\d+) | ||
| Value MTU (\d+) | ||
| Value MTU_IPV4 (\d+) | ||
| Value UNICAST_SOURCE (\S+) | ||
| Value UNICAST_SOURCE_V6 (\S+) | ||
| Value INPUT_POLICY (\S+) | ||
| Value OUTPUT_POLICY (\S+) | ||
| Value ACCESS_GROUP (\S+) | ||
| Value ACCESS_GROUP_V6 (\S+) | ||
| Value FLOW_MONITOR (\S+) | ||
| Value FLOW_MONITOR_V6 (\S+) | ||
| Value FLOW_MPLS (\S+) | ||
| Value FLOW_SAMPLER (\S+) | ||
| Value FLOW_SAMPLER_V6 (\S+) | ||
| Value FLOW_MPLS_SAMPLER (\S+) | ||
|
|
||
| Start | ||
| ^interface\s+${INTERFACE} | ||
| ^\s+description\s+${DESCRIPTION} | ||
| ^\s+bandwidth\s+${BANDWIDTH} | ||
| ^\s+service-policy\s+input\s+${INPUT_POLICY} | ||
| ^\s+service-policy\s+output\s+${OUTPUT_POLICY} | ||
| ^\s+vrf\s+${VRF} | ||
| ^\s+ipv4\s+address\s+${IP_ADDRESSES}\s+${NETMASKS}(?:\s+secondary)? | ||
| ^\s+ipv4\s+verify\s+unicast\s+source\s+reachable-via\s+${UNICAST_SOURCE}(?:\s+allow\S)? | ||
| ^\s+ipv4\s+unnumbered\s+\S | ||
| ^\s+ipv6\s+(nd|verify)\s+\S | ||
| ^\s+ipv(4|6)\s+flowspec\s+disable | ||
| ^\s+ipv6\s+verify\s+unicast\s+source\s+reachable-via\s+${UNICAST_SOURCE_V6}\s+allow-self-ping | ||
| ^\s+ipv6\s+address\s+${IPV6_ADDRESSES}(?:\/+${IPV6_PREFIX_LENGTHS})?((?:\s+\S)?) | ||
| ^\s+mac-address\s+${MAC_ADDRESS} | ||
| ^\s+mtu\s+${MTU} | ||
| ^\s+ipv4\s+mtu\s+${MTU_IPV4} | ||
| ^\s+ipv6\s+enable | ||
| ^\s+ipv6\s+mtu\s+\S | ||
| ^\s+load-interval\s+${LOAD_INTERVAL} | ||
| ^\s+flow\s+ipv4\s+monitor\s+${FLOW_MONITOR}\s+sampler\s+${FLOW_SAMPLER}\s+ingress | ||
| ^\s+flow\s+ipv6\s+monitor\s+${FLOW_MONITOR_V6}\s+sampler\s+${FLOW_SAMPLER_V6}\s+ingress | ||
| ^\s+flow\s+mpls\s+monitor\s+${FLOW_MPLS}\s+sampler\s+${FLOW_MPLS_SAMPLER}\s+ingress | ||
| ^\s+encapsulation\s+(?:untagge|dot1q\s+${OUTER_VLAN})?(?:\s+second-dot1q\s+${INNER_VLAN})? | ||
| ^\s+(mac-accounting|satellite-fabric-link|bfd|remote-ports|rewrite|carrier-delay|lacp|!) | ||
| ^\s+(bundle|dampening|mpls|shutdown|nv|lldp|l2transport|cdp|negotiation|ethernet|speed|logging) | ||
| ^\s+ipv4\s+access-group\s+${ACCESS_GROUP}\s+(ingress|egress) | ||
| ^\s+ipv6\s+access-group\s+${ACCESS_GROUP_V6}\s+(ingress|egress) | ||
| ^\S+ -> Record | ||
| # date stamp | ||
| ^\w+\s+\w+\s+\d+ | ||
| ^. -> Error |
This file contains hidden or 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
137 changes: 137 additions & 0 deletions
137
tests/cisco_xr/show_running-config_interface/cisco_xr_show_running-config_interface.raw
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,137 @@ | ||
| Thu Nov 6 12:54:14.972 BRA | ||
| interface TenGigE2/1/0/0.1234256 | ||
| description TESTONE | 50M | ||
| bandwidth 50000 | ||
| service-policy input IN_BAND_S_50000_V1 | ||
| service-policy output OUT_BAND_S_50000_V1 | ||
| ipv4 address 10.242.26.65 255.255.255.252 | ||
| ipv4 verify unicast source reachable-via rx allow-self-ping | ||
| ipv6 verify unicast source reachable-via tx allow-self-ping | ||
| ipv6 address fe80:a8:2:b0::309/126 | ||
| load-interval 30 | ||
| encapsulation dot1q 1234 | ||
| ipv4 access-group iACL ingress | ||
| ipv6 access-group FilterPackIPv6 ingress | ||
| ! | ||
| interface TenGigE2/4/0/2.22227 | ||
| description PEOPLE | 100M | ||
| bandwidth 100000 | ||
| service-policy input IN_BAND_S_100000_V1 | ||
| service-policy output OUT_BAND_S_100000_V1 | ||
| ipv4 address 10.23.125.209 255.255.255.252 | ||
| ipv4 verify unicast source reachable-via tx allow-self-ping | ||
| ipv6 verify unicast source reachable-via rx allow-self-ping | ||
| ipv6 address fe80:a8:2:b8::a671/126 | ||
| load-interval 30 | ||
| encapsulation dot1q 2222 second-dot1q 7 | ||
| ipv4 access-group iACL ingress | ||
| ipv6 access-group FilterPackIPv6 ingress | ||
| ! | ||
| interface TenGigE2/4/0/2.22229 | ||
| description AVENIDA | 100M | ||
| bandwidth 100000 | ||
| service-policy input IN_BAND_S_100000_V1 | ||
| service-policy output OUT_BAND_S_100000_V1 | ||
| ipv4 address 10.228.247.93 255.255.255.252 | ||
| ipv4 verify unicast source reachable-via any allow-self-ping | ||
| ipv6 verify unicast source reachable-via any allow-self-ping | ||
| ipv6 address fe80:a8:2:b8::10ed/126 | ||
| load-interval 30 | ||
| encapsulation dot1q 2222 second-dot1q 9 | ||
| ipv4 access-group iACL ingress | ||
| ipv6 access-group FilterPackIPv6 ingress | ||
| ! | ||
| interface TenGigE2/4/0/2.10012 | ||
| description MONTE EVEREST | 1500K | ||
| bandwidth 1500 | ||
| service-policy output OUT_SIP_VOICE_1500 | ||
| vrf FONE_CLIENT:5341 | ||
| ipv4 address 10.86.193.193 255.255.255.252 | ||
| ipv4 verify unicast source reachable-via rx allow-self-ping | ||
| load-interval 30 | ||
| encapsulation dot1q 1001 second-dot1q 2 | ||
| ! | ||
| interface TenGigE2/4/0/2.1002 | ||
| description TEST PASS| 100M | ||
| bandwidth 100000 | ||
| service-policy input IN_100000K_1_0_1_0_0_1_1 | ||
| service-policy output OUT_100000K_1_0_1_0_0_1_1 | ||
| vrf FEED_HUB:1245 | ||
| ipv4 address 10.245.37.157 255.255.255.252 | ||
| ipv6 address fe80:a8:2:2b8::751/126 | ||
| load-interval 30 | ||
| encapsulation dot1q 1002 | ||
| ! | ||
| interface TenGigE2/4/0/2.10023 | ||
| description BLUE | 2048K | ||
| bandwidth 2048 | ||
| service-policy input IN_BLUE_2M_0_0_0_98_0_1_XR_V1 | ||
| service-policy output OUT_BLUE_2M_0_0_0_98_0_1_XR_V1 | ||
| vrf OBS_CHIN:1236 | ||
| ipv4 address 192.168.226.53 255.255.255.252 | ||
| ipv6 address fe80:a8:2:2b8::ac5/126 | ||
| load-interval 30 | ||
| encapsulation dot1q 1002 second-dot1q 3 | ||
| ! | ||
| interface TenGigE3/0/0/0 | ||
| description TEST MTU and FLOW | ||
| mtu 9216 | ||
| ipv4 mtu 9000 | ||
| flow ipv4 monitor IPV4-MONITOR sampler IPV4-SAMPLER ingress | ||
| flow ipv6 monitor IPV6-MONITOR sampler IPV6-SAMPLER ingress | ||
| flow mpls monitor MPLS-MONITOR sampler MPLS-SAMPLER ingress | ||
| ! | ||
| interface TenGigE3/0/0/1 | ||
| description TEST EGRESS ACL | ||
| shutdown | ||
| ipv4 access-group iACL-IN ingress | ||
| ipv4 access-group iACL-OUT egress | ||
| ipv6 access-group FilterPackIPv6-IN ingress | ||
| ipv6 access-group FilterPackIPv6-OUT egress | ||
| ! | ||
| interface Bundle-Ether10 | ||
| description TEST STRINGS | ||
| bfd mode ietf | ||
| bfd address-family ipv4 multiplier 3 | ||
| bfd address-family ipv4 destination 10.230.130.4 | ||
| bfd address-family ipv4 fast-detect | ||
| bfd address-family ipv4 minimum-interval 100 | ||
| mtu 9208 | ||
| lldp | ||
| ipv4 flowspec disable | ||
| ipv6 flowspec disable | ||
| service-policy output SubRate_200 | ||
| mac-accounting ingress | ||
| encapsulation dot1q 31 exact | ||
| rewrite ingress tag pop 1 symmetric | ||
| ipv4 mtu 9180 | ||
| ipv4 address 10.230.130.5 255.255.255.254 | ||
| ipv6 address 2804:a8:2:b8::13a9/126 | ||
| ipv6 address fe80::1000:16:3/126 link-local | ||
| ipv6 address fe80::1000:16:2 link-local | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The missing prefix length on raw file line 111, and 113 likely resulted in the The /19 prefix length on line 114 may seem off, but is otherwise valid. |
||
| ipv6 address fe80:388:129:16::3/64 eui-64 | ||
| ipv6 address fe80:388:129:16::24 eui-64 | ||
| ipv6 address fe80:0cB8:0:1::/19 | ||
| ipv6 address fe80:0D18:0:1::/64 eui-64 | ||
| logging events link-status | ||
| mpls | ||
| mtu 9180 | ||
| ! | ||
| interface Bundle-Ether100 | ||
| shutdown | ||
| description satellite100 | ||
| cdp | ||
| carrier-delay up 0 down 0 | ||
| lacp period short | ||
| load-interval 30 | ||
| dampening | ||
| ethernet udld | ||
| l2transport | ||
| speed 1000 | ||
| negotiation auto | ||
| nv | ||
| satellite-fabric-link satellite 100 | ||
| remote-ports GigabitEthernet 0/0/0 - 43 | ||
| ! | ||
| ! | ||
| ! | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.