增加VOIP服务的策略验证

This commit is contained in:
hebingning
2021-03-10 19:29:04 +08:00
parent 9719908159
commit 40d86c39d3
2 changed files with 770 additions and 0 deletions

View File

@@ -0,0 +1,287 @@
*** Settings ***
Test Teardown DeletePolicyAndGroupObject ${policyIds} ${objectids}
Force Tags 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
Library demjson
Resource ../../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot
Library ../../../../04-CustomLibrary/Library/VerifyPolicy.py
Resource ../../../../05-Other/AllFlowCaseVariable.txt
*** Variables ***
${url} /v1/policy/profile/trustedcacertobj
${certId} ${EMPTY}
${policyIds} ${EMPTY}
${objectids} ${EMPTY}
*** Test Cases ***
VerifySecurity--Allow-SIP-example
[Tags] VerifyAllowSipexample
#新增策略验证
#创建attributes中的字典
${sni} Create Dictionary attributeType=string attributeName=sni appId=126 appName=ssl protocol=ssl attributeValue={"string": "verifytest"}
${san} Create Dictionary attributeType=string attributeName=san appId=126 appName=ssl protocol=ssl attributeValue={"string": "verify.com"}
${cn} Create Dictionary attributeType=string attributeName=cn appId=126 appName=ssl protocol=ssl attributeValue={"string": "verifytest.com"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "126"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test3"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"192.168.50.3","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 ${sni} ${san} ${cn} ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
# 将 策略id 加入对象 id
${objectid_verify} Catenate SEPARATOR=, ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
VerifySecurity-Allow-Rtp-00001
[Tags] VerifyAllowRtp00001
#新增策略验证
#创建attributes中的字典
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"65500","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}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
VerifySecurity-Allow-Rtp-00002And0004
[Tags] VerifyAllowRtp00002
#新增策略验证
#创建attributes中的字典
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"2222","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}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
VerifySecurity-Allow-Rtp-00003
[Tags] VerifyAllowRtp00003
#新增策略验证
#创建attributes中的字典
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"1.1.1.1","port":"2222","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}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
VerifySecurity-Allow-Rtp-00005
[Tags] VerifyAllowRtp00005
#新增策略验证
#创建attributes中的字典
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP3}","port":"30000","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}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
VerifySecurity-Allow-Rtp-00006
[Tags] VerifyAllowRtp00006
#新增策略验证
#创建attributes中的字典
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP3}","port":"2222","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}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
VerifySecurity-Allow-Rtp-00008
[Tags] VerifyAllowRtp00008
#新增策略验证
#创建attributes中的字典
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"1.1.1.1","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"${testClentIP3}","port":"60000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
# 合成attributes字典集
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
VerifySecurity-Allow-Rtp-00009
[Tags] VerifyAllowRtp00009
#新增策略验证
#创建attributes中的字典
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"1.1.1.1","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"${testClentIP3}","port":"20000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
# 合成attributes字典集
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
VerifySecurity-Allow-Rtp-000010
[Tags] VerifyAllowRtp000010
#新增策略验证
#创建attributes中的字典
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"1.1.1.1","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"${testClentIP3}","port":"50000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
# 合成attributes字典集
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true

View File

@@ -0,0 +1,483 @@
*** Settings ***
Test Teardown DeletePolicyAndGroupObject ${policyIds} ${objectids}
Force Tags 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
Library demjson
Resource ../../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot
Library ../../../../04-CustomLibrary/Library/VerifyPolicy.py
Resource ../../../../05-Other/AllFlowCaseVariable.txt
*** Variables ***
${url} /v1/policy/profile/trustedcacertobj
${certId} ${EMPTY}
${policyIds} ${EMPTY}
${objectids} ${EMPTY}
*** Test Cases ***
VerifySecurity--Allow-SIP-example
[Tags] VerifyAllowSipexample
log ${intid}
#新增策略验证
#创建attributes中的字典
${sni} Create Dictionary attributeType=string attributeName=sni appId=126 appName=ssl protocol=ssl attributeValue={"string": "verifytest"}
${san} Create Dictionary attributeType=string attributeName=san appId=126 appName=ssl protocol=ssl attributeValue={"string": "verify.com"}
${cn} Create Dictionary attributeType=string attributeName=cn appId=126 appName=ssl protocol=ssl attributeValue={"string": "verifytest.com"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "126"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test3"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"192.168.50.3","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 ${sni} ${san} ${cn} ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
# 将 策略id 加入对象 id
${objectid_verify} Catenate SEPARATOR=, ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
VerifySecurity--Allow-SIP-00001_To_003
[Tags] VerifyAllowSip0001_to_0003
log ${intid}
#新增策略验证1
#创建attributes中的字典
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
${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}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
sleep 5
#新增策略验证2
#创建attributes中的字典
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","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}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
sleep 5
#新增策略验证3
#创建attributes中的字典
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP3}","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}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
sleep 5
#新增策略验证4
#创建attributes中的字典
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP4}","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}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
sleep 5
#新增策略验证5
#创建attributes中的字典
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP1}","port":"6666","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}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
#新增策略验证6
#创建attributes中的字典
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"6666","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}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
sleep 5
#新增策略验证7
#创建attributes中的字典
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP3}","port":"6666","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}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
sleep 5
#新增策略验证8
#创建attributes中的字典
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP4}","port":"6666","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}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
sleep 5
VerifySecurity--Allow-SIP-000011and000012
[Tags] Verify
#新增策略验证1
#创建attributes中的字典
${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "zdjzyq12voip"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","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}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
#新增策略验证2
#创建attributes中的字典
${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "zdjzy22131"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","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}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
#新增策略验证3
#创建attributes中的字典
${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "yq12v1ss"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","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}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
#新增策略验证4
#创建attributes中的字典
${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "12voip888"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","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}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
VerifySecurity--Allow-SIP-000013and00014
[Tags] Verify
#新增策略验证1
#创建attributes中的字典
${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "wx7051406391"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"6666","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}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
#新增策略验证2
#创建attributes中的字典
${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "wx7053123121231"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"6666","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}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
#新增策略验证3
#创建attributes中的字典
${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "51406afswr"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"6666","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}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
#新增策略验证4
#创建attributes中的字典
${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "afsfsfsf51406391"}
${to}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"6666","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}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
VerifySecurity--Allow-SIP-000016
[Tags] Verify