Open
Description
Hello,
Found an issue for get_facts function, on Fortigate cluster 7.0.X :
sys_perf_uptime = self._send_command( "get system performance status | grep Uptime" )
Will raise an error.
Fix proposal for cluster :
sys_perf_uptime = self._send_command( "get system status | grep uptime" )
uptime_formatted = ( sys_perf_uptime.replace("Cluster uptime: ", "") .replace(" days,", ":") .replace(" hours,", ":") .replace(" minutes,", ":") .replace(" seconds", ":") )
uptime_dict = dict(zip(("d", "h", "m", "s"), uptime_formatted.split(":"))) uptime = ( int(uptime_dict["s"]) + int(uptime_dict["m"]) * 60 + int(uptime_dict["h"]) * 60 * 60 + int(uptime_dict["d"]) * 60 * 60 * 24 )
Thanks for your work.
Adrien,
Metadata
Assignees
Labels
No labels