2021-03-10 19:29:04 +08:00
|
|
|
|
*** 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 ***
|
2021-03-15 08:49:37 +08:00
|
|
|
|
VerifySecurity--Allow-SIP-00001_To_000010
|
2021-03-10 19:29:04 +08:00
|
|
|
|
[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}
|
|
|
|
|
|
# 打印检查结果
|
2021-03-15 08:49:37 +08:00
|
|
|
|
${objectid_verify} Set Variable ${testClentIpId}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
2021-03-15 08:49:37 +08:00
|
|
|
|
log ${objectid_verify}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
${testType} Evaluate type($objectid_verify)
|
|
|
|
|
|
${testType} Evaluate type($resData)
|
2021-03-15 08:49:37 +08:00
|
|
|
|
log ${resData}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
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}
|
|
|
|
|
|
# 打印检查结果
|
2021-03-15 08:49:37 +08:00
|
|
|
|
${objectid_verify} Set Variable ${allow_sip_objectId17}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
2021-03-15 08:49:37 +08:00
|
|
|
|
log ${objectid_verify}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
${testType} Evaluate type($objectid_verify)
|
|
|
|
|
|
${testType} Evaluate type($resData)
|
2021-03-15 08:49:37 +08:00
|
|
|
|
log ${resData}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
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}
|
|
|
|
|
|
# 打印检查结果
|
2021-03-15 08:49:37 +08:00
|
|
|
|
${objectid_verify} Set Variable ${allow_sip_objectId18}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
2021-03-15 08:49:37 +08:00
|
|
|
|
log ${objectid_verify}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
${testType} Evaluate type($objectid_verify)
|
|
|
|
|
|
${testType} Evaluate type($resData)
|
2021-03-15 08:49:37 +08:00
|
|
|
|
log ${resData}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
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}
|
|
|
|
|
|
# 打印检查结果
|
2021-03-15 08:49:37 +08:00
|
|
|
|
${objectid_verify} Set Variable ${allow_sip_objectId19}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
2021-03-15 08:49:37 +08:00
|
|
|
|
log ${objectid_verify}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
${testType} Evaluate type($objectid_verify)
|
|
|
|
|
|
${testType} Evaluate type($resData)
|
2021-03-15 08:49:37 +08:00
|
|
|
|
log ${resData}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
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"}
|
2021-03-15 08:49:37 +08:00
|
|
|
|
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
${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}
|
|
|
|
|
|
# 打印检查结果
|
2021-03-15 08:49:37 +08:00
|
|
|
|
${objectid_verify} Set Variable ${allow_sip_objectId20}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId1}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
2021-03-15 08:49:37 +08:00
|
|
|
|
log ${objectid_verify}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
${testType} Evaluate type($objectid_verify)
|
|
|
|
|
|
${testType} Evaluate type($resData)
|
2021-03-15 08:49:37 +08:00
|
|
|
|
log ${resData}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
sleep 5
|
|
|
|
|
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
|
|
|
|
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
2021-03-15 08:49:37 +08:00
|
|
|
|
sleep 5
|
2021-03-10 19:29:04 +08:00
|
|
|
|
#新增策略验证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}
|
|
|
|
|
|
# 打印检查结果
|
2021-03-15 08:49:37 +08:00
|
|
|
|
${objectid_verify} Set Variable ${allow_sip_objectId21}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId1}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
2021-03-15 08:49:37 +08:00
|
|
|
|
log ${objectid_verify}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
${testType} Evaluate type($objectid_verify)
|
|
|
|
|
|
${testType} Evaluate type($resData)
|
2021-03-15 08:49:37 +08:00
|
|
|
|
log ${resData}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
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}
|
|
|
|
|
|
# 打印检查结果
|
2021-03-15 08:49:37 +08:00
|
|
|
|
${objectid_verify} Set Variable ${allow_sip_objectId22}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId1}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
2021-03-15 08:49:37 +08:00
|
|
|
|
log ${objectid_verify}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
${testType} Evaluate type($objectid_verify)
|
|
|
|
|
|
${testType} Evaluate type($resData)
|
2021-03-15 08:49:37 +08:00
|
|
|
|
log ${resData}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
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}
|
|
|
|
|
|
# 打印检查结果
|
2021-03-15 08:49:37 +08:00
|
|
|
|
${objectid_verify} Set Variable ${allow_sip_objectId23}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_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}
|
|
|
|
|
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
#新增策略验证9
|
|
|
|
|
|
#创建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":"2.2.2.99","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} Set Variable ${testClentSubId}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId2}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
2021-03-15 08:49:37 +08:00
|
|
|
|
log ${objectid_verify}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
${testType} Evaluate type($objectid_verify)
|
|
|
|
|
|
${testType} Evaluate type($resData)
|
2021-03-15 08:49:37 +08:00
|
|
|
|
log ${resData}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
sleep 5
|
|
|
|
|
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
|
|
|
|
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
|
|
|
|
|
sleep 5
|
2021-03-15 08:49:37 +08:00
|
|
|
|
Comment 删除对象
|
|
|
|
|
|
${objectids} Create List [${allow_sip_objectId17}] [${allow_sip_objectId18}] [${allow_sip_objectId19}] [${allow_sip_objectId20}] [${allow_sip_policyId}]
|
|
|
|
|
|
... [${allow_sip_objectId21}] [${allow_sip_objectId22}] [${allow_sip_objectId23}] [${allow_sip_objectId17}] [${allow_sip_policyId1}] ${allow_sip_policyId2}
|
|
|
|
|
|
Comment 删除策略
|
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${allow_rtp_policyId1}]}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
|
2021-03-15 08:49:37 +08:00
|
|
|
|
VerifySecurity--Allow-SIP-000011
|
2021-03-10 19:29:04 +08:00
|
|
|
|
[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字典集
|
2021-03-15 08:49:37 +08:00
|
|
|
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${from}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
2021-03-15 08:49:37 +08:00
|
|
|
|
${objectid_verify} Set Variable ${allow_sip_objectId8}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId10}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
2021-03-15 08:49:37 +08:00
|
|
|
|
log ${objectid_verify}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
${testType} Evaluate type($objectid_verify)
|
|
|
|
|
|
${testType} Evaluate type($resData)
|
2021-03-15 08:49:37 +08:00
|
|
|
|
log ${resData}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
sleep 5
|
|
|
|
|
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
|
|
|
|
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
2021-03-15 08:49:37 +08:00
|
|
|
|
sleep 5
|
2021-03-10 19:29:04 +08:00
|
|
|
|
#新增策略验证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字典集
|
2021-03-15 08:49:37 +08:00
|
|
|
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${from}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
2021-03-15 08:49:37 +08:00
|
|
|
|
${objectid_verify} Set Variable ${allow_sip_objectId8}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId10}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
2021-03-15 08:49:37 +08:00
|
|
|
|
log ${objectid_verify}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
${testType} Evaluate type($objectid_verify)
|
|
|
|
|
|
${testType} Evaluate type($resData)
|
2021-03-15 08:49:37 +08:00
|
|
|
|
log ${resData}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
sleep 5
|
|
|
|
|
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
|
|
|
|
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
2021-03-15 08:49:37 +08:00
|
|
|
|
sleep 5
|
2021-03-10 19:29:04 +08:00
|
|
|
|
#新增策略验证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字典集
|
2021-03-15 08:49:37 +08:00
|
|
|
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${from}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
2021-03-15 08:49:37 +08:00
|
|
|
|
${objectid_verify} Set Variable ${allow_sip_objectId8}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId10}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
2021-03-15 08:49:37 +08:00
|
|
|
|
log ${objectid_verify}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
${testType} Evaluate type($objectid_verify)
|
|
|
|
|
|
${testType} Evaluate type($resData)
|
2021-03-15 08:49:37 +08:00
|
|
|
|
log ${resData}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
sleep 5
|
|
|
|
|
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
|
|
|
|
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
2021-03-15 08:49:37 +08:00
|
|
|
|
sleep 5
|
2021-03-10 19:29:04 +08:00
|
|
|
|
#新增策略验证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字典集
|
2021-03-15 08:49:37 +08:00
|
|
|
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${from}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
2021-03-15 08:49:37 +08:00
|
|
|
|
${objectid_verify} Set Variable ${allow_sip_objectId8}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId10}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
2021-03-15 08:49:37 +08:00
|
|
|
|
log ${objectid_verify}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
${testType} Evaluate type($objectid_verify)
|
|
|
|
|
|
${testType} Evaluate type($resData)
|
2021-03-15 08:49:37 +08:00
|
|
|
|
log ${resData}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
sleep 5
|
|
|
|
|
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
|
|
|
|
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
2021-03-15 08:49:37 +08:00
|
|
|
|
sleep 5
|
|
|
|
|
|
Comment 删除对象
|
|
|
|
|
|
${objectids} Create List [${allow_sip_objectId8}]
|
|
|
|
|
|
Comment 删除策略
|
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${allow_sip_policyId10}]}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
|
2021-03-15 08:49:37 +08:00
|
|
|
|
VerifySecurity--Allow-SIP-000012
|
2021-03-10 19:29:04 +08:00
|
|
|
|
[Tags] Verify
|
|
|
|
|
|
#新增策略验证1
|
|
|
|
|
|
#创建attributes中的字典
|
2021-03-15 08:49:37 +08:00
|
|
|
|
${to} Create Dictionary attributeType=string attributeName=to appId=120 appName=SIP protocol=SIP attributeValue={"string": "zdjzyq12voip"}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
|
|
|
|
|
|
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
2021-03-15 08:49:37 +08:00
|
|
|
|
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
${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字典集
|
2021-03-15 08:49:37 +08:00
|
|
|
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${to}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
2021-03-15 08:49:37 +08:00
|
|
|
|
${objectid_verify} Set Variable ${allow_sip_objectId9}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId11}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
2021-03-15 08:49:37 +08:00
|
|
|
|
log ${objectid_verify}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
${testType} Evaluate type($objectid_verify)
|
|
|
|
|
|
${testType} Evaluate type($resData)
|
2021-03-15 08:49:37 +08:00
|
|
|
|
log ${resData}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
sleep 5
|
|
|
|
|
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
|
|
|
|
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
2021-03-15 08:49:37 +08:00
|
|
|
|
sleep 5
|
2021-03-10 19:29:04 +08:00
|
|
|
|
#新增策略验证2
|
|
|
|
|
|
#创建attributes中的字典
|
2021-03-15 08:49:37 +08:00
|
|
|
|
${to} Create Dictionary attributeType=string attributeName=to 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} ${to}
|
|
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
|
|
|
|
|
${objectid_verify} Set Variable ${allow_sip_objectId9}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId11}
|
|
|
|
|
|
# # 调用关键字 提取应答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}
|
|
|
|
|
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
#新增策略验证3
|
|
|
|
|
|
#创建attributes中的字典
|
|
|
|
|
|
${to} Create Dictionary attributeType=string attributeName=to 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} ${to}
|
|
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
|
|
|
|
|
${objectid_verify} Set Variable ${allow_sip_objectId9}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId11}
|
|
|
|
|
|
# # 调用关键字 提取应答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}
|
|
|
|
|
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
#新增策略验证4
|
|
|
|
|
|
#创建attributes中的字典
|
|
|
|
|
|
${to} Create Dictionary attributeType=string attributeName=to 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} ${to}
|
|
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
|
|
|
|
|
${objectid_verify} Set Variable ${allow_sip_objectId9}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId11}
|
|
|
|
|
|
# # 调用关键字 提取应答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}
|
|
|
|
|
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
Comment 删除对象
|
|
|
|
|
|
${objectids} Create List [${allow_sip_objectId9}]
|
|
|
|
|
|
Comment 删除策略
|
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${allow_sip_policyId11}]}
|
|
|
|
|
|
|
|
|
|
|
|
VerifySecurity--Allow-SIP-000013
|
|
|
|
|
|
[Tags] Verify
|
|
|
|
|
|
#新增策略验证1
|
|
|
|
|
|
#创建attributes中的字典
|
|
|
|
|
|
${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "zdjzyq12voip"}
|
|
|
|
|
|
${to} Create Dictionary attributeType=string attributeName=to appId=120 appName=SIP protocol=SIP attributeValue={"string": "51406kkkk"}
|
|
|
|
|
|
${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} ${to} ${from}
|
|
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
|
|
|
|
|
${objectid_verify} Set Variable ${allow_sip_objectId10}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_objectId11} ${allow_sip_objectId12} ${allow_sip_policyId12}
|
|
|
|
|
|
# # 调用关键字 提取应答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
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
Comment 删除对象
|
|
|
|
|
|
${objectids} Create List [${allow_sip_objectId9}]
|
|
|
|
|
|
Comment 删除策略
|
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${allow_sip_policyId12}]}
|
|
|
|
|
|
|
|
|
|
|
|
VerifySecurity--Allow-SIP-000014
|
|
|
|
|
|
[Tags] Verify
|
|
|
|
|
|
#新增策略验证1
|
|
|
|
|
|
#创建attributes中的字典
|
|
|
|
|
|
${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "zdjzyq12voip"}
|
|
|
|
|
|
${to} Create Dictionary attributeType=string attributeName=to appId=120 appName=SIP protocol=SIP attributeValue={"string": "51406kkkk"}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
${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"}
|
2021-03-15 08:49:37 +08:00
|
|
|
|
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"${testClentIP3}","port":"7777","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
|
|
|
|
|
# 合成attributes字典集
|
|
|
|
|
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${to} ${from}
|
|
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
|
|
|
|
|
${objectid_verify} Set Variable ${allow_sip_objectId10}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_objectId13} ${allow_sip_objectId14} ${allow_sip_objectId15} ${allow_sip_objectId16} ${allow_sip_policyId13}
|
|
|
|
|
|
# # 调用关键字 提取应答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
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
Comment 删除对象
|
|
|
|
|
|
${objectids} Create List [${allow_sip_objectId10}] [${allow_sip_objectId13}] [${allow_sip_objectId14}] [${allow_sip_objectId15}] [${allow_sip_objectId13}] [${allow_sip_objectId13}]
|
|
|
|
|
|
Comment 删除策略
|
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${allow_sip_policyId13}]}
|
|
|
|
|
|
|
|
|
|
|
|
VerifySecurity--Deny-SIP-00001
|
|
|
|
|
|
#新增策略验证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":"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} Set Variable ${testClentIpId}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_sip_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}
|
|
|
|
|
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
Comment 删除对象
|
|
|
|
|
|
${objectids} Create List [${allow_sip_objectId17}] [${allow_sip_objectId18}] [${allow_sip_objectId19}] [${allow_sip_objectId20}] [${allow_sip_policyId}]
|
|
|
|
|
|
... [${allow_sip_objectId21}] [${allow_sip_objectId22}] [${allow_sip_objectId23}] [${allow_sip_objectId17}] [${allow_sip_policyId1}] ${allow_sip_policyId2}
|
|
|
|
|
|
Comment 删除策略
|
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${allow_rtp_policyId1}]}
|
|
|
|
|
|
|
|
|
|
|
|
VerifySecurity--Deny-SIP-00005
|
|
|
|
|
|
#新增策略验证
|
|
|
|
|
|
#创建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":"20000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
${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}
|
|
|
|
|
|
# 打印检查结果
|
2021-03-15 08:49:37 +08:00
|
|
|
|
${objectid_verify} Set Variable ${deny_sip_objectId2}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_sip_policyId4}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
2021-03-15 08:49:37 +08:00
|
|
|
|
log ${objectid_verify}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
${testType} Evaluate type($objectid_verify)
|
|
|
|
|
|
${testType} Evaluate type($resData)
|
2021-03-15 08:49:37 +08:00
|
|
|
|
log ${resData}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
sleep 5
|
|
|
|
|
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
|
|
|
|
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
2021-03-15 08:49:37 +08:00
|
|
|
|
sleep 5
|
|
|
|
|
|
Comment 删除对象
|
|
|
|
|
|
${objectids} Create List [${deny_sip_objectId2}]
|
|
|
|
|
|
Comment 删除策略
|
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_sip_policyId4}]}
|
|
|
|
|
|
|
|
|
|
|
|
VerifySecurity--Deny-SIP-00005
|
2021-03-10 19:29:04 +08:00
|
|
|
|
#新增策略验证3
|
|
|
|
|
|
#创建attributes中的字典
|
|
|
|
|
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
|
|
|
|
|
|
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
2021-03-15 08:49:37 +08:00
|
|
|
|
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP3}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
${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}
|
|
|
|
|
|
# 打印检查结果
|
2021-03-15 08:49:37 +08:00
|
|
|
|
${objectid_verify} Set Variable ${allow_sip_objectId18}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
2021-03-15 08:49:37 +08:00
|
|
|
|
log ${objectid_verify}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
${testType} Evaluate type($objectid_verify)
|
|
|
|
|
|
${testType} Evaluate type($resData)
|
2021-03-15 08:49:37 +08:00
|
|
|
|
log ${resData}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
sleep 5
|
|
|
|
|
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
|
|
|
|
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
2021-03-15 08:49:37 +08:00
|
|
|
|
sleep 5
|
2021-03-10 19:29:04 +08:00
|
|
|
|
#新增策略验证4
|
|
|
|
|
|
#创建attributes中的字典
|
2021-03-15 08:49:37 +08:00
|
|
|
|
${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} Set Variable ${allow_sip_objectId19}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_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}
|
|
|
|
|
|
# # ${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":"${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} Set Variable ${allow_sip_objectId20}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_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}
|
|
|
|
|
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
#新增策略验证6
|
|
|
|
|
|
#创建attributes中的字典
|
2021-03-10 19:29:04 +08:00
|
|
|
|
${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}
|
|
|
|
|
|
# 打印检查结果
|
2021-03-15 08:49:37 +08:00
|
|
|
|
${objectid_verify} Set Variable ${allow_sip_objectId21}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId1}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
2021-03-15 08:49:37 +08:00
|
|
|
|
log ${objectid_verify}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
${testType} Evaluate type($objectid_verify)
|
|
|
|
|
|
${testType} Evaluate type($resData)
|
2021-03-15 08:49:37 +08:00
|
|
|
|
log ${resData}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
sleep 5
|
|
|
|
|
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
|
|
|
|
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
2021-03-15 08:49:37 +08:00
|
|
|
|
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} Set Variable ${allow_sip_objectId22}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_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}
|
|
|
|
|
|
# # ${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} Set Variable ${allow_sip_objectId23}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_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}
|
|
|
|
|
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
#新增策略验证9
|
|
|
|
|
|
#创建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":"2.2.2.99","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} Set Variable ${testClentSubId}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId2}
|
|
|
|
|
|
# # 调用关键字 提取应答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}
|
|
|
|
|
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
Comment 删除对象
|
|
|
|
|
|
${objectids} Create List [${allow_sip_objectId17}] [${allow_sip_objectId18}] [${allow_sip_objectId19}] [${allow_sip_objectId20}] [${allow_sip_policyId}]
|
|
|
|
|
|
... [${allow_sip_objectId21}] [${allow_sip_objectId22}] [${allow_sip_objectId23}] [${allow_sip_objectId17}] [${allow_sip_policyId1}] ${allow_sip_policyId2}
|
|
|
|
|
|
Comment 删除策略
|
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${allow_rtp_policyId1}]}
|
|
|
|
|
|
|
|
|
|
|
|
VerifySecurity--Deny-SIP-000011
|
|
|
|
|
|
#新增策略验证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} ${from}
|
|
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
|
|
|
|
|
${objectid_verify} Set Variable ${allow_sip_objectId8}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_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}
|
|
|
|
|
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
#新增策略验证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} ${from}
|
|
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
|
|
|
|
|
${objectid_verify} Set Variable ${allow_sip_objectId8}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_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}
|
|
|
|
|
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
#新增策略验证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} ${from}
|
|
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
|
|
|
|
|
${objectid_verify} Set Variable ${allow_sip_objectId8}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_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}
|
|
|
|
|
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
#新增策略验证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} ${from}
|
|
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
|
|
|
|
|
${objectid_verify} Set Variable ${allow_sip_objectId8}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_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}
|
|
|
|
|
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
Comment 删除对象
|
|
|
|
|
|
${objectids} Create List [${allow_sip_objectId8}]
|
|
|
|
|
|
Comment 删除策略
|
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${allow_sip_policyId10}]}
|
|
|
|
|
|
|
|
|
|
|
|
VerifySecurity--Deny-SIP-000014
|
|
|
|
|
|
#新增策略验证1
|
|
|
|
|
|
#创建attributes中的字典
|
|
|
|
|
|
${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "zdjzyq12voip"}
|
|
|
|
|
|
${to} Create Dictionary attributeType=string attributeName=to appId=120 appName=SIP protocol=SIP attributeValue={"string": "51406kkkk"}
|
|
|
|
|
|
${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} ${to} ${from}
|
|
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
|
|
|
|
|
${objectid_verify} Set Variable ${deny_sip_objectId11}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_sip_policyId13}
|
|
|
|
|
|
# # 调用关键字 提取应答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
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
Comment 删除对象
|
|
|
|
|
|
${objectids} Create List [${deny_sip_objectId11}]
|
|
|
|
|
|
Comment 删除策略
|
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_sip_policyId13}]}
|
|
|
|
|
|
|
|
|
|
|
|
VerifySecurity--Deny-SIP-000017
|
|
|
|
|
|
#新增策略验证1
|
|
|
|
|
|
#创建attributes中的字典
|
|
|
|
|
|
${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "zdjzyq12voip"}
|
|
|
|
|
|
${to} Create Dictionary attributeType=string attributeName=to appId=120 appName=SIP protocol=SIP attributeValue={"string": "51406kkkk"}
|
|
|
|
|
|
${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":"${testClentIP2}","port":"20000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
|
|
|
|
|
# 合成attributes字典集
|
|
|
|
|
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${to} ${from}
|
|
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
|
|
|
|
|
${objectid_verify} Set Variable ${deny_sip_objectId14}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_sip_objectId15} ${deny_sip_objectId1501} ${deny_sip_policyId16}
|
|
|
|
|
|
# # 调用关键字 提取应答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
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
Comment 删除对象
|
|
|
|
|
|
${objectids} Create List [${deny_sip_objectId14}] [${deny_sip_objectId15}] [${deny_sip_objectId1501}]
|
|
|
|
|
|
Comment 删除策略
|
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_sip_policyId16}]}
|
|
|
|
|
|
|
|
|
|
|
|
VerifySecurity--Deny-SIP-000024
|
|
|
|
|
|
#新增策略验证1
|
|
|
|
|
|
#创建attributes中的字典
|
|
|
|
|
|
${from1} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "zdjzyq12voip"}
|
|
|
|
|
|
${to1} Create Dictionary attributeType=string attributeName=to appId=120 appName=SIP protocol=SIP attributeValue={"string": "zdjzy77777"}
|
|
|
|
|
|
${from2} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "aaayq12v5553"}
|
|
|
|
|
|
${to2} Create Dictionary attributeType=string attributeName=to appId=120 appName=SIP protocol=SIP attributeValue={"string": "qqqq312voip"}
|
|
|
|
|
|
${from3} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "zdjzyq12voi"}
|
|
|
|
|
|
${to3} Create Dictionary attributeType=string attributeName=to appId=120 appName=SIP protocol=SIP attributeValue={"string": "sie133ll12voi"}
|
|
|
|
|
|
${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":"${testClentIP3}","port":"7777","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
|
|
|
|
|
# 合成attributes字典集
|
|
|
|
|
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${from1} ${from2} ${from3} ${to1} ${to2} ${to3}
|
|
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
|
|
|
|
|
${objectid_verify} Set Variable ${testClentIpId}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_sip_objectId32} ${deny_sip_objectId33} ${deny_sip_objectId34} ${deny_sip_objectId35}
|
|
|
|
|
|
... ${deny_sip_objectId36} ${deny_sip_objectId37} ${deny_sip_policyId23}
|
|
|
|
|
|
# # 调用关键字 提取应答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
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
Comment 删除对象
|
|
|
|
|
|
${objectids} Create List [${deny_sip_objectId32}] [${deny_sip_objectId33}] [${deny_sip_objectId34}] [${deny_sip_objectId35}] [${deny_sip_objectId36}] [${deny_sip_objectId37}]
|
|
|
|
|
|
Comment 删除策略
|
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_sip_policyId23}]}
|
|
|
|
|
|
|
|
|
|
|
|
VerifySecurity--Monitor-SIP-00001_To_000010
|
|
|
|
|
|
#新增策略验证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":"40000","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} Set Variable ${testClentIpId}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_sip_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}
|
|
|
|
|
|
# # ${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":"${testClentIP}","port":"20000","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} Set Variable ${monitor_sip_objectId}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_sip_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}
|
|
|
|
|
|
# # ${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} Set Variable ${allow_sip_objectId18}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_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}
|
|
|
|
|
|
# # ${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} Set Variable ${allow_sip_objectId19}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_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}
|
|
|
|
|
|
# # ${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":"${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} Set Variable ${allow_sip_objectId20}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_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}
|
|
|
|
|
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
#新增策略验证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} Set Variable ${allow_sip_objectId21}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_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}
|
|
|
|
|
|
# # ${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} Set Variable ${allow_sip_objectId22}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_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}
|
|
|
|
|
|
# # ${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} Set Variable ${allow_sip_objectId23}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_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}
|
|
|
|
|
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
#新增策略验证9
|
|
|
|
|
|
#创建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":"2.2.2.99","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} Set Variable ${testClentSubId}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId2}
|
|
|
|
|
|
# # 调用关键字 提取应答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}
|
|
|
|
|
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
Comment 删除对象
|
|
|
|
|
|
${objectids} Create List [${allow_sip_objectId17}] [${allow_sip_objectId18}] [${allow_sip_objectId19}] [${allow_sip_objectId20}] [${allow_sip_policyId}]
|
|
|
|
|
|
... [${allow_sip_objectId21}] [${allow_sip_objectId22}] [${allow_sip_objectId23}] [${allow_sip_objectId17}] [${allow_sip_policyId1}] ${allow_sip_policyId2}
|
|
|
|
|
|
Comment 删除策略
|
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${allow_rtp_policyId1}]}
|
|
|
|
|
|
|
|
|
|
|
|
VerifySecurity--Monitor-SIP-000011
|
|
|
|
|
|
#新增策略验证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} ${from}
|
|
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
|
|
|
|
|
${objectid_verify} Set Variable ${monitor_sip_objectId8}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_sip_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}
|
|
|
|
|
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
#新增策略验证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} ${from}
|
|
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
|
|
|
|
|
${objectid_verify} Set Variable ${monitor_sip_objectId8}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_sip_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}
|
|
|
|
|
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
#新增策略验证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} ${from}
|
|
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
|
|
|
|
|
${objectid_verify} Set Variable ${monitor_sip_objectId8}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_sip_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}
|
|
|
|
|
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
#新增策略验证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} ${from}
|
|
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
|
|
|
|
|
${objectid_verify} Set Variable ${monitor_sip_objectId8}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_sip_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}
|
|
|
|
|
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
Comment 删除对象
|
|
|
|
|
|
${objectids} Create List [${monitor_sip_objectId8}]
|
|
|
|
|
|
Comment 删除策略
|
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${monitor_sip_policyId10}]}
|
|
|
|
|
|
|
|
|
|
|
|
VerifySecurity--Monitor-SIP-000012
|
|
|
|
|
|
#新增策略验证1
|
|
|
|
|
|
#创建attributes中的字典
|
|
|
|
|
|
${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "zdjzyq12voip"}
|
|
|
|
|
|
${to} Create Dictionary attributeType=string attributeName=to appId=120 appName=SIP protocol=SIP attributeValue={"string": "51406kkkk"}
|
|
|
|
|
|
${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} ${to} ${from}
|
|
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
|
|
|
|
|
${objectid_verify} Set Variable ${monitor_sip_objectId9}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_sip_policyId11}
|
|
|
|
|
|
# # 调用关键字 提取应答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
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
Comment 删除对象
|
|
|
|
|
|
${objectids} Create List [${monitor_sip_objectId9}]
|
|
|
|
|
|
Comment 删除策略
|
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${monitor_sip_policyId11}]}
|
|
|
|
|
|
|
|
|
|
|
|
VerifySecurity--Monitor-SIP-000013
|
|
|
|
|
|
#新增策略验证1
|
|
|
|
|
|
#创建attributes中的字典
|
|
|
|
|
|
${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "zdjzyq12voip"}
|
|
|
|
|
|
${to} Create Dictionary attributeType=string attributeName=to appId=120 appName=SIP protocol=SIP attributeValue={"string": "51406kkkk"}
|
|
|
|
|
|
${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} ${to} ${from}
|
|
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
|
|
|
|
|
${objectid_verify} Set Variable ${monitor_sip_objectId10}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_sip_objectId11} ${monitor_sip_objectId12} ${monitor_sip_policyId12}
|
|
|
|
|
|
# # 调用关键字 提取应答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
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
Comment 删除对象
|
|
|
|
|
|
${objectids} Create List [${allow_sip_objectId9}]
|
|
|
|
|
|
Comment 删除策略
|
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${monitor_sip_policyId12}]}
|
|
|
|
|
|
|
|
|
|
|
|
VerifySecurity--Monitor-SIP-000014
|
|
|
|
|
|
#新增策略验证1
|
|
|
|
|
|
#创建attributes中的字典
|
|
|
|
|
|
${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "zdjzyq12voip"}
|
|
|
|
|
|
${to} Create Dictionary attributeType=string attributeName=to appId=120 appName=SIP protocol=SIP attributeValue={"string": "51406kkkk"}
|
|
|
|
|
|
${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":"${testClentIP3}","port":"7777","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
|
|
|
|
|
# 合成attributes字典集
|
|
|
|
|
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${to} ${from}
|
|
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
|
|
|
|
|
${objectid_verify} Set Variable ${monitor_sip_objectId13}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_sip_objectId14} ${monitor_sip_objectId15} ${monitor_sip_objectId16} ${monitor_sip_policyId13}
|
|
|
|
|
|
# # 调用关键字 提取应答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
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
Comment 删除对象
|
|
|
|
|
|
${objectids} Create List [${monitor_sip_objectId13}] [${monitor_sip_objectId14}] [${monitor_sip_objectId15}] [${monitor_sip_objectId16}]
|
|
|
|
|
|
Comment 删除策略
|
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${allow_sip_policyId13}]}
|
2021-03-10 19:29:04 +08:00
|
|
|
|
|
|
|
|
|
|
|