NSB: ignore VNF node if there is no VNF model 81/43481/1
authorRoss Brattain <ross.b.brattain@intel.com>
Thu, 28 Sep 2017 02:08:06 +0000 (19:08 -0700)
committerRoss Brattain <ross.b.brattain@intel.com>
Thu, 28 Sep 2017 14:46:58 +0000 (07:46 -0700)
Change-Id: I571289c744441a6114c6d45ac6cbd7cfc0dafef2
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
yardstick/benchmark/scenarios/networking/vnf_generic.py

index 450f83f..6cea51b 100644 (file)
@@ -542,7 +542,11 @@ printf "%s/driver:" $1 ; basename $(readlink -s $1/device/driver); } \
         # we assume OrderedDict for consistenct in instantiation
         for node_name, node in context_cfg["nodes"].items():
             LOG.debug(node)
-            file_name = node["VNF model"]
+            try:
+                file_name = node["VNF model"]
+            except KeyError:
+                LOG.debug("no model for %s, skipping", node_name)
+                continue
             file_path = scenario_cfg['task_path']
             with open_relative_file(file_name, file_path) as stream:
                 vnf_model = stream.read()