コード例 #1
0
ファイル: cli.py プロジェクト: sssst315/beah
 def set_controller(self, controller=None):
     ExtBackend.set_controller(self, controller)
     if controller:
         #controller.proc_cmd(self, command.ping("Are you there?"))
         controller.proc_cmd(self, command.no_output())
         controller.proc_cmd(self, self.cmd)
         self.wait = True
コード例 #2
0
ファイル: cli.py プロジェクト: beaker-project/beah
 def set_controller(self, controller=None):
     ExtBackend.set_controller(self, controller)
     if controller:
         #controller.proc_cmd(self, command.ping("Are you there?"))
         controller.proc_cmd(self, command.no_output())
         controller.proc_cmd(self, self.cmd)
         self.wait = True
コード例 #3
0
ファイル: test_backends.py プロジェクト: beaker-project/beah
    def testMain(self):

        be = backends.CmdOnlyBackend()
        be.set_controller(FakeController(test_case=self, expected=command.no_output()))

        def test(be, input, output):
            be.controller.expected = output
            be.proc_input(input)

        test(be, 'ping', command.ping())
        test(be, 'PING a message', command.PING('a message'))
        test(be, 'run a_task', command.run('a_task'))
コード例 #4
0
 def set_controller(self, controller=None):
     ExtBackend.set_controller(self, controller)
     if controller:
         self.__status = self._CONNECTED
         # FIXME: implement proper output filterring instead of no_output:
         controller.proc_cmd(self, command.no_output())
         for cid in self.__queue:
             cmd, d = self.__pending[cid]
             controller.proc_cmd(self, cmd)
             reactor.callLater(self.TIMEOUT, self.timeout, cid)
     else:
         self.__status = self._IDLE
コード例 #5
0
ファイル: forwarder.py プロジェクト: beaker-project/beah
 def set_controller(self, controller=None):
     ExtBackend.set_controller(self, controller)
     if controller:
         self.__status = self._CONNECTED
         # FIXME: implement proper output filterring instead of no_output:
         controller.proc_cmd(self, command.no_output())
         for cid in self.__queue:
             cmd, d = self.__pending[cid]
             controller.proc_cmd(self, cmd)
             reactor.callLater(self.TIMEOUT, self.timeout, cid)
     else:
         self.__status = self._IDLE
コード例 #6
0
ファイル: test_backends.py プロジェクト: sssst315/beah
    def testMain(self):

        be = backends.CmdOnlyBackend()
        be.set_controller(
            FakeController(test_case=self, expected=command.no_output()))

        def test(be, input, output):
            be.controller.expected = output
            be.proc_input(input)

        test(be, 'ping', command.ping())
        test(be, 'PING a message', command.PING('a message'))
        test(be, 'run a_task', command.run('a_task'))
コード例 #7
0
 def set_controller(self, controller=None):
     CmdBackend.set_controller(self, controller)
     if controller:
         self.controller.proc_cmd(self, command.no_output())
コード例 #8
0
ファイル: backends.py プロジェクト: beaker-project/beah
 def set_controller(self, controller=None):
     CmdBackend.set_controller(self, controller)
     if controller:
         self.controller.proc_cmd(self, command.no_output())