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 authored and happz committed Jul 25, 2024
1 parent c45adde commit 2c819f2
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 @@ -277,6 +277,18 @@ def _transform_cpu_model_name(
children=[MrackHWBinOp('model_name', beaker_operator, actual_value)])


def _transform_cpu_hyper_threading(
constraint: tmt.hardware.FlagConstraint,
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 @@ -471,6 +483,7 @@ def _transform_system_numa_nodes(

_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 2c819f2

Please sign in to comment.