X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=yardstick%2Fbenchmark%2Fcontexts%2Fnode.py;h=c4e603a46519cd366b21f522640e8aa1fe5ba4a9;hb=0a5ae6f942d93c781286895f7dc3d760f29181a1;hp=c3d6521192b52694b744b89d7282f6d1449054d3;hpb=6ce3a97548e95a62cf39f37c76bf5b618f5575c4;p=yardstick.git diff --git a/yardstick/benchmark/contexts/node.py b/yardstick/benchmark/contexts/node.py index c3d652119..c4e603a46 100644 --- a/yardstick/benchmark/contexts/node.py +++ b/yardstick/benchmark/contexts/node.py @@ -8,10 +8,12 @@ ############################################################################## import sys +import os import yaml import logging from yardstick.benchmark.contexts.base import Context +from yardstick.definitions import YARDSTICK_ROOT_PATH LOG = logging.getLogger(__name__) @@ -33,7 +35,9 @@ class NodeContext(Context): def init(self, attrs): '''initializes itself from the supplied arguments''' self.name = attrs["name"] - self.file_path = attrs.get("file", "/etc/yardstick/nodes/pod.yaml") + self.file_path = attrs.get("file", "") + if not os.path.exists(self.file_path): + self.file_path = YARDSTICK_ROOT_PATH + self.file_path LOG.info("Parsing pod file: %s", self.file_path)