Return cores as int

This commit is contained in:
PCoder 2019-04-09 08:56:10 +02:00
parent fa018739c9
commit 5b7d1301cf
1 changed files with 1 additions and 1 deletions

View File

@ -100,7 +100,7 @@ class VirtualMachineSerializer(serializers.Serializer):
return manager.get_vm(opennebula_id)
def get_cores(self, obj):
return float(obj.template.cpu) * 10
return int(float(obj.template.cpu) * 10)
def get_memory(self, obj):
return int(obj.template.memory) / 1024