feat(API):新增关键字功能,用于添加对象时参数组装
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
*** Settings ***
|
*** Settings ***
|
||||||
Resource ../../03-Variable/BifangApiVariable.txt
|
Resource ../../03-Variable/BifangApiVariable.txt
|
||||||
Resource ../tsg_common/ManagePolicyBody.robot
|
Resource ../tsg_common/ManagePolicyBody.robot
|
||||||
|
Resource ../tsg_common/ManageObjectBody.robot
|
||||||
Library REST http://${host}:${port}
|
Library REST http://${host}:${port}
|
||||||
Library Collections
|
Library Collections
|
||||||
Library RequestsLibrary
|
Library RequestsLibrary
|
||||||
@@ -31,6 +32,15 @@ AddObject
|
|||||||
${objectId} Set Variable ${response['data']['objectList'][0]['objectId']}
|
${objectId} Set Variable ${response['data']['objectList'][0]['objectId']}
|
||||||
${rescodeReturn} Set Variable ${response['code']}
|
${rescodeReturn} Set Variable ${response['code']}
|
||||||
[Return] ${rescodeReturn} ${objectId}
|
[Return] ${rescodeReturn} ${objectId}
|
||||||
|
|
||||||
|
AddObject2
|
||||||
|
[Arguments] ${returnData} ${policyList}
|
||||||
|
${body} ObjectParamsOpertion ${returnData} ${policyList}
|
||||||
|
|
||||||
|
${response} BasePostRequest /v1/policy/object body=${body}
|
||||||
|
${objectId} Set Variable ${response['data']['objectList'][0]['objectId']}
|
||||||
|
${rescodeReturn} Set Variable ${response['code']}
|
||||||
|
[Return] ${rescodeReturn} ${objectId}
|
||||||
|
|
||||||
EditObject
|
EditObject
|
||||||
[Arguments] @{body}
|
[Arguments] @{body}
|
||||||
@@ -59,7 +69,8 @@ AddPolicy
|
|||||||
|
|
||||||
AddPolicy2
|
AddPolicy2
|
||||||
[Arguments] ${returnData} ${policyList}
|
[Arguments] ${returnData} ${policyList}
|
||||||
${body} ParamsOpertion ${returnData} ${policyList}
|
${body} PolicyParamsOpertion ${returnData} ${policyList}
|
||||||
|
|
||||||
${response} BasePostRequest /v1/policy/compile body=${body}
|
${response} BasePostRequest /v1/policy/compile body=${body}
|
||||||
${policyId} Set Variable ${response['data']['policyList'][0]['policyId']}
|
${policyId} Set Variable ${response['data']['policyList'][0]['policyId']}
|
||||||
${rescode} Set Variable ${response['code']}
|
${rescode} Set Variable ${response['code']}
|
||||||
|
|||||||
52
02-Keyword/tsg_common/Case.robot
Normal file
52
02-Keyword/tsg_common/Case.robot
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Library json
|
||||||
|
Resource ../../03-Variable/BifangApiVariable.txt
|
||||||
|
Resource ../../02-Keyword/tsg_adc/systemcommand.robot
|
||||||
|
Resource ../../02-Keyword/tsg_bfapi/policyobject.robot
|
||||||
|
Resource ../../02-Keyword/tsg_bfapi/logvariable.robot
|
||||||
|
Resource ../../02-Keyword/tsg_bfapi/logschema.robot
|
||||||
|
|
||||||
|
*** Test Cases ***
|
||||||
|
case01
|
||||||
|
# 创建对象-IP
|
||||||
|
# addItemList全参数:(为方便说明,将参数值拆分为几部分,其实际值为单条无空格/回车字符串,每部分内代表的各参数不可跳跃。)
|
||||||
|
# [addrType]|[protocol]|[direction]|[isSession]# 第一部分(可省略)
|
||||||
|
# [clientIpFormat]|[clientIp1]|[clientIp2]|[clientPort1/clientPort2]& 第二部分(不可省略)
|
||||||
|
# [serverIpFormat]|[serverIp1]|[serverIp2]|[serverPort1/serverPort2]| 第三部分(可省略)
|
||||||
|
# [isInitialize]|[itemName]|[itemDesc], 第四部分(可省略)
|
||||||
|
# ...
|
||||||
|
${objectDict} Create Dictionary
|
||||||
|
... objectType=ip
|
||||||
|
... isValid=${1}
|
||||||
|
... addItemList=range|192.168.40.51|192.168.40.120|80/88
|
||||||
|
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||||
|
|
||||||
|
# 创建对象-http_signature
|
||||||
|
# addItemList全参数:(参数不可跳跃,[keywordArray]|[district]为必填,其它可省略)
|
||||||
|
# [keywordArray]|[district]|[isHexbin]|[isSession]|[isInitialize]|[itemName]|[itemDesc],...
|
||||||
|
${objectDict} Create Dictionary
|
||||||
|
... objectType=http_signature
|
||||||
|
... isValid=${1}
|
||||||
|
... addItemList=abcd|Cookie
|
||||||
|
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||||
|
|
||||||
|
# 创建对象-url/fqdn/keywords/subscriberid/fqdn_category/account
|
||||||
|
# addItemList全参数:(参数不可跳跃,[keywordArray]为必填,其它可省略)
|
||||||
|
# [keywordArray]|[isHexbin]|[isSession]|[isInitialize]|[itemName]|[itemDesc],...
|
||||||
|
${objectDict} Create Dictionary
|
||||||
|
... objectType=url
|
||||||
|
... isValid=${1}
|
||||||
|
... addItemList=abcd&def
|
||||||
|
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||||
|
|
||||||
|
# 创建策略
|
||||||
|
${policyDict} Create Dictionary
|
||||||
|
... policyName=test_policy_add
|
||||||
|
... policyType=tsg_security
|
||||||
|
... action=intercept
|
||||||
|
... effectiveRange=Nursurtan|Transtelecom&Astel,|Astel&Transtelecom
|
||||||
|
... userRegion=protocol:HTTP,keyring:${1}
|
||||||
|
... referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR
|
||||||
|
... isValid=${0}
|
||||||
|
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||||
|
|
||||||
225
02-Keyword/tsg_common/ManageObjectBody.robot
Normal file
225
02-Keyword/tsg_common/ManageObjectBody.robot
Normal file
@@ -0,0 +1,225 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Library json
|
||||||
|
Library Collections
|
||||||
|
Resource ../../03-Variable/BifangApiVariable.txt
|
||||||
|
Resource ../../02-Keyword/tsg_bfapi/policyobject.robot
|
||||||
|
|
||||||
|
*** Keywords ***
|
||||||
|
ObjectParamsOpertion
|
||||||
|
[Documentation]
|
||||||
|
... 描述:入口,opAction参数固定为'add'
|
||||||
|
|
||||||
|
[Arguments] ${returnData} ${objectList}
|
||||||
|
${emptyList} Create List
|
||||||
|
${returnDict} Create Dictionary
|
||||||
|
# 断言必传参数
|
||||||
|
Should Not Be Empty ${objectList}[objectType]
|
||||||
|
Should Not Be Empty ${objectList}[addItemList]
|
||||||
|
Set To Dictionary ${returnDict} objectType=${objectList}[objectType]
|
||||||
|
# 取可选参数,为传入设置默认值
|
||||||
|
${return} ${objectSubType} Run Keyword And Ignore Error Set Variable ${objectList}[objectSubType]
|
||||||
|
Run Keyword If "${return}"!="FAIL" and "${objectSubType}"!="${EMPTY}" Set To Dictionary ${returnDict} objectSubType=${objectSubType}
|
||||||
|
${return} ${isValid} Run Keyword And Ignore Error Set Variable ${objectList}[isValid]
|
||||||
|
Run Keyword If "${return}"=="FAIL" or "${isValid}"=="${EMPTY}" Set To Dictionary ${returnDict} isValid=${0}
|
||||||
|
... ELSE Set To Dictionary ${returnDict} isValid=${isValid}
|
||||||
|
${return} ${isInitialize} Run Keyword And Ignore Error Set Variable ${objectList}[isInitialize]
|
||||||
|
Run Keyword If "${return}"=="FAIL" or "${isInitialize}"=="${EMPTY}" Set To Dictionary ${returnDict} isInitialize=${0}
|
||||||
|
... ELSE Set To Dictionary ${returnDict} isInitialize=${isInitialize}
|
||||||
|
${return} ${isExclusion} Run Keyword And Ignore Error Set Variable ${objectList}[isExclusion]
|
||||||
|
Run Keyword If "${return}"=="FAIL" or "${isExclusion}"=="${EMPTY}" Set To Dictionary ${returnDict} isExclusion=${0}
|
||||||
|
... ELSE Set To Dictionary ${returnDict} isExclusion=${isExclusion}
|
||||||
|
${return} ${objectName} Run Keyword And Ignore Error Set Variable ${objectList}[objectName]
|
||||||
|
Run Keyword If "${return}"=="FAIL" or "${objectName}"=="${EMPTY}" Set To Dictionary ${returnDict} objectName=test_object_add
|
||||||
|
... ELSE Set To Dictionary ${returnDict} objectName=${objectName}
|
||||||
|
${return} ${objectDesc} Run Keyword And Ignore Error Set Variable ${objectList}[objectDesc]
|
||||||
|
Run Keyword If "${return}"!="FAIL" and "${objectDesc}"!="${EMPTY}" Set To Dictionary ${returnDict} objectDesc=${objectDesc}
|
||||||
|
${return} ${subObjectIds} Run Keyword And Ignore Error Set Variable ${objectList}[subObjectIds]
|
||||||
|
Run Keyword If "${return}"!="FAIL" and "${subObjectIds}"!="${EMPTY}" Set To Dictionary ${returnDict} subObjectIds=${subObjectIds}
|
||||||
|
|
||||||
|
# 处理AddItemList
|
||||||
|
ManageAddItemList ${objectList} ${returnDict}
|
||||||
|
|
||||||
|
# 转为json结构并返回
|
||||||
|
${dict} Create Dictionary opAction=add returnData=${returnData} objectList=${returnDict}
|
||||||
|
${json} json.Dumps ${dict} ensure_ascii=False
|
||||||
|
Log ${json}
|
||||||
|
[Return] ${json}
|
||||||
|
|
||||||
|
ManageAddItemList
|
||||||
|
# 处理addItemList数组
|
||||||
|
[Arguments] ${objectList} ${returnDict}
|
||||||
|
${itemList} Run Keyword If '${objectList}[objectType]'=='ip' ManageIpItemList ${objectList}[addItemList]
|
||||||
|
... ELSE IF '${objectList}[objectType]'=='http_signature' ManageStrItemList ${objectList}[addItemList] ${True}
|
||||||
|
... ELSE ManageStrItemList ${objectList}[addItemList] ${False}
|
||||||
|
Set To Dictionary ${returnDict} addItemList=${itemList}
|
||||||
|
|
||||||
|
ManageIpItemList
|
||||||
|
# 处理IP对象
|
||||||
|
[Arguments] ${str}
|
||||||
|
${returnList} Create List
|
||||||
|
${list} Evaluate re.split('[,]', '${str}') re
|
||||||
|
FOR ${var} IN @{list}
|
||||||
|
Continue For Loop If '${var}' == '${EMPTY}'
|
||||||
|
# 区分入参的类型,分别处理
|
||||||
|
${obj} Run Keyword If '#' in '${var}' and '&' in '${var}' IpItemType1 ${var}
|
||||||
|
... ELSE IF '#' in '${var}' IpItemType2 ${var}
|
||||||
|
... ELSE IF '&' in '${var}' IpItemType3 ${var}
|
||||||
|
... ELSE IpItemType4 ${var}
|
||||||
|
Append To List ${returnList} ${obj}
|
||||||
|
END
|
||||||
|
[Return] ${returnList}
|
||||||
|
|
||||||
|
ManageStrItemList
|
||||||
|
# 处理除IP外其它字符串对象
|
||||||
|
[Arguments] ${str} ${flag}
|
||||||
|
${returnList} Create List
|
||||||
|
${list} Evaluate re.split('[,]', '${str}') re
|
||||||
|
FOR ${var} IN @{list}
|
||||||
|
Continue For Loop If '${var}' == '${EMPTY}'
|
||||||
|
${obj} AnalysisStrItem ${var} ${flag}
|
||||||
|
Append To List ${returnList} ${obj}
|
||||||
|
END
|
||||||
|
[Return] ${returnList}
|
||||||
|
|
||||||
|
IpItemType1
|
||||||
|
# IP类型1:4|0|0|endpoint#range|192.168.40.1|192.168.40.50|80/88&range|192.168.40.1|192.168.40.50|80/88|1|itemName|itemDesc,...
|
||||||
|
[Arguments] ${str}
|
||||||
|
${obj} Create Dictionary
|
||||||
|
${left} Evaluate '${str}'[0:'${str}'.find('#')]
|
||||||
|
${right} Evaluate '${str}'['${str}'.find('#')+1:]
|
||||||
|
${values} Evaluate re.split('[|]', '${left}') re
|
||||||
|
${addrType} Convert To Integer ${values}[0]
|
||||||
|
${protocol} Convert To Integer ${values}[1]
|
||||||
|
${direction} Convert To Integer ${values}[2]
|
||||||
|
Set To Dictionary ${obj} addrType=${addrType} protocol=${protocol} direction=${direction} isSession=${values}[3]
|
||||||
|
|
||||||
|
${cfgs} Evaluate re.split('[&]', '${right}') re
|
||||||
|
${client} Set Variable ${cfgs}[0]
|
||||||
|
${server} Set Variable ${cfgs}[1]
|
||||||
|
|
||||||
|
${cValues} Evaluate re.split('[|]', '${client}') re
|
||||||
|
${sValues} Evaluate re.split('[|]', '${server}') re
|
||||||
|
${clientPort1} Evaluate int(re.split('[/]', '${cValues}[3]')[0]) re
|
||||||
|
${clientPort2} Evaluate int(re.split('[/]', '${cValues}[3]')[1]) re
|
||||||
|
${serverPort1} Evaluate int(re.split('[/]', '${sValues}[3]')[0]) re
|
||||||
|
${serverPort2} Evaluate int(re.split('[/]', '${sValues}[3]')[1]) re
|
||||||
|
Set To Dictionary ${obj} clientIpFormat=${cValues}[0] clientIp1=${cValues}[1] clientIp2=${cValues}[2] clientPortFormat=range clientPort1=${clientPort1} clientPort2=${clientPort2}
|
||||||
|
Set To Dictionary ${obj} serverIpFormat=${sValues}[0] serverIp1=${sValues}[1] serverIp2=${sValues}[2] serverPortFormat=range serverPort1=${serverPort1} serverPort2=${serverPort2}
|
||||||
|
|
||||||
|
OtherParams ${sValues} ${obj}
|
||||||
|
[Return] ${obj}
|
||||||
|
|
||||||
|
IpItemType2
|
||||||
|
# IP类型2:4|0|0|endpoint#range|192.168.40.1|192.168.40.50|80/88|1|itemName|itemDesc,...
|
||||||
|
[Arguments] ${str}
|
||||||
|
${obj} Create Dictionary
|
||||||
|
${left} Evaluate '${str}'[0:'${str}'.find('#')]
|
||||||
|
${client} Evaluate '${str}'['${str}'.find('#')+1:]
|
||||||
|
${values} Evaluate re.split('[|]', '${left}') re
|
||||||
|
${addrType} Convert To Integer ${values}[0]
|
||||||
|
${protocol} Convert To Integer ${values}[1]
|
||||||
|
${direction} Convert To Integer ${values}[2]
|
||||||
|
Set To Dictionary ${obj} addrType=${addrType} protocol=${protocol} direction=${direction} isSession=${values}[3]
|
||||||
|
|
||||||
|
${cValues} Evaluate re.split('[|]', '${client}') re
|
||||||
|
${clientPort1} Evaluate int(re.split('[/]', '${cValues}[3]')[0]) re
|
||||||
|
${clientPort2} Evaluate int(re.split('[/]', '${cValues}[3]')[1]) re
|
||||||
|
Set To Dictionary ${obj} clientIpFormat=${cValues}[0] clientIp1=${cValues}[1] clientIp2=${cValues}[2] clientPortFormat=range clientPort1=${clientPort1} clientPort2=${clientPort2}
|
||||||
|
# 设置默认值
|
||||||
|
Set To Dictionary ${obj} serverIpFormat=range serverIp1= serverIp2= serverPortFormat=range serverPort1=${0} serverPort2=${0}
|
||||||
|
OtherParams ${cValues} ${obj}
|
||||||
|
[Return] ${obj}
|
||||||
|
|
||||||
|
IpItemType3
|
||||||
|
# IP类型3:range|192.168.40.1|192.168.40.50|80/88&range|192.168.40.1|192.168.40.50|80/88|1|itemName|itemDesc,...
|
||||||
|
[Arguments] ${str}
|
||||||
|
${obj} Create Dictionary
|
||||||
|
# 设置默认值
|
||||||
|
Run Keyword If ':' in '${str}' Set To Dictionary ${obj} addrType=${6}
|
||||||
|
... ELSE Set To Dictionary ${obj} addrType=${4}
|
||||||
|
Set To Dictionary ${obj} protocol=${0} direction=${0} isSession=endpoint
|
||||||
|
|
||||||
|
${cfgs} Evaluate re.split('[&]', '${str}') re
|
||||||
|
${client} Set Variable ${cfgs}[0]
|
||||||
|
${server} Set Variable ${cfgs}[1]
|
||||||
|
|
||||||
|
${cValues} Evaluate re.split('[|]', '${client}') re
|
||||||
|
${sValues} Evaluate re.split('[|]', '${server}') re
|
||||||
|
${clientPort1} Evaluate int(re.split('[/]', '${cValues}[3]')[0]) re
|
||||||
|
${clientPort2} Evaluate int(re.split('[/]', '${cValues}[3]')[1]) re
|
||||||
|
${serverPort1} Evaluate int(re.split('[/]', '${sValues}[3]')[0]) re
|
||||||
|
${serverPort2} Evaluate int(re.split('[/]', '${sValues}[3]')[1]) re
|
||||||
|
Set To Dictionary ${obj} clientIpFormat=${cValues}[0] clientIp1=${cValues}[1] clientIp2=${cValues}[2] clientPortFormat=range clientPort1=${clientPort1} clientPort2=${clientPort2}
|
||||||
|
Set To Dictionary ${obj} serverIpFormat=${sValues}[0] serverIp1=${sValues}[1] serverIp2=${sValues}[2] serverPortFormat=range serverPort1=${serverPort1} serverPort2=${serverPort2}
|
||||||
|
|
||||||
|
OtherParams ${sValues} ${obj}
|
||||||
|
[Return] ${obj}
|
||||||
|
|
||||||
|
IpItemType4
|
||||||
|
# IP类型4:range|192.168.40.1|192.168.40.50|80/88|1|itemName|itemDesc,...
|
||||||
|
[Arguments] ${str}
|
||||||
|
${obj} Create Dictionary
|
||||||
|
# 设置默认值
|
||||||
|
Run Keyword If ':' in '${str}' Set To Dictionary ${obj} addrType=${6}
|
||||||
|
... ELSE Set To Dictionary ${obj} addrType=${4}
|
||||||
|
Set To Dictionary ${obj} protocol=${0} direction=${0} isSession=endpoint
|
||||||
|
|
||||||
|
${cValues} Evaluate re.split('[|]', '${str}') re
|
||||||
|
${clientPort1} Evaluate int(re.split('[/]', '${cValues}[3]')[0]) re
|
||||||
|
${clientPort2} Evaluate int(re.split('[/]', '${cValues}[3]')[1]) re
|
||||||
|
Set To Dictionary ${obj} clientIpFormat=${cValues}[0] clientIp1=${cValues}[1] clientIp2=${cValues}[2] clientPortFormat=range clientPort1=${clientPort1} clientPort2=${clientPort2}
|
||||||
|
# 设置默认值
|
||||||
|
Set To Dictionary ${obj} serverIpFormat=range serverIp1= serverIp2= serverPortFormat=range serverPort1=${0} serverPort2=${0}
|
||||||
|
|
||||||
|
OtherParams ${cValues} ${obj}
|
||||||
|
[Return] ${obj}
|
||||||
|
|
||||||
|
AnalysisStrItem
|
||||||
|
[Arguments] ${str} ${flag}
|
||||||
|
${obj} Create Dictionary
|
||||||
|
${list} Evaluate re.split('[|]', '${str}') re
|
||||||
|
# keywordArray
|
||||||
|
${keywords} KeywordsForEach ${list}[0]
|
||||||
|
Set To Dictionary ${obj} keywordArray=${keywords}
|
||||||
|
# district
|
||||||
|
Run Keyword If '${flag}'=='${True}' Set To Dictionary ${obj} district=${list}[1]
|
||||||
|
${index} Run Keyword If '${flag}'=='${True}' Set Variable ${2}
|
||||||
|
... ELSE Set Variable ${1}
|
||||||
|
# isHexbin
|
||||||
|
${return} ${isHexBin} Run Keyword And Ignore Error Convert To Integer ${list}[${index}]
|
||||||
|
Run Keyword If "${return}"!="FAIL" and "${isHexBin}"!="${EMPTY}" Set To Dictionary ${obj} isHexbin=${isHexBin}
|
||||||
|
... ELSE Set To Dictionary ${obj} isHexbin=${0}
|
||||||
|
|
||||||
|
# isInitialize、itemName、itemDesc
|
||||||
|
${return} ${isInitialize} Run Keyword And Ignore Error Convert To Integer ${list}[${index+1}]
|
||||||
|
Run Keyword If "${return}"!="FAIL" and "${isInitialize}"!="${EMPTY}" Set To Dictionary ${obj} isInitialize=${isInitialize}
|
||||||
|
${return} ${itemName} Run Keyword And Ignore Error Set Variable ${list}[${index+2}]
|
||||||
|
Run Keyword If "${return}"!="FAIL" and "${itemName}"!="${EMPTY}" Set To Dictionary ${obj} itemName=${itemName}
|
||||||
|
${return} ${itemDesc} Run Keyword And Ignore Error Set Variable ${list}[${index+3}]
|
||||||
|
Run Keyword If "${return}"!="FAIL" and "${itemDesc}"!="${EMPTY}" Set To Dictionary ${obj} itemDesc=${itemDesc}
|
||||||
|
[Return] ${obj}
|
||||||
|
|
||||||
|
KeywordsForEach
|
||||||
|
# 处理多关键字keyword1&keyword2&...
|
||||||
|
[Arguments] ${str}
|
||||||
|
${returnList} Create List
|
||||||
|
${list} Evaluate re.split('[&]', '${str}') re
|
||||||
|
FOR ${var} IN @{list}
|
||||||
|
Append To List ${returnList} ${var}
|
||||||
|
END
|
||||||
|
[Return] ${returnList}
|
||||||
|
|
||||||
|
OtherParams
|
||||||
|
[Documentation]
|
||||||
|
... 处理isInitialize、itemName、itemDesc参数
|
||||||
|
[Arguments] ${values} ${obj}
|
||||||
|
${return} ${isInitialize} Run Keyword And Ignore Error Convert To Integer ${values}[4]
|
||||||
|
Run Keyword If "${return}"!="FAIL" and "${isInitialize}"!="${EMPTY}" Set To Dictionary ${obj} isInitialize=${isInitialize}
|
||||||
|
${return} ${itemName} Run Keyword And Ignore Error Set Variable ${values}[5]
|
||||||
|
Run Keyword If "${return}"!="FAIL" and "${itemName}"!="${EMPTY}" Set To Dictionary ${obj} itemName=${itemName}
|
||||||
|
${return} ${itemDesc} Run Keyword And Ignore Error Set Variable ${values}[6]
|
||||||
|
Run Keyword If "${return}"!="FAIL" and "${itemDesc}"!="${EMPTY}" Set To Dictionary ${obj} itemDesc=${itemDesc}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -25,23 +25,7 @@ Resource ../../02-Keyword/tsg_bfapi/policyobject.robot
|
|||||||
# ...
|
# ...
|
||||||
# ... 注:数字类型变量为${0}、${1}、${...}
|
# ... 注:数字类型变量为${0}、${1}、${...}
|
||||||
|
|
||||||
# # 例子
|
PolicyParamsOpertion
|
||||||
# ${dict} Create Dictionary
|
|
||||||
# ... policyName=test_policy_add
|
|
||||||
# ... policyType=tsg_security
|
|
||||||
# ... policyDesc=desc
|
|
||||||
# ... action=intercept
|
|
||||||
# ... userTags=
|
|
||||||
# ... doLog=${2}
|
|
||||||
# ... effectiveRange=Nursurtan|Transtelecom&Astel,Almaty&Nursurtan,|Astel&Transtelecom
|
|
||||||
# ... userRegion=protocol:HTTP,keyring:${1}
|
|
||||||
# ... referenceObject=${265}|TSG_FIELD_HTTP_HOST,${266}|TSG_FIELD_SSL_SNI&TSG_FIELD_SSL_SAN
|
|
||||||
# ... isValid=${0}
|
|
||||||
# ... scheduleId=${3},${1}
|
|
||||||
# ... appObjectIdArray=${2},${3}
|
|
||||||
# ${rescode} ${policyId} AddPolicy2 ${1} ${dict}
|
|
||||||
|
|
||||||
ParamsOpertion
|
|
||||||
[Documentation]
|
[Documentation]
|
||||||
... 描述:入口,opAction参数固定为'add'
|
... 描述:入口,opAction参数固定为'add'
|
||||||
... 参数:returnData: 必传,是否返回请求数据。可选${0}(不返回)/${1}(返回)。
|
... 参数:returnData: 必传,是否返回请求数据。可选${0}(不返回)/${1}(返回)。
|
||||||
|
|||||||
Reference in New Issue
Block a user