fix:(Wx开头的关键字修改)
This commit is contained in:
@@ -44,7 +44,7 @@ PolicyListDataOperation
|
||||
Log To Console Call PolicyListDataOperation
|
||||
${policyListJson} Set Variable [
|
||||
FOR ${policy} IN @{policyList}
|
||||
${json} WxPolicyOrganize ${policy} ${opAction} ${policyObjectVersion}
|
||||
${json} PolicyOrganize ${policy} ${opAction} ${policyObjectVersion}
|
||||
${policyListJson} Set Variable ${policyListJson}${json},
|
||||
END
|
||||
${policyListJson}= Replace String Using Regexp ${policyListJson} ,$ ]
|
||||
@@ -66,7 +66,7 @@ PolicyDataOperation
|
||||
|
||||
[Arguments] ${returnData} ${policy} ${opAction} ${policyObjectVersion}
|
||||
Log To Console Call PolicyDataOperation
|
||||
${json} WxPolicyOrganize ${policy} ${opAction} ${policyObjectVersion}
|
||||
${json} PolicyOrganize ${policy} ${opAction} ${policyObjectVersion}
|
||||
# 转为json结构并返回
|
||||
${dict} Create Dictionary opAction=${opAction} returnData=${returnData} policyList=replace:policyList
|
||||
${bodyJson} json.Dumps ${dict} ensure_ascii=False
|
||||
@@ -75,7 +75,7 @@ PolicyDataOperation
|
||||
Log Policy_Request_Body-${json}
|
||||
[Return] ${json}
|
||||
|
||||
WxPolicyOrganize
|
||||
PolicyOrganize
|
||||
[Documentation]
|
||||
... 描述:入口,opAction参数可为'add','update','disable','enable'
|
||||
... policy: 必传,字典类型。字典内可选参数信息:
|
||||
@@ -83,7 +83,7 @@ WxPolicyOrganize
|
||||
... policyObjectVersion: 必传,v1,v2,涉及策略版本
|
||||
... 单个策略转换为json
|
||||
[Arguments] ${policy} ${opAction} ${policyObjectVersion}
|
||||
Log To Console Call WxPolicyOrganize
|
||||
Log To Console Call PolicyOrganize
|
||||
${returnDict} Create Dictionary
|
||||
${emptyList} Create List
|
||||
#v1版本接口与v2版本接口不同的字段
|
||||
@@ -153,9 +153,9 @@ WxPolicyOrganize
|
||||
# 固定值
|
||||
Set To Dictionary ${returnDict} doBlacklist=${0}
|
||||
# 分别处理EffectiveRange、UserRegion和ReferenceObject参数
|
||||
WxManageEffectiveRange ${policy} ${returnDict}
|
||||
ProcessEffectiveRange ${policy} ${returnDict}
|
||||
#WxManageUserRegion ${policy}
|
||||
Run Keyword If "${policyObjectVersion}"=="v1" WxManageReferenceObject ${policy} ${returnDict} ELSE IF "${policyObjectVersion}"=="v2" WxManageObjectV2 ${policy} ${returnDict}
|
||||
Run Keyword If "${policyObjectVersion}"=="v1" ProcessReferenceObject ${policy} ${returnDict} ELSE IF "${policyObjectVersion}"=="v2" ManageObjectV2 ${policy} ${returnDict}
|
||||
#先取出useragion 再放回json
|
||||
${return} ${userRegion} Run Keyword And Ignore Error Get From Dictionary ${policy} userRegion
|
||||
Set To Dictionary ${returnDict} userRegion=${Default_UserRegion}
|
||||
@@ -186,12 +186,12 @@ ManagePolicyEnableAndDisable
|
||||
${json} json.Dumps ${returnDict} ensure_ascii=False
|
||||
Log Policy-${json}
|
||||
[Return] ${json}
|
||||
WxManageEffectiveRange
|
||||
ProcessEffectiveRange
|
||||
[Documentation]
|
||||
... 处理EffectiveRange
|
||||
... 加入effectiveRange={}的处理支持
|
||||
[Arguments] ${policyList} ${returnDict}
|
||||
Log To Console Call WxManageEffectiveRange
|
||||
Log To Console Call ProcessEffectiveRange
|
||||
${emptyList} Create List
|
||||
${emptyListDouble} Create List ${emptyList}
|
||||
|
||||
@@ -201,12 +201,12 @@ WxManageEffectiveRange
|
||||
${value} Run Keyword If "${effectiveRange}"=="${EMPTY}" Create Dictionary tag_sets=${emptyListDouble}
|
||||
... ELSE IF "${effectiveRange}"=="{}" Create Dictionary ELSE AnalysisEffectiveRange ${effectiveRange}
|
||||
Set To Dictionary ${returnDict} effectiveRange=${value}
|
||||
WxManageReferenceObject
|
||||
ProcessReferenceObject
|
||||
[Documentation]
|
||||
... 处理引用对象字符串
|
||||
... v1版本接口使用
|
||||
[Arguments] ${policy} ${returnDict}
|
||||
Log To Console Call WxManageReferenceObject
|
||||
Log To Console Call ProcessReferenceObject
|
||||
${emptyList} Create List
|
||||
#默认客户端条件类型:clientip or clientsubid
|
||||
${return} ${defaultClient} Run Keyword And Ignore Error Get From Dictionary ${policy} defalutClient
|
||||
@@ -238,14 +238,14 @@ ObjectLoop
|
||||
Run Keyword If ${var}!={} Append To List ${valueList} ${var}
|
||||
END
|
||||
[Return] ${valueList}
|
||||
WxManageObjectV2
|
||||
ManageObjectV2
|
||||
[Documentation]
|
||||
... 处理引用对象字符串
|
||||
... v2版本接口使用
|
||||
... source,destination,filterList
|
||||
# 处理引用对象字符串
|
||||
[Arguments] ${policy} ${returnDict}
|
||||
Log To Console Call WxManageObjectV2
|
||||
Log To Console Call ManageObjectV2
|
||||
#默认客户端条件类型:clientip or clientsubid
|
||||
${return} ${defaultClient} Run Keyword And Ignore Error Get From Dictionary ${policy} defalutClient
|
||||
${defaultClient} Run Keyword If "${return}"=="FAIL" or "${defaultClient}"=="${EMPTY}" Set Variable ${Default_Client_Type}
|
||||
|
||||
Reference in New Issue
Block a user