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