resolve ResourceProviderSyncFailed issue

This is caused by the "/" operation difference between python 2.x and python 3.x

In python 2.x "/" int / int returns int while
in python 3.x int / int return the real result.

Closes-Bug: #1893864

Change-Id: I1aa96bdc2fdb2ca856b73b91e3120c75ec104537
(cherry picked from commit 73aad31a34)
This commit is contained in:
yingjisun 2020-07-22 19:12:31 +08:00 committed by Balazs Gibizer
parent 1c28a88afd
commit f5f184ea1b
1 changed files with 2 additions and 2 deletions

View File

@ -88,8 +88,8 @@ class VCState(object):
return data
data["vcpus"] = stats['cpu']['vcpus']
data["disk_total"] = capacity / units.Gi
data["disk_available"] = freespace / units.Gi
data["disk_total"] = capacity // units.Gi
data["disk_available"] = freespace // units.Gi
data["disk_used"] = data["disk_total"] - data["disk_available"]
data["host_memory_total"] = stats['mem']['total']
data["host_memory_free"] = stats['mem']['free']