Fixing definition of compute

Change-Id: Ie0d22676041eea8034fae65a7d39cacde125f123
This commit is contained in:
croy
2025-03-03 16:01:34 -05:00
parent a183443494
commit 3e17e79df5
2 changed files with 5 additions and 1 deletions

View File

@@ -213,7 +213,7 @@ class LabConfig:
"""
nodes = self.get_nodes()
computes = [node for node in nodes if node.node_type == 'Compute']
computes = [node for node in nodes if node.node_type == 'worker']
return computes
def get_compute(self, compute_name) -> Optional[Node]:

View File

@@ -355,6 +355,10 @@ def scan_hosts(lab_config: LabConfig, ssh_connection: SSHConnection) -> [Node]:
node.append_node_capability('lab_has_sriov')
lab_config.add_lab_capability('lab_has_sriov')
if node.get_type() == 'worker':
node.append_node_capability('lab_has_compute')
lab_config.add_lab_capability('lab_has_compute')
if node.get_type() == 'worker' or 'worker' in node.get_subfunctions():
node.append_node_capability('lab_has_worker')
lab_config.add_lab_capability('lab_has_worker')