kernelkit / infix

Linux :yellow_heart: NETCONF = Infix
https://kernelkit.org
GNU General Public License v2.0
52 stars 12 forks source link

yanger: handle all frr uptime formats #690

Closed rical closed 1 month ago

rical commented 1 month ago

Description

FRR prints uptime different based on how long it is. Prior to this commit yanger expected uptime to be on the format HH:MM:SS which it is as long as it's shorter than a day. If it's longer the format changes, this commit handles this.

The commit also adds unit test data triggering the different formats (<day, <week, >week).

Side note

cli-pretty could be made to represent the data on "FRR format" again, which is perhaps more human friendly.

Checklist