def createActionPlayer(self, type, key): LOG.debug("the type of current action is %s, the key is %s", type, key) if type == ActionType.ATTACKER: return actionplayers.AttackerPlayer(self.attackerMgr[key]) if type == ActionType.MONITOR: return actionplayers.MonitorPlayer(self.monitorMgr[key]) if type == ActionType.RESULTCHECKER: return actionplayers.ResultCheckerPlayer( self.resultCheckerMgr[key]) if type == ActionType.OPERATION: return actionplayers.OperationPlayer(self.operationMgr[key]) LOG.debug("something run when creatactionplayer")
def createActionPlayer(self, type, key, intermediate_variables=None): if intermediate_variables is None: intermediate_variables = {} LOG.debug("the type of current action is %s, the key is %s", type, key) if type == ActionType.ATTACKER: return actionplayers.AttackerPlayer(self.attackerMgr[key], intermediate_variables) if type == ActionType.MONITOR: return actionplayers.MonitorPlayer(self.monitorMgr[key], intermediate_variables) if type == ActionType.RESULTCHECKER: return actionplayers.ResultCheckerPlayer( self.resultCheckerMgr[key], intermediate_variables) if type == ActionType.OPERATION: return actionplayers.OperationPlayer(self.operationMgr[key], intermediate_variables) LOG.debug("something run when creatactionplayer")