From a93c9001099eff3d628274cce2e6b10488a8435e Mon Sep 17 00:00:00 2001 From: PCoder Date: Mon, 1 Oct 2018 08:54:22 +0200 Subject: [PATCH] Pass 512 MB to memory parameter --- opennebula_api/models.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/opennebula_api/models.py b/opennebula_api/models.py index 0ce5e8a2..adc39bf0 100644 --- a/opennebula_api/models.py +++ b/opennebula_api/models.py @@ -249,8 +249,8 @@ class OpenNebulaManager(): vm_specs = vm_specs_formatter.format( vcpu=int(specs['cpu']), cpu=0.1 * int(specs['cpu']), - memory=1024 * int(specs['memory']), - + memory=(512 if specs['memory'] == 0.5 else + 1024 * int(specs['memory'])), ) vm_specs += """ fs @@ -269,8 +269,8 @@ class OpenNebulaManager(): vm_specs = vm_specs_formatter.format( vcpu=int(specs['cpu']), cpu=0.1 * int(specs['cpu']), - memory=1024 * int(specs['memory']), - + memory=(512 if specs['memory'] == 0.5 else + 1024 * int(specs['memory'])), ) vm_specs += """ fs