Skip to content

Commit

Permalink
Support cpu.hyper-threading hw requirement for mrack
Browse files Browse the repository at this point in the history
  • Loading branch information
skycastlelily committed May 22, 2024
1 parent b782a60 commit 5234db8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tmt/steps/provision/mrack.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,18 @@ def _transform_cpu_cores(
children=[MrackHWBinOp('cores', beaker_operator, actual_value)])


def _transform_cpu_hyper_threading(
constraint: tmt.hardware.NumberConstraint,
logger: tmt.log.Logger) -> MrackBaseHWElement:
beaker_operator, actual_value, _ = operator_to_beaker_op(
constraint.operator,
str(constraint.value))

return MrackHWGroup(
'cpu',
children=[MrackHWBinOp('hyper', beaker_operator, actual_value)])


def _transform_disk_driver(
constraint: tmt.hardware.TextConstraint,
logger: tmt.log.Logger) -> MrackBaseHWElement:
Expand Down Expand Up @@ -420,6 +432,7 @@ def _transform_zcrypt_mode(

_CONSTRAINT_TRANSFORMERS: Mapping[str, ConstraintTransformer] = {
'cpu.flag': _transform_cpu_flag, # type: ignore[dict-item]
'cpu.hyper_threading': _transform_cpu_hyper_threading, # type: ignore[dict-item]
'cpu.model': _transform_cpu_model, # type: ignore[dict-item]
'cpu.processors': _transform_cpu_processors, # type: ignore[dict-item]
'cpu.cores': _transform_cpu_cores, # type: ignore[dict-item]
Expand Down

0 comments on commit 5234db8

Please sign in to comment.