diff --git a/spalloc/job.py b/spalloc/job.py index 1c1b4e9ee..b79d25bdc 100644 --- a/spalloc/job.py +++ b/spalloc/job.py @@ -718,6 +718,13 @@ def where_is_machine(self, chip_x, chip_y): raise ValueError("received None instead of machine location") return result['physical'] + def report_problem_board(self, ip_address): + """ Reports a previously-unknown problem with an allocated board. + + :param str ip_address: + """ + self._client.report_problem_board(ip_address) + class StateChangeTimeoutError(Exception): """ Thrown when a state change takes too long to occur. diff --git a/spalloc/protocol_client.py b/spalloc/protocol_client.py index 53326747f..52d215f48 100644 --- a/spalloc/protocol_client.py +++ b/spalloc/protocol_client.py @@ -416,6 +416,20 @@ def get_board_at_position(self, machine_name, x, y, z, return self.call("get_board_at_position", machine_name, x, y, z, timeout=timeout) + def report_problem_board(self, board_ip, timeout=None): + return self.call("report_problem", str(board_ip), + timeout=timeout) + + def report_problem_chip(self, board_ip, x, y, timeout=None): + # pylint: disable=too-many-arguments + return self.call("report_problem", str(board_ip), x=int(x), y=int(y), + timeout=timeout) + + def report_problem_core(self, board_ip, x, y, p, timeout=None): + return self.call( + "report_problem", str(board_ip), x=int(x), y=int(y), p=int(p), + timeout=timeout) + _acceptable_kwargs_for_where_is = frozenset([ frozenset("machine x y z".split()), frozenset("machine cabinet frame board".split()),