Skip to content

Commit

Permalink
Add whiteboard for beaker job
Browse files Browse the repository at this point in the history
Signed-off-by: Vector Li <[email protected]>
  • Loading branch information
idorax committed Nov 4, 2023
1 parent 0b95455 commit f578445
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tmt/steps/provision/mrack.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,8 @@ def create_host_requirement(self, host: Dict[str, Any]) -> Dict[str, Any]:
if hardware and hardware.constraint:
host.update({"beaker": self._translate_tmt_hw(hardware)})
req: Dict[str, Any] = super().create_host_requirement(host)
req.update({"whiteboard": host.get("tmt_name", req.get("whiteboard"))})
whiteboard = host.get("whiteboard", host.get("tmt_name", req.get("whiteboard")))
req.update({"whiteboard": whiteboard})
return req


Expand All @@ -358,6 +359,12 @@ class BeakerGuestData(tmt.steps.provision.GuestSshData):
)

# Guest request properties
whiteboard: Optional[str] = field(
default=None,
option=('-w', '--whiteboard'),
metavar='WHITEBOARD',
help='Whiteboard of beaker job.'
)
arch: str = field(
default=DEFAULT_ARCH,
option='--arch',
Expand Down Expand Up @@ -559,6 +566,7 @@ def _create(self, tmt_name: str) -> None:

data: Dict[str, Any] = {
'tmt_name': tmt_name,
'whiteboard': self.whiteboard,
'hardware': self.hardware,
'name': f'{self.image}-{self.arch}',
'os': self.image,
Expand Down

0 comments on commit f578445

Please sign in to comment.