从新增策略返回删除格式数据中提取策略id,返回策略id list
This commit is contained in:
@@ -336,7 +336,7 @@ ManageFilter
|
|||||||
|
|
||||||
Get-PolicyIds
|
Get-PolicyIds
|
||||||
[Arguments] ${value}
|
[Arguments] ${value}
|
||||||
[Documentation] 获取结果中的策略ID
|
[Documentation] 获取结果中的策略类型及ID
|
||||||
${policyIds} Create List
|
${policyIds} Create List
|
||||||
FOR ${policy} IN @{value['data']['policyList']}
|
FOR ${policy} IN @{value['data']['policyList']}
|
||||||
${policyIdList} Create List ${policy['policyId']}
|
${policyIdList} Create List ${policy['policyId']}
|
||||||
@@ -349,7 +349,22 @@ Get-PolicyIds
|
|||||||
#${policyIds} Run Keyword If ${len}==1 Set Variable ${policyIds[0]}
|
#${policyIds} Run Keyword If ${len}==1 Set Variable ${policyIds[0]}
|
||||||
#... ELSE Set Variable ${policyIds}
|
#... ELSE Set Variable ${policyIds}
|
||||||
[Return] ${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
|
DeletePolicyWithParamDict
|
||||||
[Arguments] ${params}
|
[Arguments] ${params}
|
||||||
[Documentation] 删除策略
|
[Documentation] 删除策略
|
||||||
|
|||||||
Reference in New Issue
Block a user