Merge "Bug 260 - Termination Logic for Scaled Instances" into v2.0
[osm/SO.git] / models / openmano / python / rift / openmano / rift2openmano.py
index 61e195b..e037093 100755 (executable)
@@ -559,6 +559,9 @@ def rift2openmano_vnfd(rift_vnfd, rift_nsd):
             if numa_node_policy.has_field("node"):
                 numa_node = numa_node_policy.node[0]
 
+                if numa_node.has_field("num_cores"):
+                    vnfc["numas"][0]["cores"] = numa_node.num_cores
+
                 if numa_node.has_field("paired_threads"):
                     if numa_node.paired_threads.has_field("num_paired_threads"):
                         vnfc["numas"][0]["paired-threads"] = numa_node.paired_threads.num_paired_threads
@@ -569,6 +572,8 @@ def rift2openmano_vnfd(rift_vnfd, rift_nsd):
                                      [pair.thread_a, pair.thread_b]
                                      )
 
+                if numa_node.has_field("num_threads"):
+                    vnfc["numas"][0]["threads"] = numa_node.num_threads
             else:
                 if vdu.vm_flavor.has_field("vcpu_count"):
                     vnfc["numas"][0]["cores"] = max(vdu.vm_flavor.vcpu_count, 1)