Exemplo n.º 1
0
 def rebootWhenIdle(self):
     """Causes the host to no longer accept new frames and
     when the machine is idle it will reboot.
     """
     self.stub.RebootWhenIdle(
         host_pb2.HostRebootWhenIdleRequest(host=self.data),
         timeout=Cuebot.Timeout)
Exemplo n.º 2
0
    def rebootWhenIdle(self):
        """Sets the machine to reboot once idle.

        The host will no longer accept new frames."""
        self.stub.RebootWhenIdle(
            host_pb2.HostRebootWhenIdleRequest(host=self.data),
            timeout=Cuebot.Timeout)
Exemplo n.º 3
0
    def testRebootWhenIdle(self, getStubMock):
        stubMock = mock.Mock()
        stubMock.RebootWhenIdle.return_value = host_pb2.HostRebootWhenIdleResponse(
        )
        getStubMock.return_value = stubMock

        host = opencue.wrappers.host.Host(host_pb2.Host(name=TEST_HOST_NAME))
        host.rebootWhenIdle()

        stubMock.RebootWhenIdle.assert_called_with(
            host_pb2.HostRebootWhenIdleRequest(host=host.data),
            timeout=mock.ANY)