Skip to content

Commit

Permalink
Pass correct spec to _parse_system and _parse_location (#2924)
Browse files Browse the repository at this point in the history
  • Loading branch information
skycastlelily authored May 23, 2024
1 parent 15cc8eb commit 24d86c9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tmt/hardware.py
Original file line number Diff line number Diff line change
Expand Up @@ -1266,7 +1266,7 @@ def _parse_location(spec: Spec) -> BaseConstraint:
if 'lab-controller' in spec:
group.constraints += [
TextConstraint.from_specification(
'location.lab-controller',
'location.lab_controller',
spec['lab-controller'],
allowed_operators=[Operator.EQ, Operator.NEQ, Operator.MATCH, Operator.NOTMATCH])
]
Expand Down Expand Up @@ -1314,10 +1314,10 @@ def _parse_generic_spec(spec: Spec) -> BaseConstraint:
group.constraints += [_parse_hostname(spec)]

if 'location' in spec:
group.constraints += [_parse_location(spec)]
group.constraints += [_parse_location(spec['location'])]

if 'system' in spec:
group.constraints += [_parse_system(spec)]
group.constraints += [_parse_system(spec['system'])]

if 'tpm' in spec:
group.constraints += [_parse_tpm(spec['tpm'])]
Expand Down

0 comments on commit 24d86c9

Please sign in to comment.