-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
Parsing breaks when multiple results are returned from show commands due to the switches being stacked.
Error:
File "<PATH>/napalm_procurve/procurve.py", line 254, in get_facts
serial_number = line.split(" : ")[2].strip()
IndexError: list index out of range
Sample output:
SWITCH# show system
Status and Counters - General System Information
System Name : SWITCH
System Contact :
System Location :
MAC Age Time (sec) : 300
Time Zone : 60
Daylight Time Rule : Western-Europe
Software revision : WB.15.16.0005
Base MAC Addr : 1458d0-000000
Member :1
ROM Version : WB.15.05
Up Time : 152 days
CPU Util (%) : 0
MAC Addr : 1458d0-000000
Serial Number : SG40AAAAAA
Memory - Total : 165,446,144
Free : 80,752,020
Member :2
ROM Version : WB.15.05
Up Time : 117 days
CPU Util (%) : 17
MAC Addr : 1458d0-000000
Serial Number : SG49AAAAAA
Memory - Total : 165,446,144
Free : 92,550,468
Member :3
ROM Version : WB.15.05
Up Time : 152 days
CPU Util (%) : 0
MAC Addr : 3863bb-000000
Serial Number : SG4BAAAAAA
Memory - Total : 165,446,144
Free : 92,477,244
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels