mirror of
https://github.com/ThomasGsp/HyperProxmox.git
synced 2025-02-13 03:32:16 +00:00
Proxmox 4 compatibility
This commit is contained in:
parent
2086a0aa48
commit
04f03dc3bb
1 changed files with 6 additions and 1 deletions
|
@ -155,10 +155,15 @@ class Analyse:
|
|||
node_status["totalalloccpu"] = totalcpu
|
||||
node_status["totalallocram"] = totalram
|
||||
node_status["vmcount"] = len(list_instances["data"])
|
||||
node_status["status"] = value_nodes_list["status"]
|
||||
node_status["type"] = value_nodes_list["type"]
|
||||
node_status["node"] = value_nodes_list["node"]
|
||||
|
||||
""" Proxmox-v4 compatibility """
|
||||
try:
|
||||
node_status["status"] = value_nodes_list["status"]
|
||||
except BaseException:
|
||||
node_status["status"] = "Online"
|
||||
|
||||
percent_cpu_alloc = (totalcpu / value_nodes_list["maxcpu"]) * 100
|
||||
percent_ram_alloc = (totalram / value_nodes_list["mem"]) * 100
|
||||
|
||||
|
|
Loading…
Reference in a new issue