From 5444e453ee6a0afeb6007c49b140e1252973c1d5 Mon Sep 17 00:00:00 2001 From: Roberto Hueso Gómez Date: Tue, 28 Apr 2020 11:16:59 +0200 Subject: Fix disk used size calculation This patch calculates correctly the percentage of disk used. This could cause an overflow on the ogAdmSever DB. --- src/virtual/ogOperations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/virtual/ogOperations.py') diff --git a/src/virtual/ogOperations.py b/src/virtual/ogOperations.py index e6aa506..ff9c937 100644 --- a/src/virtual/ogOperations.py +++ b/src/virtual/ogOperations.py @@ -170,7 +170,7 @@ class OgVirtualOperations: 'filesystem': '', 'os': '', 'size': int(free_disk / 1024), - 'used_size': int(100 * used_disk / free_disk)}, + 'used_size': int(100 * used_disk / total_disk)}, 'partition_setup': []} for i in range(4): part_json = {'disk': 1, -- cgit v1.2.3-18-g5258