# # ---------------------------------------------------------- """ This module implements the technique to interact via hadoop-cmd to the test-object. The class has to be constructed by the tool-Handling because of keyword "hadoop" in the configuration, then it will be called with the interface / abstract-class cli_abstract """ import os import utils.cli_abstract import basic class CliFcts(utils.cli_abstract.CliFcts): def execCmd(self, cmds): """ executes an array of commands on a hadoop-machine - the commands will be intern translated before execution :param cmds: written in linux-bash :return: """ for cmd in cmds: cmd = self.translate(cmd) rc = os.system(cmd) self.comp.m.logInfo("RC "+str(rc)+" zu CMD "+cmd) return "ok" def translate(self, cmd): """ translates a bash-cmd (default) into a windows-cmd """ return cmd