From a36b3988e8cb65ff7173bf132ceec0907b0c581e Mon Sep 17 00:00:00 2001 From: Callan Gray Date: Tue, 14 Nov 2023 15:59:58 +0800 Subject: [PATCH] get node list from api/nodes GET result --- .../dlg/dropmake/web/translator_rest.py | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/daliuge-translator/dlg/dropmake/web/translator_rest.py b/daliuge-translator/dlg/dropmake/web/translator_rest.py index b5e3f9cbd..16a9cc7bc 100644 --- a/daliuge-translator/dlg/dropmake/web/translator_rest.py +++ b/daliuge-translator/dlg/dropmake/web/translator_rest.py @@ -655,7 +655,7 @@ def gen_pg( host=mhost, port=mport, url_prefix=mprefix, timeout=30 ) # 1. get a list of nodes - node_list = mgr_client.nodes() + node_list = mgr_client.nodes()["nodes"] # 2. mapping PGTP to resources (node list) pg_spec = pgtp.to_pg_spec(node_list, ret_str=False) @@ -812,15 +812,15 @@ class AlgoParams(BaseModel): Refer to main documentation for more information. """ - min_goal: Union[int, None] - ptype: Union[int, None] - max_load_imb: Union[int, None] - max_cpu: Union[int, None] - time_greedy: Union[int, None] - deadline: Union[int, None] - topk: Union[int, None] - swarm_size: Union[int, None] - max_mem: Union[int, None] + min_goal: Union[int, None] = None + ptype: Union[int, None] = None + max_load_imb: Union[int, None] = None + max_cpu: Union[int, None] = None + time_greedy: Union[int, None] = None + deadline: Union[int, None] = None + topk: Union[int, None] = None + swarm_size: Union[int, None] = None + max_mem: Union[int, None] = None class KnownAlgorithms(str, Enum):