1、IP类适配GEO类型;

2、appid变量内置初始化补全;
3、策略对象删除必填部分校验;
4、公共对象适配addobjects;
This commit is contained in:
dongxiaoyan
2021-01-26 17:56:36 +08:00
parent 6b92bfe5ea
commit 21e0834607
9 changed files with 678 additions and 21 deletions

View File

@@ -97,7 +97,7 @@ PolicyOrganize
Run Keyword If "${policyObjectVersion}"=="v1" Dictionary Should Not Contain Key ${policy} filterList
Run Keyword If "${policyObjectVersion}"=="v1" Dictionary Should Not Contain Key ${policy} appIdObjects
Run Keyword If "${policyObjectVersion}"=="v2" Dictionary Should Not Contain Key ${policy} referenceObject
Run Keyword If "${policyObjectVersion}"=="v2" Dictionary Should Not Contain Key ${policy} appObjectIdArray
#Run Keyword If "${policyObjectVersion}"=="v2" Dictionary Should Not Contain Key ${policy} appObjectIdArray
#更新时 policyId不允许为空
${return} ${policyId} Run Keyword And Ignore Error Get From Dictionary ${policy} policyId
Run Keyword If "${opAction}"=="update" and "${return}"=="FAIL" Fail policyId is required when opAction is update
@@ -141,7 +141,8 @@ PolicyOrganize
Set To Dictionary ${returnDict} scheduleId=${scheduleIdV}
${return} ${appObjectIdArray} Run Keyword If "${policyObjectVersion}"=="v1" Run Keyword And Ignore Error Get From Dictionary ${policy} appObjectIdArray
... ELSE Run Keyword And Ignore Error Get From Dictionary ${policy} appIdObjects
${appObjectIdArrayV} Run Keyword If "${return}"=="FAIL" or "${appObjectIdArray}"=="${EMPTY}" Evaluate list(map(int, re.split('[,]', '${Default_AppObjectIdArray}'))) re
#${appObjectIdArrayV} Run Keyword If "${return}"=="FAIL" or "${appObjectIdArray}"=="${EMPTY}" Evaluate list(map(int, re.split('[,]', '${Default_AppObjectIdArray}'))) re
${appObjectIdArrayV} Run Keyword If "${return}"=="FAIL" or "${appObjectIdArray}"=="${EMPTY}" Evaluate ${Default_AppObjectIdArray} re
... ELSE Evaluate list(map(int, re.split('[,]', '${appObjectIdArray}'))) re
Run Keyword If "${policyObjectVersion}"=="v1" Set To Dictionary ${returnDict} appObjectIdArray=${appObjectIdArrayV}
... ELSE IF "${policyObjectVersion}"=="v2" Set To Dictionary ${returnDict} appIdObjects=${appObjectIdArrayV}
@@ -338,14 +339,15 @@ Get-PolicyIds
[Documentation] 获取结果中的策略ID
${policyIds} Create List
FOR ${policy} IN @{value['data']['policyList']}
#${policyIdList} Create List ${policy['policyId']}
#${policyObj} Create Dictionary policyType=${policy['policyType']} policyIds=${policyIdList}
#Append To List ${policyIds} ${policyObj}
Append To List ${policyIds} ${policy['policyId']}
${policyIdList} Create List ${policy['policyId']}
${policyObj} Create Dictionary policyType=${policy['policyType']} policyIds=${policyIdList}
Append To List ${policyIds} ${policyObj}
#Append To List ${policyIds} ${policy['policyId']}
END
${len} Get Length ${policyIds}
${policyIds} Run Keyword If ${len}==1 Set Variable ${policyIds[0]}
... ELSE Set Variable ${policyIds}
log ${policyIds}
#${len} Get Length ${policyIds}
#${policyIds} Run Keyword If ${len}==1 Set Variable ${policyIds[0]}
#... ELSE Set Variable ${policyIds}
[Return] ${policyIds}
DeletePolicyWithParamDict