summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2017-04-03 23:43:56 -0700
committerRoss Brattain <ross.b.brattain@intel.com>2017-04-04 21:29:08 -0700
commit45f46d5220cbfa89224d55caf94a079fccd2679f (patch)
tree7ff210dd0bb2db3196720b493264a9676ae5a699
parent65b2c23bff92368a9993d03ec70a64ed7344f1e8 (diff)
attacker_general: fix logging to use %s
Change-Id: Ib451d7883eb5df13cfe95477cea43c076ac0452a Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
-rw-r--r--yardstick/benchmark/scenarios/availability/attacker/attacker_general.py21
1 files changed, 10 insertions, 11 deletions
diff --git a/yardstick/benchmark/scenarios/availability/attacker/attacker_general.py b/yardstick/benchmark/scenarios/availability/attacker/attacker_general.py
index 24888af98..ab5e99860 100644
--- a/yardstick/benchmark/scenarios/availability/attacker/attacker_general.py
+++ b/yardstick/benchmark/scenarios/availability/attacker/attacker_general.py
@@ -40,19 +40,19 @@ class GeneralAttacker(BaseAttacker):
if "action_parameter" in self._config:
actionParameter = self._config['action_parameter']
str = util.buildshellparams(actionParameter)
- LOG.debug("inject parameter is: {0}".format(actionParameter))
- LOG.debug("inject parameter values are: {0}"
- .format(list(actionParameter.values())))
- l = list(item for item in actionParameter.values())
+ LOG.debug("inject parameter is: %s", actionParameter)
+ LOG.debug("inject parameter values are: %s",
+ list(actionParameter.values()))
+ l = list(actionParameter.values())
self.action_param = str.format(*l)
if "rollback_parameter" in self._config:
rollbackParameter = self._config['rollback_parameter']
str = util.buildshellparams(rollbackParameter)
- LOG.debug("recover parameter is: {0}".format(rollbackParameter))
- LOG.debug("recover parameter values are: {0}".
- format(list(rollbackParameter.values())))
- l = list(item for item in rollbackParameter.values())
+ LOG.debug("recover parameter is: %s", rollbackParameter)
+ LOG.debug("recover parameter values are: %s",
+ list(rollbackParameter.values()))
+ l = list(rollbackParameter.values())
self.rollback_param = str.format(*l)
self.fault_cfg = BaseAttacker.attacker_cfgs.get(self.attack_key)
@@ -77,10 +77,9 @@ class GeneralAttacker(BaseAttacker):
"/bin/bash -s ",
stdin=stdin_file)
- LOG.debug("the inject_fault's exit status is: {0}".format(exit_status))
+ LOG.debug("the inject_fault's exit status is: %s", exit_status)
if exit_status == 0:
- LOG.debug("success,the inject_fault's output is: {0}"
- .format(stdout))
+ LOG.debug("success,the inject_fault's output is: %s", stdout)
else:
LOG.error(
"the inject_fault's error, stdout:%s, stderr:%s",