nots
nots copied to clipboard
Uptime parser needs to account for different formats
NXOS shown below. Likely true on XR as well. First neighbor has been up for 1 day and the format is markedly different than the double-colon notation.
OSPF Process ID 1 VRF default
Total number of neighbors: 2
Neighbor ID Pri State Up Time Address Interface
2.2.2.2 1 FULL/ - 1d00h 192.168.0.2 Eth1/43
2.2.2.2 1 FULL/BDR 06:55:58 192.168.17.6 Eth1/45
Static value of 0
is used for uptime_sec
in this case whenever the original uptime
string does not contain exactly two colons. Since this total of seconds is not used anywhere in any test to date, there is no operational impact. The correct solution is to count the seconds based on the hours, days, weeks, and years indicated by the uptime.