fix:(v2版本策略)1:AddPolicies参数说明
2:v2版本主动防御支持 3:添加主动防御测试用例
This commit is contained in:
@@ -42,6 +42,21 @@ AddPolicies
|
||||
... returnData:是否返回数据,这里需要设置为1
|
||||
... policyList:策略列表,支持dict与list两种形式
|
||||
... version:接口版本号
|
||||
... 支持v1版本接口与v2版本接口
|
||||
... v1版本特殊参数说明:
|
||||
... referenceObject=${265}|TSG_FIELD_HTTP_HOST,${266}|TSG_FIELD_SSL_SNI&TSG_FIELD_SSL_SAN
|
||||
... 为字符串类型,每条引用的策略对象信息以','分隔
|
||||
... [objectId]|[protocolFileds],... ,多个protocolFileds用'&'连接
|
||||
... appObjectIdArray==${2},${3}
|
||||
... 为字符串类型,以','分隔
|
||||
... v2版本特殊参数说明:
|
||||
... v2版本中无referenceObject,取而代之的是source,destination,filterList
|
||||
... source= ${265}|TSG_FIELD_HTTP_HOST,${266}|TSG_FIELD_SSL_SNI&TSG_FIELD_SSL_SAN
|
||||
... destination= ${265}|TSG_FIELD_HTTP_HOST,${266}|TSG_FIELD_SSL_SNI&TSG_FIELD_SSL_SAN
|
||||
... filterList= ${265}|${257}:TSG_FIELD_HTTP_HOST,${266}|${299}:TSG_FIELD_SSL_SNI&TSG_FIELD_SSL_SAN
|
||||
... filterList由多个数字用‘|’分隔,加上:对上对应的protocolFiled,
|
||||
... 一个filter中的protocolFiled是确定的,一个protocolFiled对应多个objectId
|
||||
... appIdObjects==${2},${3}
|
||||
[Arguments] ${returnData} ${policyList} ${version}
|
||||
Log To Console Call AddPolicies
|
||||
${returnData}= Run Keyword If '${returnData}' == '${EMPTY}' Set Variable 1
|
||||
|
||||
@@ -134,6 +134,11 @@ WxPolicyOrganize
|
||||
${return} ${policyType} Run Keyword And Ignore Error Set Variable ${policy}[policyType]
|
||||
Run Keyword If "${policyObjectVersion}"=="v1" and "${policyType}"=="active_defence" Set To Dictionary ${policy} referenceObject=${active_defence_emptyList}
|
||||
Run Keyword If "${policyObjectVersion}"=="v1" and "${policyType}"=="active_defence" Set To Dictionary ${policy} appObjectIdArray=${active_defence_emptyList}
|
||||
#v版本主动防御
|
||||
Run Keyword If "${policyObjectVersion}"=="v2" and "${policyType}"=="active_defence" Set To Dictionary ${policy} source=${active_defence_emptyList}
|
||||
Run Keyword If "${policyObjectVersion}"=="v2" and "${policyType}"=="active_defence" Set To Dictionary ${policy} destination=${active_defence_emptyList}
|
||||
Run Keyword If "${policyObjectVersion}"=="v2" and "${policyType}"=="active_defence" Set To Dictionary ${policy} filterList=${active_defence_emptyList}
|
||||
Run Keyword If "${policyObjectVersion}"=="v2" and "${policyType}"=="active_defence" Set To Dictionary ${policy} appIdObjects=${active_defence_emptyList}
|
||||
# 转为json结构并返回
|
||||
${json} json.Dumps ${policy} ensure_ascii=False
|
||||
${json} Replace String ${json} "method:rst" ${userRegion}
|
||||
|
||||
Reference in New Issue
Block a user