Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions spalloc/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
14 changes: 14 additions & 0 deletions spalloc/protocol_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
Expand Down