in azure-slurm/slurmcc/cli.py [0:0]
def resume(self, config: Dict, node_list: List[str], no_wait: bool = False) -> None:
"""
Equivalent to ResumeProgram, starts and waits for a set of nodes.
"""
bindings = new_cluster_bindings(config)
allocation.wait_for_nodes_to_terminate(bindings, node_list)
node_mgr = self._get_node_manager(config)
partitions = partitionlib.fetch_partitions(node_mgr, include_dynamic=True)
bootup_result = allocation.resume(config, node_mgr, node_list, partitions)
if not bootup_result:
raise AzureSlurmError(
f"Failed to boot {node_list} - {bootup_result.message}"
)
if no_wait:
return
def get_latest_nodes() -> List[Node]:
node_mgr = self._get_node_manager(config, force=True)
return node_mgr.get_nodes()
booted_node_list = [n.name for n in (bootup_result.nodes or [])]
allocation.wait_for_resume(
config, bootup_result.operation_id, booted_node_list, get_latest_nodes
)