# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+from __future__ import absolute_import
import pkg_resources
-import yaml
import logging
import os
import yardstick.common.utils as utils
+from yardstick.common.yaml_loader import yaml_load
LOG = logging.getLogger(__name__)
self._result_checker_list = []
def init_ResultChecker(self, resultchecker_cfgs, context):
- LOG.debug("resultcheckerMgr confg: %s" % resultchecker_cfgs)
+ LOG.debug("resultcheckerMgr confg: %s", resultchecker_cfgs)
for cfg in resultchecker_cfgs:
resultchecker_type = cfg['checker_type']
def verify(self):
result = True
for obj in self._result_checker_list:
- result &= obj.success
+ result &= obj.success
return result
def __init__(self, config, context):
if not BaseResultChecker.resultchecker_cfgs:
with open(resultchecker_conf_path) as stream:
- BaseResultChecker.resultchecker_cfgs = yaml.load(stream)
+ BaseResultChecker.resultchecker_cfgs = yaml_load(stream)
self.actualResult = object()
self.expectedResult = object()
self.success = False
self._config = config
self._context = context
self.setup_done = False
+ self.intermediate_variables = {}
@staticmethod
def get_resultchecker_cls(type):
- '''return resultchecker instance of specified type'''
+ """return resultchecker instance of specified type"""
resultchecker_type = type
for checker_cls in utils.itersubclasses(BaseResultChecker):
if resultchecker_type == checker_cls.__result_checker__type__: