From ae3b28df67aa29254eeeba87fc82472bd49d9173 Mon Sep 17 00:00:00 2001 From: dhumal Date: Wed, 22 Nov 2017 21:41:41 -0800 Subject: [PATCH] Added check for 'memory' key in numa is present to use Change-Id: I80a091664ced7588bc0065c043a090c47a936893 Signed-off-by: dhumal --- osm_ro/vimconn_openstack.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/osm_ro/vimconn_openstack.py b/osm_ro/vimconn_openstack.py index 7b1415bc..65e17b5d 100644 --- a/osm_ro/vimconn_openstack.py +++ b/osm_ro/vimconn_openstack.py @@ -686,7 +686,9 @@ class vimconnector(vimconn.vimconnector): numa_properties["vmware:latency_sensitivity_level"] = "high" for numa in numas: #overwrite ram and vcpus - ram = numa['memory']*1024 + #check if key 'memory' is present in numa else use ram value at flavor + if 'memory' in numa: + ram = numa['memory']*1024 #See for reference: https://specs.openstack.org/openstack/nova-specs/specs/mitaka/implemented/virt-driver-cpu-thread-pinning.html if 'paired-threads' in numa: vcpus = numa['paired-threads']*2 -- 2.25.1