From: dhumal Date: Thu, 23 Nov 2017 05:41:41 +0000 (-0800) Subject: Added check for 'memory' key in numa is present to use X-Git-Tag: v3.0.2^0 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F24%2F5724%2F2;p=osm%2FRO.git Added check for 'memory' key in numa is present to use Change-Id: I80a091664ced7588bc0065c043a090c47a936893 Signed-off-by: dhumal --- 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