diff options
Diffstat (limited to 'yardstick/benchmark/scenarios')
4 files changed, 10 insertions, 4 deletions
diff --git a/yardstick/benchmark/scenarios/availability/attacker/attacker_general.py b/yardstick/benchmark/scenarios/availability/attacker/attacker_general.py index 018362a15..816e7e37d 100644 --- a/yardstick/benchmark/scenarios/availability/attacker/attacker_general.py +++ b/yardstick/benchmark/scenarios/availability/attacker/attacker_general.py @@ -31,6 +31,7 @@ class GeneralAttacker(BaseAttacker): LOG.debug("ssh host success!") self.key = self._config['key'] + self.attack_key = self._config['attack_key'] if "action_parameter" in self._config: actionParameter = self._config['action_parameter'] @@ -50,7 +51,7 @@ class GeneralAttacker(BaseAttacker): l = list(item for item in rollbackParameter.values()) self.rollback_param = str.format(*l) - self.fault_cfg = BaseAttacker.attacker_cfgs.get(self.key) + self.fault_cfg = BaseAttacker.attacker_cfgs.get(self.attack_key) self.inject_script = self.get_script_fullpath( self.fault_cfg['inject_script']) self.recovery_script = self.get_script_fullpath( diff --git a/yardstick/benchmark/scenarios/availability/monitor/monitor_general.py b/yardstick/benchmark/scenarios/availability/monitor/monitor_general.py index e7e4d5bce..61efc0520 100644 --- a/yardstick/benchmark/scenarios/availability/monitor/monitor_general.py +++ b/yardstick/benchmark/scenarios/availability/monitor/monitor_general.py @@ -27,6 +27,7 @@ class GeneralMonitor(basemonitor.BaseMonitor): user = host.get("user", "root") key_filename = host.get("key_filename", "~/.ssh/id_rsa") self.key = self._config["key"] + self.monitor_key = self._config["monitor_key"] self.monitor_type = self._config["monitor_type"] if "parameter" in self._config: @@ -35,7 +36,8 @@ class GeneralMonitor(basemonitor.BaseMonitor): l = list(item for item in parameter.values()) self.cmd_param = str.format(*l) - self.monitor_cfg = basemonitor.BaseMonitor.monitor_cfgs.get(self.key) + self.monitor_cfg = basemonitor.BaseMonitor.monitor_cfgs.get( + self.monitor_key) self.monitor_script = self.get_script_fullpath( self.monitor_cfg['monitor_script']) self.connection = ssh.SSH(user, ip, key_filename=key_filename) diff --git a/yardstick/benchmark/scenarios/availability/operation/operation_general.py b/yardstick/benchmark/scenarios/availability/operation/operation_general.py index d41371629..e43f6e1d5 100644 --- a/yardstick/benchmark/scenarios/availability/operation/operation_general.py +++ b/yardstick/benchmark/scenarios/availability/operation/operation_general.py @@ -30,6 +30,7 @@ class GeneralOperaion(BaseOperation): LOG.debug("ssh host success!") self.key = self._config['key'] + self.operation_key = self._config['operation_key'] if "action_parameter" in self._config: actionParameter = self._config['action_parameter'] @@ -43,7 +44,8 @@ class GeneralOperaion(BaseOperation): l = list(item for item in rollbackParameter.values()) self.rollback_param = str.format(*l) - self.operation_cfgs = BaseOperation.operation_cfgs.get(self.key) + self.operation_cfgs = BaseOperation.operation_cfgs.get( + self.operation_key) self.action_script = self.get_script_fullpath( self.operation_cfgs['action_script']) self.rollback_script = self.get_script_fullpath( 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 70bf9aea6..681fbf63f 100644 --- a/yardstick/benchmark/scenarios/availability/result_checker/result_checker_general.py +++ b/yardstick/benchmark/scenarios/availability/result_checker/result_checker_general.py @@ -32,6 +32,7 @@ class GeneralResultChecker(BaseResultChecker): LOG.debug("ssh host success!") self.key = self._config['key'] + self.resultchecker_key = self._config['checker_key'] self.type = self._config['checker_type'] self.condition = self._config['condition'] self.expectedResult = self._config['expectedValue'] @@ -45,7 +46,7 @@ class GeneralResultChecker(BaseResultChecker): self.shell_cmd = str.format(*l) self.resultchecker_cfgs = BaseResultChecker.resultchecker_cfgs.get( - self.key) + self.resultchecker_key) self.verify_script = self.get_script_fullpath( self.resultchecker_cfgs['verify_script']) |