Set VCPUs and RAM for the VNFC irrespective of Numa Node Policy of the Guest EPA 75/1475/1
authorJithin Jose <jithin.jose@riftio.com>
Mon, 3 Apr 2017 10:32:58 +0000 (10:32 +0000)
committerJithin Jose <jithin.jose@riftio.com>
Mon, 3 Apr 2017 10:32:58 +0000 (10:32 +0000)
Signed-off-by: Jithin Jose <jithin.jose@riftio.com>
models/openmano/python/rift/openmano/rift2openmano.py

index 8043646..e7d2e35 100755 (executable)
@@ -499,12 +499,11 @@ def rift2openmano_vnfd(rift_vnfd, rift_nsd):
                 if vdu.vm_flavor.has_field("vcpu_count"):
                     vnfc["numas"][0]["cores"] = max(vdu.vm_flavor.vcpu_count, 1)
 
-        else:
-            if vdu.vm_flavor.has_field("vcpu_count") and vdu.vm_flavor.vcpu_count:
-                vnfc["vcpus"] = vdu.vm_flavor.vcpu_count
+        if vdu.vm_flavor.has_field("vcpu_count") and vdu.vm_flavor.vcpu_count:
+            vnfc["vcpus"] = vdu.vm_flavor.vcpu_count
 
-            if vdu.vm_flavor.has_field("memory_mb") and vdu.vm_flavor.memory_mb:
-                vnfc["ram"] = vdu.vm_flavor.memory_mb
+        if vdu.vm_flavor.has_field("memory_mb") and vdu.vm_flavor.memory_mb:
+            vnfc["ram"] = vdu.vm_flavor.memory_mb
 
 
         if vdu.has_field("hypervisor_epa"):