def coro(): yield command.ping('Are you there?') yield command.PING('Hello World!') yield command.Command('dump') yield command.run('/usr/bin/bash', args=['-c','echo $ZZ1; echo $ZZ2'], env=dict(ZZ1='Zzzz...', ZZ2='__ZZZZ__')) yield 'end' # start monitoring 'end' yield command.Command('dump') yield WAIT yield command.Command('dump') return
def proc_input(self, cmd): """Process data(Command) received from Backend - forward to Controller""" if self.controller: self.controller.proc_cmd(self, command.Command(cmd))
def proc_input(self, cmd): """Process data(Command) received from Controller - forward to Task""" if self.task: self.task.proc_cmd(command.Command(cmd))
def make_cmd(self, cmd, *args, **kwargs): return list(command.Command(cmd, *args, **kwargs))
def proc_cmd_dump(self, cmd, cmd_args): return command.Command('dump')