Add total RAM, CPUs and disk size to servers summary as well as disk usage in percent. Fixes https://github.com/GNS3/gns3-server/issues/1532

This commit is contained in:
grossmj committed 2020-07-19 14:16:07 +09:30
1 parent 00a6765405
commit 3dc4ea46d6
11 files changed
+69 -9

No files matched your search

+13 -1
View File
@@ -36,7 +36,19 @@ CAPABILITIES_SCHEMA = {
"platform": {
"type": "string",
"description": "Platform where the compute is running"
}
},
"cpus": {
"description": "Number of CPUs on this compute. Read only",
"type": ["integer", "null"],
},
"memory": {
"description": "Amount of memory on this compute. Read only",
"type": ["integer", "null"],
},
"disk_size": {
"description": "Disk size on this compute. Read only",
"type": ["integer", "null"],
},
},
"additionalProperties": False
}
+6
View File
@@ -104,6 +104,12 @@ COMPUTE_OBJECT_SCHEMA = {
"maximum": 100,
"minimum": 0
},
"disk_usage_percent": {
"description": "Disk usage of the compute. Read only",
"type": ["number", "null"],
"maximum": 100,
"minimum": 0
},
"last_error": {
"description": "Last error on the compute",
"type": ["string", "null"]