From 5e7b062adb7d219e68ce584e855c49be718846ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=89=91=E5=8B=87?= Date: Tue, 24 Oct 2023 03:19:09 +0000 Subject: [PATCH] =?UTF-8?q?=E8=8A=82=E7=82=B9=E7=8A=B6=E6=80=81=E9=80=82?= =?UTF-8?q?=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 赵剑勇 --- LSF-Script/node/node | 6 +++--- LSF-Script/node/nodeSample | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/LSF-Script/node/node b/LSF-Script/node/node index a24f900..bbf28dc 100644 --- a/LSF-Script/node/node +++ b/LSF-Script/node/node @@ -107,8 +107,8 @@ for index in range(1, len(bhoststr) - 1): bhosts.append(temp) #基于第三方调度器向DONAU调度器状态映射Map -statusMap = {'ok': 'OKAY', 'closed': 'CLOSED', 'closed_Adm': 'CLOSED','closed_Busy': 'CLOSED','closed_EGO': 'CLOSED','closed_Excl': 'CLOSED','closed_LIM': 'CLOSED', -'closed_Lock': 'CLOSED','closed_Wind': 'CLOSED','closed_RC': 'CLOSED','closed_CU_excl': 'CLOSED','unavail': 'UNAVAILABLE', 'unreach': 'UNAVAILABLE', 'closed_Full': 'CLOSED'} +statusMap = {'ok': 'OK', 'closed': 'CLOSE', 'closed_Adm': 'CLOSE','closed_Busy': 'CLOSE','closed_EGO': 'CLOSE','closed_Excl': 'CLOSE','closed_LIM': 'CLOSE', +'closed_Lock': 'CLOSE','closed_Wind': 'CLOSE','closed_RC': 'CLOSE','closed_CU_excl': 'CLOSE','unavail': 'UNAVAILABLE', 'unreach': 'UNAVAILABLE', 'closed_Full': 'CLOSE'} for hostinfo in nodeArrayList: for bhost in bhosts: @@ -121,7 +121,7 @@ for hostinfo in nodeArrayList: hostinfo['nativeResources']['mCpu'] = host['ncpus'] hostinfo['nativeResources']['mem'] = transferMem(host['maxmem']) hostinfo['numaInfo']['architecture'] = host['type'] - if (hostinfo['status'] == 'CLOSED' and hostinfo['nativeResources']['loadResources']['cpuFree'] == 0): + if (hostinfo['status'] == 'CLOSE' and hostinfo['nativeResources']['loadResources']['cpuFree'] == 0): hostinfo['nativeResources']['loadResources']['cpuFree'] = host['ncpus'] outputStr = json.dumps(nodeArrayList) print(outputStr) \ No newline at end of file diff --git a/LSF-Script/node/nodeSample b/LSF-Script/node/nodeSample index b765e07..322af0c 100644 --- a/LSF-Script/node/nodeSample +++ b/LSF-Script/node/nodeSample @@ -122,10 +122,10 @@ for nodeinfo in nodes: nodeArrayList.append(output) # 基于第三方调度器向DONAU调度器状态映射Map -statusMap = {'ok': 'OKAY', 'closed': 'CLOSED', 'closed_Adm': 'CLOSED', 'closed_Busy': 'CLOSED', 'closed_EGO': 'CLOSED', - 'closed_Excl': 'CLOSED', 'closed_LIM': 'CLOSED', - 'closed_Lock': 'CLOSED', 'closed_Wind': 'CLOSED', 'closed_RC': 'CLOSED', 'closed_CU_excl': 'CLOSED', - 'unavail': 'UNAVAILABLE', 'unreach': 'UNAVAILABLE', 'closed_Full': 'CLOSED'} +statusMap = {'ok': 'OK', 'closed': 'CLOSE', 'closed_Adm': 'CLOSE', 'closed_Busy': 'CLOSE', 'closed_EGO': 'CLOSE', + 'closed_Excl': 'CLOSE', 'closed_LIM': 'CLOSE', + 'closed_Lock': 'CLOSE', 'closed_Wind': 'CLOSE', 'closed_RC': 'CLOSE', 'closed_CU_excl': 'CLOSE', + 'unavail': 'UNAVAILABLE', 'unreach': 'UNAVAILABLE', 'closed_Full': 'CLOSE'} for hostinfo in nodeArrayList: for bhost in bhosts: -- Gitee