X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=yardstick%2Fbenchmark%2Fscenarios%2Favailability%2Fresult_checker%2Fresult_checker_general.py;h=8c9d16026907677afa049e2df58fc335f1ee194b;hb=65e770afb564045d647abe2bdc2892ebe1130015;hp=681fbf63fbe5a12b128fbb1696e1b68555d15dcc;hpb=3632b33d3720c156a03489527e53d1f47fff4883;p=yardstick.git diff --git a/yardstick/benchmark/scenarios/availability/result_checker/result_checker_general.py b/yardstick/benchmark/scenarios/availability/result_checker/result_checker_general.py index 681fbf63f..8c9d16026 100644 --- a/yardstick/benchmark/scenarios/availability/result_checker/result_checker_general.py +++ b/yardstick/benchmark/scenarios/availability/result_checker/result_checker_general.py @@ -17,17 +17,18 @@ LOG = logging.getLogger(__name__) class GeneralResultChecker(BaseResultChecker): - __result_checker__type__ = "general-result-checker" def setup(self): - LOG.debug("config:%s context:%s" % (self._config, self._context)) + LOG.debug("config:%s context:%s", self._config, self._context) host = self._context.get(self._config['host'], None) ip = host.get("ip", None) user = host.get("user", "root") + ssh_port = host.get("ssh_port", ssh.DEFAULT_PORT) key_filename = host.get("key_filename", "~/.ssh/id_rsa") - self.connection = ssh.SSH(user, ip, key_filename=key_filename) + self.connection = ssh.SSH(user, ip, key_filename=key_filename, + port=ssh_port) self.connection.wait(timeout=600) LOG.debug("ssh host success!") @@ -66,7 +67,7 @@ class GeneralResultChecker(BaseResultChecker): LOG.debug("action script of the operation is: {0}" .format(self.verify_script)) - LOG.debug("exit_status ,stdout : {0} ,{1}".format(exit_status, stdout)) + LOG.debug("exit_status ,stdout : %s ,%s", exit_status, stdout) if exit_status == 0 and stdout: self.actualResult = stdout LOG.debug("verifying resultchecker: {0}".format(self.key)) @@ -103,6 +104,6 @@ class GeneralResultChecker(BaseResultChecker): LOG.error(stderr) LOG.debug( - "verifying resultchecker: {0},the result is : {1}" - .format(self.key, self.success)) + "verifying resultchecker: %s,the result is : %s", self.key, + self.success) return self.success