From 3a8ec8803f50a7609d572d406ae74477c00764ee Mon Sep 17 00:00:00 2001 From: peusterm Date: Thu, 27 Apr 2017 14:44:54 +0200 Subject: [PATCH] Fix: Let dummy GK consider vcpus field in VNFDs --- src/emuvim/api/sonata/dummygatekeeper.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/emuvim/api/sonata/dummygatekeeper.py b/src/emuvim/api/sonata/dummygatekeeper.py index 59960a9..b6d1dd7 100755 --- a/src/emuvim/api/sonata/dummygatekeeper.py +++ b/src/emuvim/api/sonata/dummygatekeeper.py @@ -272,6 +272,8 @@ class Service(object): # 3. get the resource limits res_req = u.get("resource_requirements") cpu_list = res_req.get("cpu").get("cores") + if not cpu_list or len(cpu_list)==0: + cpu_list = res_req.get("cpu").get("vcpus") if not cpu_list or len(cpu_list)==0: cpu_list="1" cpu_bw = res_req.get("cpu").get("cpu_bw") -- 2.25.1