306 lines
24 KiB
Plaintext
306 lines
24 KiB
Plaintext
*** Settings ***
|
||
Force Tags tsg_adc_wp tsg_bf_api Trusted_Certificate_Authorities
|
||
Library String
|
||
Library OperatingSystem
|
||
Library Selenium2Library
|
||
Library Collections
|
||
Resource ../../../02-Keyword/tsg_bfapi/Common.robot
|
||
Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywords.robot
|
||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||
Library OperatingSystem
|
||
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/ApiRequest.robot
|
||
Resource ../../../03-Variable/AllFlowCaseVariable.txt
|
||
Resource ../../../03-Variable/Policy_Objects_Module.txt
|
||
Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot
|
||
Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot
|
||
Resource ../../../02-Keyword/tsg_bfapi/policy_object/Object.robot
|
||
Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot
|
||
Resource ../../../02-Keyword/tsg_bfapi/Common.robot
|
||
Library json
|
||
Library DateTime
|
||
Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot
|
||
Library ../../../04-CustomLibrary/Library/VerifyPolicy.py
|
||
Resource ../../../05-Other/AllFlowCaseVariable.txt
|
||
*** Test Cases ***
|
||
Proxy-Policy-Monitor-00001
|
||
#新增策略验证
|
||
#创建attributes中的字典
|
||
${fqdn} Create Dictionary attributeType=string attributeName=host appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "feishu.cn"}
|
||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "${HTTP_VID}"}
|
||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||
# 合成attributes字典集
|
||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn}
|
||
${verifySession} Create Dictionary attributes=${attributes}
|
||
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
||
log ${verifyList}
|
||
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||
# 打印检查结果
|
||
${objectid_verify} Set Variable ${testClentIpId}
|
||
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_objectId47} ${monitor_policyId}
|
||
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||
log ${objectid_verify}
|
||
${testType} Evaluate type($objectid_verify)
|
||
${testType} Evaluate type($resData)
|
||
log ${resData}
|
||
sleep 5
|
||
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||
Should Be Equal As Strings ${ok} true
|
||
|
||
Proxy-Policy-Monitor-00002
|
||
#新增策略验证
|
||
#创建attributes中的字典
|
||
${fqdn} Create Dictionary attributeType=string attributeName=host appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "www.parkpennies.com"}
|
||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "${HTTP_VID}"}
|
||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||
# 合成attributes字典集
|
||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn}
|
||
${verifySession} Create Dictionary attributes=${attributes}
|
||
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
||
log ${verifyList}
|
||
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||
# 打印检查结果
|
||
${objectid_verify} Set Variable ${testClentIpId}
|
||
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_objectId1} ${monitor_policyId1}
|
||
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||
log ${objectid_verify}
|
||
${testType} Evaluate type($objectid_verify)
|
||
${testType} Evaluate type($resData)
|
||
log ${resData}
|
||
sleep 5
|
||
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||
Should Be Equal As Strings ${ok} true
|
||
|
||
|
||
Proxy-Policy-Monitor-00004
|
||
#新增策略验证
|
||
#创建attributes中的字典
|
||
${fqdn} Create Dictionary attributeType=string attributeName=host appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "www.kumi.cn"}
|
||
${url} Create Dictionary attributeType=string attributeName=url appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "www.kumi.cn/"}
|
||
${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "afsfssfMozilla/5.0afsfsdafsafs","district": "User-Agent"}
|
||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "${HTTP_VID}"}
|
||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||
# 合成attributes字典集
|
||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url} ${req_hdr_ua} ${fqdn}
|
||
${verifySession} Create Dictionary attributes=${attributes}
|
||
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
||
log ${verifyList}
|
||
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||
# 打印检查结果
|
||
${objectid_verify} Set Variable ${testClentIpId}
|
||
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_objectId48} ${monitor_objectId49} ${monitor_objectId50} ${monitor_policyId3}
|
||
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||
log ${objectid_verify}
|
||
${testType} Evaluate type($objectid_verify)
|
||
${testType} Evaluate type($resData)
|
||
log ${resData}
|
||
sleep 5
|
||
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||
Should Be Equal As Strings ${ok} true
|
||
|
||
Proxy-Policy-Monitor-00005
|
||
#新增策略验证
|
||
#创建attributes中的字典
|
||
${fqdn} Create Dictionary attributeType=string attributeName=host appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "www.mgtv.com"}
|
||
${url} Create Dictionary attributeType=string attributeName=url appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "www.mgtv.com/"}
|
||
${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36","district": "User-Agent"}
|
||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "${HTTP_VID}"}
|
||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||
# 合成attributes字典集
|
||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ua}
|
||
${verifySession} Create Dictionary attributes=${attributes}
|
||
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
||
log ${verifyList}
|
||
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||
# 打印检查结果
|
||
${objectid_verify} Set Variable ${testClentIpId}
|
||
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_objectId7} ${monitor_objectId8} ${monitor_objectId9} ${monitor_policyId4}
|
||
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||
log ${objectid_verify}
|
||
${testType} Evaluate type($objectid_verify)
|
||
${testType} Evaluate type($resData)
|
||
log ${resData}
|
||
sleep 5
|
||
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||
Should Be Equal As Strings ${ok} true
|
||
|
||
Proxy-Policy-Monitor-00006
|
||
#新增策略验证
|
||
#创建attributes中的字典
|
||
${fqdn} Create Dictionary attributeType=string attributeName=host appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "v.ifeng.com/"}
|
||
${url} Create Dictionary attributeType=string attributeName=url appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "v.ifeng.com/"}
|
||
${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "AppleWebKit","district": "User-Agent"}
|
||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "${HTTP_VID}"}
|
||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||
# 合成attributes字典集
|
||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ua}
|
||
${verifySession} Create Dictionary attributes=${attributes}
|
||
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
||
log ${verifyList}
|
||
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||
# 打印检查结果
|
||
${objectid_verify} Set Variable ${testClentIpId}
|
||
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_objectId11} ${monitor_objectId12} ${monitor_policyId5}
|
||
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||
log ${objectid_verify}
|
||
${testType} Evaluate type($objectid_verify)
|
||
${testType} Evaluate type($resData)
|
||
log ${resData}
|
||
sleep 5
|
||
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||
Should Be Equal As Strings ${ok} true
|
||
|
||
Proxy-Policy-Monitor-00007
|
||
#新增策略验证
|
||
#创建attributes中的字典
|
||
${fqdn} Create Dictionary attributeType=string attributeName=host appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "www.pptv.com"}
|
||
${url} Create Dictionary attributeType=string attributeName=url appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "www.pptv.com"}
|
||
${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "hahahahsfeSafari/537.36","district": "User-Agent"}
|
||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "${HTTP_VID}"}
|
||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||
# 合成attributes字典集
|
||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ua}
|
||
${verifySession} Create Dictionary attributes=${attributes}
|
||
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
||
log ${verifyList}
|
||
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||
# 打印检查结果
|
||
${objectid_verify} Set Variable ${testClentIpId}
|
||
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_objectId14} ${monitor_objectId15} ${monitor_policyId6}
|
||
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||
log ${objectid_verify}
|
||
${testType} Evaluate type($objectid_verify)
|
||
${testType} Evaluate type($resData)
|
||
log ${resData}
|
||
sleep 5
|
||
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||
Should Be Equal As Strings ${ok} true
|
||
|
||
Proxy-Policy-Monitor-00008
|
||
#新增策略验证
|
||
#创建attributes中的字典
|
||
${fqdn} Create Dictionary attributeType=string attributeName=host appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "love.163.com"}
|
||
${url} Create Dictionary attributeType=string attributeName=url appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "love.163.com/"}
|
||
${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "utf-8","district": "Content-Type"}
|
||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "${HTTP_VID}"}
|
||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||
# 合成attributes字典集
|
||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${res_hdr_ct}
|
||
${verifySession} Create Dictionary attributes=${attributes}
|
||
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
||
log ${verifyList}
|
||
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||
# 打印检查结果
|
||
${objectid_verify} Set Variable ${testClentIpId}
|
||
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_objectId52} ${monitor_objectId53} ${monitor_policyId7}
|
||
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||
log ${objectid_verify}
|
||
${testType} Evaluate type($objectid_verify)
|
||
${testType} Evaluate type($resData)
|
||
log ${resData}
|
||
sleep 5
|
||
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||
Should Be Equal As Strings ${ok} true
|
||
|
||
Proxy-Policy-Monitor-00009
|
||
#新增策略验证
|
||
#创建attributes中的字典
|
||
${fqdn} Create Dictionary attributeType=string attributeName=host appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "v.iqilu.com"}
|
||
${url} Create Dictionary attributeType=string attributeName=url appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "v.iqilu.com/"}
|
||
${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "text/html","district": "Content-Type"}
|
||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "${HTTP_VID}"}
|
||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||
# 合成attributes字典集
|
||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${res_hdr_ct}
|
||
${verifySession} Create Dictionary attributes=${attributes}
|
||
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
||
log ${verifyList}
|
||
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||
# 打印检查结果
|
||
${objectid_verify} Set Variable ${testClentIpId}
|
||
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_objectId19} ${monitor_objectId20} ${monitor_objectId21} ${monitor_policyId8}
|
||
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||
log ${objectid_verify}
|
||
${testType} Evaluate type($objectid_verify)
|
||
${testType} Evaluate type($resData)
|
||
log ${resData}
|
||
sleep 5
|
||
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||
Should Be Equal As Strings ${ok} true
|
||
|
||
Proxy-Policy-Monitor-00010
|
||
#新增策略验证
|
||
#创建attributes中的字典
|
||
${fqdn} Create Dictionary attributeType=string attributeName=host appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "www.fun.tv"}
|
||
${url} Create Dictionary attributeType=string attributeName=url appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "www.fun.tv/movie/"}
|
||
${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "text/html","district": "Content-Type"}
|
||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "${HTTP_VID}"}
|
||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||
# 合成attributes字典集
|
||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${res_hdr_ct}
|
||
${verifySession} Create Dictionary attributes=${attributes}
|
||
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
||
log ${verifyList}
|
||
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||
# 打印检查结果
|
||
${objectid_verify} Set Variable ${testClentIpId}
|
||
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_objectId22} ${monitor_objectId23} ${monitor_objectId24} ${monitor_policyId9}
|
||
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||
log ${objectid_verify}
|
||
${testType} Evaluate type($objectid_verify)
|
||
${testType} Evaluate type($resData)
|
||
log ${resData}
|
||
sleep 5
|
||
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||
Should Be Equal As Strings ${ok} true
|
||
|
||
Proxy-Policy-Monitor-00011
|
||
#新增策略验证
|
||
#创建attributes中的字典
|
||
${fqdn} Create Dictionary attributeType=string attributeName=host appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "hongniang.com"}
|
||
${url} Create Dictionary attributeType=string attributeName=url appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "hongniang.com/"}
|
||
${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "text/html","district": "Content-Type"}
|
||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "${HTTP_VID}"}
|
||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||
# 合成attributes字典集
|
||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${res_hdr_ct}
|
||
${verifySession} Create Dictionary attributes=${attributes}
|
||
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
||
log ${verifyList}
|
||
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||
# 打印检查结果
|
||
${objectid_verify} Set Variable ${testClentIpId}
|
||
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_objectId25} ${monitor_objectId26} ${monitor_objectId27} ${monitor_policyId10}
|
||
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||
log ${objectid_verify}
|
||
${testType} Evaluate type($objectid_verify)
|
||
${testType} Evaluate type($resData)
|
||
log ${resData}
|
||
sleep 5
|
||
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||
Should Be Equal As Strings ${ok} true
|
||
|
||
|