Code Review
/
yardstick.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Bugfix: debug should be default off"
[yardstick.git]
/
yardstick
/
benchmark
/
scenarios
/
availability
/
result_checker
/
result_checker_general.py
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
681fbf6
..
8c9d160
100644
(file)
--- 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):
class GeneralResultChecker(BaseResultChecker):
-
__result_checker__type__ = "general-result-checker"
def setup(self):
__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")
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")
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!")
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("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))
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(
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
return self.success