Merge "Adding new test case for prox Standalone L3FWD."
[yardstick.git] / yardstick / benchmark / contexts / base.py
index 022e365..f3f5879 100644 (file)
@@ -14,6 +14,7 @@ import os
 
 from yardstick.common import constants
 from yardstick.common import utils
+from yardstick.common import yaml_loader
 from yardstick.common.constants import YARDSTICK_ROOT_PATH
 
 
@@ -73,13 +74,16 @@ class Context(object):
     def read_pod_file(self, attrs):
         self.file_path = file_path = attrs.get("file", "pod.yaml")
         try:
-            cfg = utils.read_yaml_file(self.file_path)
+            cfg = yaml_loader.read_yaml_file(self.file_path)
         except IOError as io_error:
             if io_error.errno != errno.ENOENT:
                 raise
 
             self.file_path = os.path.join(YARDSTICK_ROOT_PATH, file_path)
-            cfg = utils.read_yaml_file(self.file_path)
+            cfg = yaml_loader.read_yaml_file(self.file_path)
+
+        for node in cfg["nodes"]:
+            node["ctx_type"] = self.__context_type__
 
         self.nodes.extend(cfg["nodes"])
         self.controllers.extend([node for node in cfg["nodes"]