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

Updated ASA regex #841

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
--------------------------------------------------------------------------------
* ASA
* Modified ShowFailoverSchema:
* Updated regex to handle Ethernet type interface names
* Modified ShowVersionSchema:
* Updated regex to '/' in Processor type
4 changes: 2 additions & 2 deletions src/genie/libs/parser/asa/show_failover.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def cli(self, output=None):
# Failover LAN Interface: folink GigabitEthernet0/1 (up)
p3 = re.compile(
r'^Failover +LAN +Interface:\s(?P<name>[A-Za-z0-9\-\_]+)\s+'
'(?P<interface>(Lo\S*|Fa\S*|Gi\S*|Ten\S*|\S*(SL|VL)\S*|Se\S*|VoIP\S*|Configured))'
'(?P<interface>(Lo\S*|Fa\S*|Eth\S*|Gi\S*|Ten\S*|\S*(SL|VL)\S*|Se\S*|VoIP\S*|Configured))'
'( +\((?P<status>[A-Za-z0-0_\-\s]+)\))?$'
)

Expand Down Expand Up @@ -223,7 +223,7 @@ def cli(self, output=None):
p17_1 = re.compile(r'^Stateful +Failover +Logical +Update +Statistics$')
p17_2 = re.compile(
r'^Link\s+:\s+(?P<name>[A-Za-z0-9]+)\s+'
'(?P<interface>(Lo\S*|Fa\S*|Gi\S*|Ten\S*|\S*(SL|VL)\S*|Se\S*|VoIP\S*|Configured))'
'(?P<interface>(Lo\S*|Fa\S*|Eth\S*|Gi\S*|Ten\S*|\S*(SL|VL)\S*|Se\S*|VoIP\S*|Configured))'
'( +\((?P<status>[A-Za-z0-0_\-\s]+)\))?$'
)

Expand Down
2 changes: 1 addition & 1 deletion src/genie/libs/parser/asa/show_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def cli(self, output=None):
# Hardware: FPR9K-SM-24, 230696 MB RAM, CPU Xeon E5 series 2200 MHz, 2 CPUs (48 cores)
# Hardware: ASA5555, 16384 MB RAM, CPU Lynnfield 2800 MHz, 1 CPU (8 cores)
p7 = re.compile(r'^Hardware:\s+(?P<platform>\S+),\s+(?P<mem_size>[\w\s]+) RAM,'
r'\s+CPU (?P<processor_type>[\s\w]+),? ?(?P<cpu_count>\d+)?\s?(\w+|)? ?\(?(?P<core_count>\d+)?( cores\))?$')
r'\s+CPU (?P<processor_type>[\s\w\/]+),? ?(?P<cpu_count>\d+)?\s?(\w+|)? ?\(?(?P<core_count>\d+)?( cores\))?$')

# SSP Slot Number: 1
p7_1 = re.compile(r'^SSP Slot Number: (?P<ssp_slot_number>\d+)$')
Expand Down