From ea537b29d1e7b7a85af1b8585f6d446a5a383f9e Mon Sep 17 00:00:00 2001 From: dongxiaoyan Date: Wed, 27 Jan 2021 10:16:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=8E=E6=96=B0=E5=A2=9E=E7=AD=96=E7=95=A5?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=88=A0=E9=99=A4=E6=A0=BC=E5=BC=8F=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E4=B8=AD=E6=8F=90=E5=8F=96=E7=AD=96=E7=95=A5id?= =?UTF-8?q?=EF=BC=8C=E8=BF=94=E5=9B=9E=E7=AD=96=E7=95=A5id=20list?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../policy_object/ProcessPolicyBody.robot | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot b/02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot index bda38d3..c6997a8 100644 --- a/02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot +++ b/02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot @@ -336,7 +336,7 @@ ManageFilter Get-PolicyIds [Arguments] ${value} - [Documentation] 获取结果中的策略ID + [Documentation] 获取结果中的策略类型及ID ${policyIds} Create List FOR ${policy} IN @{value['data']['policyList']} ${policyIdList} Create List ${policy['policyId']} @@ -349,7 +349,22 @@ Get-PolicyIds #${policyIds} Run Keyword If ${len}==1 Set Variable ${policyIds[0]} #... ELSE Set Variable ${policyIds} [Return] ${policyIds} - +Get-Pids + [Arguments] ${policyIds} + [Documentation] 获取结果中的策略ID + ${ids} Create List + ${len} Get Length ${policyIds} + FOR ${var} IN RANGE ${len} + ${policy} Evaluate ${policyIds} [${var}] + ${return} ${policyId} Run Keyword And Ignore Error Get From Dictionary ${policy} policyIds + Append To List ${ids} ${policyId}[0] + #Append To List ${policyIds} ${policy['policyId']} Evaluate + END + log ${ids} + #${len} Get Length ${policyIds} + #${policyIds} Run Keyword If ${len}==1 Set Variable ${policyIds[0]} + #... ELSE Set Variable ${policyIds} + [Return] ${ids} DeletePolicyWithParamDict [Arguments] ${params} [Documentation] 删除策略