From 316496b9694d589d34dd102708a9480afb5302b6 Mon Sep 17 00:00:00 2001 From: PCoder Date: Tue, 9 Apr 2019 00:22:39 +0200 Subject: [PATCH] More fix for vcpu --- opennebula_api/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opennebula_api/serializers.py b/opennebula_api/serializers.py index ec7bd5d5..98162d1f 100644 --- a/opennebula_api/serializers.py +++ b/opennebula_api/serializers.py @@ -130,7 +130,7 @@ class VirtualMachineSerializer(serializers.Serializer): def get_price(self, obj): template = obj.template - price = float(template.vcpu) * 5.0 + price = float(template.cpu * 10) * 5.0 price += (int(template.memory) / 1024 * 2.0) for disk in template.disks: price += int(disk.size) / 1024 * 0.6