From 948af86c4138d4e11eae38f0e0a98efceb0a7c2e Mon Sep 17 00:00:00 2001 From: Hongbin Lu Date: Sun, 26 Jan 2020 21:11:11 +0000 Subject: [PATCH] Treat cpu as float (not integer) Change-Id: I288f833b69693dc36934549a13123415a71e1578 Closes-Bug: #1860937 --- zun/objects/container.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zun/objects/container.py b/zun/objects/container.py index 4a0a14917..1d1df738e 100644 --- a/zun/objects/container.py +++ b/zun/objects/container.py @@ -371,7 +371,7 @@ class ContainerBase(base.ZunPersistentObject, base.ZunObject): - disk: The sum of container's disk size. """ usage = dbapi.count_usage(context, cls.container_type, project_id, - flag)[0] or 0 + flag)[0] or 0.0 return usage