Skip to content
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
----------------------
Fix
----------------------
* iosxe
* Modified class ShowInterfacesAccounting
* Modified regex pattern to support interface descriptions with multiple spaces
* Only right-strip whitespace from lines and modify regex for lines containing counters to add explicit leading
whitespace
7 changes: 4 additions & 3 deletions src/genie/libs/parser/iosxe/show_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -3828,10 +3828,11 @@ def cli(self, interface=None, output=None):
# initial regexp pattern
# GigabitEthernet0/0/0/0
# GigabitEthernet11 OOB Net
# TenGigabitEthernet0/0/0 rvartr101 e1/9 rack 107-37 N2C-BE VRF
# (need to exclude below line)
# -------------------------------------------------------------------------------------------------------------------------
p1 = re.compile(
r'^(?!-)(?P<interface>[a-zA-Z\-\d\/\.]+)(?P<description>( (\S)+)*)$'
r'^(?!-)(?P<interface>[a-zA-Z\-\d/.]+)(\s+(?P<description>[\S\s]+?))?$'
)

# Tunnel0 Pim Register Tunnel (Encap) for RP 10.186.1.1
Expand All @@ -3843,7 +3844,7 @@ def cli(self, interface=None, output=None):
# DEC MOP 2 154 2 154
# Other 15 900 861 370708 0 0 0 0
p2 = re.compile(
r'^(?P<protocol>\S+(\s\S+)?)\s+(?P<pkts_in>\d+)\s+(?P<chars_in>\d+)\s+(?P<pkts_out>\d+)\s+(?P<chars_out>\d+)(\s+(?P<rxbs>\d+)\s+(?P<rxps>\d+)\s+(?P<txbs>\d+)\s+(?P<txps>\d+))?'
r'^\s+(?P<protocol>\S+(\s\S+)?)\s+(?P<pkts_in>\d+)\s+(?P<chars_in>\d+)\s+(?P<pkts_out>\d+)\s+(?P<chars_out>\d+)(\s+(?P<rxbs>\d+)\s+(?P<rxps>\d+)\s+(?P<txbs>\d+)\s+(?P<txps>\d+))?'
)

# No traffic sent or received on this interface.
Expand All @@ -3852,7 +3853,7 @@ def cli(self, interface=None, output=None):

for line in out.splitlines():
if line:
line = line.strip()
line = line.rstrip()
else:
continue

Expand Down
Loading