From 7fbbbbf36854e9897b7cf9f6a7745297e561475a Mon Sep 17 00:00:00 2001 From: hebingning Date: Mon, 15 Mar 2021 08:49:37 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85VOIP=E7=AD=96=E7=95=A5?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../setting/Verify/VerifySecurity_Rtp.robot | 655 +++++++-- .../setting/Verify/VerifySecurity_sip.robot | 1206 +++++++++++++++-- 2 files changed, 1608 insertions(+), 253 deletions(-) diff --git a/01-TestCase/tsg_bfapi/setting/Verify/VerifySecurity_Rtp.robot b/01-TestCase/tsg_bfapi/setting/Verify/VerifySecurity_Rtp.robot index 2fe9ba8..3a2b04b 100644 --- a/01-TestCase/tsg_bfapi/setting/Verify/VerifySecurity_Rtp.robot +++ b/01-TestCase/tsg_bfapi/setting/Verify/VerifySecurity_Rtp.robot @@ -34,39 +34,6 @@ ${policyIds} ${EMPTY} ${objectids} ${EMPTY} *** Test Cases *** -VerifySecurity--Allow-SIP-example - [Tags] VerifyAllowSipexample - - #新增策略验证 - #创建attributes中的字典 - ${sni} Create Dictionary attributeType=string attributeName=sni appId=126 appName=ssl protocol=ssl attributeValue={"string": "verifytest"} - ${san} Create Dictionary attributeType=string attributeName=san appId=126 appName=ssl protocol=ssl attributeValue={"string": "verify.com"} - ${cn} Create Dictionary attributeType=string attributeName=cn appId=126 appName=ssl protocol=ssl attributeValue={"string": "verifytest.com"} - ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "126"} - ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test3"} - ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"192.168.50.3","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} - ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} - # 合成attributes字典集 - ${attributes} Create List ${sni} ${san} ${cn} ${app_id} ${subscriberid} ${ipsource} ${ipdestination} - ${verifySession} Create Dictionary attributes=${attributes} - ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} - log ${verifyList} - ${rescode} ${resData} VerifyPolicies ${verifyList} - # 打印检查结果 - # 将 策略id 加入对象 id - ${objectid_verify} Catenate SEPARATOR=, ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} - ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId} - # ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId} - # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 - log 1111111111111111${objectid_verify} - ${testType} Evaluate type($objectid_verify) - ${testType} Evaluate type($resData) - log 222222222222222${resData} - sleep 5 - ${ok} VerifyProxy ${resData} ${objectid_verify} - # # ${ok} VerifyProxy ${objectids} ${resData} - Should Be Equal As Strings ${ok} true - VerifySecurity-Allow-Rtp-00001 [Tags] VerifyAllowRtp00001 #新增策略验证 @@ -82,8 +49,36 @@ VerifySecurity-Allow-Rtp-00001 log ${verifyList} ${rescode} ${resData} VerifyPolicies ${verifyList} # 打印检查结果 - ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId} - # ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId} + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_rtp_policyId} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${allow_rtp_policyId}]} + +VerifySecurity-Allow-Rtp-00002And0004 + [Tags] VerifyAllowRtp00002 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_rtp_objectId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_rtp_policyId1} # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 log 1111111111111111${objectid_verify} ${testType} Evaluate type($objectid_verify) @@ -93,9 +88,71 @@ VerifySecurity-Allow-Rtp-00001 ${ok} VerifyProxy ${resData} ${objectid_verify} # # ${ok} VerifyProxy ${objectids} ${resData} Should Be Equal As Strings ${ok} true + Comment 删除对象 + ${objectids} Create List [${allow_rtp_objectId}] + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${allow_rtp_policyId1}]} -VerifySecurity-Allow-Rtp-00002And0004 - [Tags] VerifyAllowRtp00002 +VerifySecurity-Allow-Rtp-00003 + [Tags] VerifyAllowRtp00003 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"1.1.1.6","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${addpolicySubId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_rtp_policyId2} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${allow_rtp_policyId2}]} + +VerifySecurity-Allow-Rtp-00005 + [Tags] VerifyAllowRtp00005 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","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 ${allow_rtp_objectId2} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_rtp_policyId4} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + Comment 删除对象 + ${objectids} Create List [${allow_rtp_objectId2}] + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${allow_rtp_policyId4}]} + +VerifySecurity-Allow-Rtp-00006 + [Tags] VerifyAllowRtp00006 #新增策略验证 #创建attributes中的字典 ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} @@ -109,8 +166,8 @@ VerifySecurity-Allow-Rtp-00002And0004 log ${verifyList} ${rescode} ${resData} VerifyPolicies ${verifyList} # 打印检查结果 - ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId} - # ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId} + ${objectid_verify} Set Variable ${allow_rtp_objectId3} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_rtp_policyId5} # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 log 1111111111111111${objectid_verify} ${testType} Evaluate type($objectid_verify) @@ -118,89 +175,11 @@ VerifySecurity-Allow-Rtp-00002And0004 log 222222222222222${resData} sleep 5 ${ok} VerifyProxy ${resData} ${objectid_verify} - # # ${ok} VerifyProxy ${objectids} ${resData} - Should Be Equal As Strings ${ok} true - -VerifySecurity-Allow-Rtp-00003 - [Tags] VerifyAllowRtp00003 - #新增策略验证 - #创建attributes中的字典 - ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} - ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} - ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"1.1.1.1","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} - ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} - # 合成attributes字典集 - ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} - ${verifySession} Create Dictionary attributes=${attributes} - ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} - log ${verifyList} - ${rescode} ${resData} VerifyPolicies ${verifyList} - # 打印检查结果 - ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId} - # ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId} - # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 - log 1111111111111111${objectid_verify} - ${testType} Evaluate type($objectid_verify) - ${testType} Evaluate type($resData) - log 222222222222222${resData} - sleep 5 - ${ok} VerifyProxy ${resData} ${objectid_verify} - # # ${ok} VerifyProxy ${objectids} ${resData} - Should Be Equal As Strings ${ok} true - -VerifySecurity-Allow-Rtp-00005 - [Tags] VerifyAllowRtp00005 - #新增策略验证 - #创建attributes中的字典 - ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} - ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} - ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP3}","port":"30000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} - ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} - # 合成attributes字典集 - ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} - ${verifySession} Create Dictionary attributes=${attributes} - ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} - log ${verifyList} - ${rescode} ${resData} VerifyPolicies ${verifyList} - # 打印检查结果 - ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId} - # ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId} - # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 - log 1111111111111111${objectid_verify} - ${testType} Evaluate type($objectid_verify) - ${testType} Evaluate type($resData) - log 222222222222222${resData} - sleep 5 - ${ok} VerifyProxy ${resData} ${objectid_verify} - # # ${ok} VerifyProxy ${objectids} ${resData} - Should Be Equal As Strings ${ok} true - -VerifySecurity-Allow-Rtp-00006 - [Tags] VerifyAllowRtp00006 - #新增策略验证 - #创建attributes中的字典 - ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} - ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} - ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP3}","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} - ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} - # 合成attributes字典集 - ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} - ${verifySession} Create Dictionary attributes=${attributes} - ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} - log ${verifyList} - ${rescode} ${resData} VerifyPolicies ${verifyList} - # 打印检查结果 - ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId} - # ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId} - # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 - log 1111111111111111${objectid_verify} - ${testType} Evaluate type($objectid_verify) - ${testType} Evaluate type($resData) - log 222222222222222${resData} - sleep 5 - ${ok} VerifyProxy ${resData} ${objectid_verify} - # # ${ok} VerifyProxy ${objectids} ${resData} Should Be Equal As Strings ${ok} true + Comment 删除对象 + ${objectids} Create List [${allow_rtp_objectId3}] + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${allow_rtp_policyId5}]} VerifySecurity-Allow-Rtp-00008 [Tags] VerifyAllowRtp00008 @@ -209,7 +188,7 @@ VerifySecurity-Allow-Rtp-00008 ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"1.1.1.1","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} - ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"${testClentIP3}","port":"60000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"${testClentIP2}","port":"60000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} # 合成attributes字典集 ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${verifySession} Create Dictionary attributes=${attributes} @@ -217,8 +196,8 @@ VerifySecurity-Allow-Rtp-00008 log ${verifyList} ${rescode} ${resData} VerifyPolicies ${verifyList} # 打印检查结果 - ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId} - # ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId} + ${objectid_verify} Set Variable ${allow_rtp_objectId5} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_rtp_policyId7} # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 log 1111111111111111${objectid_verify} ${testType} Evaluate type($objectid_verify) @@ -226,8 +205,11 @@ VerifySecurity-Allow-Rtp-00008 log 222222222222222${resData} sleep 5 ${ok} VerifyProxy ${resData} ${objectid_verify} - # # ${ok} VerifyProxy ${objectids} ${resData} Should Be Equal As Strings ${ok} true + Comment 删除对象 + ${objectids} Create List [${allow_rtp_objectId5}] + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${allow_rtp_policyId7}]} VerifySecurity-Allow-Rtp-00009 [Tags] VerifyAllowRtp00009 @@ -235,8 +217,8 @@ VerifySecurity-Allow-Rtp-00009 #创建attributes中的字典 ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} - ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"1.1.1.1","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} - ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"${testClentIP3}","port":"20000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"2222","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} ${verifySession} Create Dictionary attributes=${attributes} @@ -244,8 +226,39 @@ VerifySecurity-Allow-Rtp-00009 log ${verifyList} ${rescode} ${resData} VerifyPolicies ${verifyList} # 打印检查结果 - ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId} - # ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId} + ${objectid_verify} Set Variable ${allow_rtp_objectId6} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_rtp_policyId8} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + Comment 删除对象 + ${objectids} Create List [${allow_rtp_objectId6}] + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${allow_rtp_policyId8}]} + + +VerifySecurity-Deny-Rtp-00001 + [Tags] VerifyDenyRtp00001 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"65500","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_rtp_policyId} # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 log 1111111111111111${objectid_verify} ${testType} Evaluate type($objectid_verify) @@ -255,15 +268,354 @@ VerifySecurity-Allow-Rtp-00009 ${ok} VerifyProxy ${resData} ${objectid_verify} # # ${ok} VerifyProxy ${objectids} ${resData} Should Be Equal As Strings ${ok} true + # Comment 删除对象 + # ${objectids} Create List [${replace_objectId33}] [${replace_objectId34}] [${replace_objectId35}] [${replace_objectId36}] [${replace_objectId37}] [${replace_objectId38}] + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_rtp_policyId}]} -VerifySecurity-Allow-Rtp-000010 - [Tags] VerifyAllowRtp000010 +VerifySecurity-Deny-Rtp-0000200002And0004 + [Tags] VerifyDenyRtp00002 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${deny_rtp_objectId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_rtp_policyId1} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + Comment 删除对象 + ${objectids} Create List [${deny_rtp_objectId}] + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_rtp_policyId1}]} + +VerifySecurity-Deny-Rtp-00003 + [Tags] VerifyDenyRtp00003 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"1.1.1.6","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${addpolicySubId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_rtp_policyId2} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_rtp_policyId2}]} + +VerifySecurity-Deny-Rtp-00005 + [Tags] VerifyDenyRtp00005 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"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 ${deny_rtp_objectId2} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_rtp_policyId4} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + Comment 删除对象 + ${objectids} Create List [${deny_rtp_objectId2}] + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_rtp_policyId4}]} + +VerifySecurity-Deny-Rtp-00006 + [Tags] VerifyDenyRtp00006 + #新增策略验证 + #创建attributes中的字典 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${deny_rtp_objectId3} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_rtp_policyId5} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + Comment 删除对象 + ${objectids} Create List [${deny_rtp_objectId3}] + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_rtp_policyId5}]} + +VerifySecurity-Deny-Rtp-00008 + [Tags] VerifyDenyRtp00008 + #新增策略验证 + #创建attributes中的字典 + # 新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"1.1.1.1","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"${testClentIP2}","port":"60000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${deny_rtp_objectId5} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_rtp_policyId7} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + Comment 删除对象 + ${objectids} Create List [${deny_rtp_objectId5}] + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_rtp_policyId7}]} + +VerifySecurity-Deny-Rtp-00009 + [Tags] VerifyDenyRtp00009 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"2222","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} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_rtp_objectId6} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_rtp_policyId8} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + Comment 删除对象 + ${objectids} Create List [${allow_rtp_objectId6}] + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${allow_rtp_policyId8}]} + + + +VerifySecurity-Monitor-Rtp-00001 + [Tags] VerifyMonitorRtp00001 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"65500","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_rtp_policyId} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + # Comment 删除对象 + # ${objectids} Create List [${replace_objectId33}] [${replace_objectId34}] [${replace_objectId35}] [${replace_objectId36}] [${replace_objectId37}] [${replace_objectId38}] + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${monitor_rtp_policyId}]} + +VerifySecurity-Monitor-Rtp-00002 + [Tags] VerifyMonitorRtp00002 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${monitor_rtp_objectId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_rtp_policyId1} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + Comment 删除对象 + ${objectids} Create List [${monitor_rtp_objectId}] + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${monitor_rtp_policyId1}]} + +VerifySecurity-Monitor-Rtp-00003 + [Tags] VerifyMonitorRtp00003 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"1.1.1.6","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${addpolicySubId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_rtp_policyId2} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${monitor_rtp_policyId2}]} + +VerifySecurity-Monitor-Rtp-00005 + [Tags] VerifyMonitorRtp00005 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"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 ${monitor_rtp_objectId2} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_rtp_policyId4} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + Comment 删除对象 + ${objectids} Create List [${monitor_rtp_objectId2}] + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${monitor_rtp_policyId4}]} + +VerifySecurity-Monitor-Rtp-00006 + [Tags] VerifyMonitorRtp00006 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${monitor_rtp_objectId3} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_rtp_policyId5} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + Comment 删除对象 + ${objectids} Create List [${monitor_rtp_objectId3}] + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${monitor_rtp_policyId5}]} + +VerifySecurity-Monitor-Rtp-00008 + [Tags] VerifyMonitorRtp00008 #新增策略验证 #创建attributes中的字典 ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"1.1.1.1","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} - ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"${testClentIP3}","port":"50000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"${testClentIP2}","port":"60000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} # 合成attributes字典集 ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${verifySession} Create Dictionary attributes=${attributes} @@ -271,8 +623,8 @@ VerifySecurity-Allow-Rtp-000010 log ${verifyList} ${rescode} ${resData} VerifyPolicies ${verifyList} # 打印检查结果 - ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId} - # ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId} + ${objectid_verify} Set Variable ${monitor_rtp_objectId5} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_rtp_policyId7} # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 log 1111111111111111${objectid_verify} ${testType} Evaluate type($objectid_verify) @@ -280,8 +632,41 @@ VerifySecurity-Allow-Rtp-000010 log 222222222222222${resData} sleep 5 ${ok} VerifyProxy ${resData} ${objectid_verify} - # # ${ok} VerifyProxy ${objectids} ${resData} Should Be Equal As Strings ${ok} true + Comment 删除对象 + ${objectids} Create List [${monitor_rtp_objectId5}] + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${monitor_rtp_policyId7}]} +VerifySecurity-Monitor-Rtp-00009 + [Tags] VerifyMonitorRtp00009 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"2222","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} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${monitor_rtp_objectId6} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_rtp_policyId8} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + Comment 删除对象 + ${objectids} Create List [${monitor_rtp_objectId6}] + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${monitor_rtp_policyId8}]} + \ No newline at end of file diff --git a/01-TestCase/tsg_bfapi/setting/Verify/VerifySecurity_sip.robot b/01-TestCase/tsg_bfapi/setting/Verify/VerifySecurity_sip.robot index fc0afbe..7de65c4 100644 --- a/01-TestCase/tsg_bfapi/setting/Verify/VerifySecurity_sip.robot +++ b/01-TestCase/tsg_bfapi/setting/Verify/VerifySecurity_sip.robot @@ -34,40 +34,7 @@ ${policyIds} ${EMPTY} ${objectids} ${EMPTY} *** Test Cases *** -VerifySecurity--Allow-SIP-example - [Tags] VerifyAllowSipexample - log ${intid} - #新增策略验证 - #创建attributes中的字典 - ${sni} Create Dictionary attributeType=string attributeName=sni appId=126 appName=ssl protocol=ssl attributeValue={"string": "verifytest"} - ${san} Create Dictionary attributeType=string attributeName=san appId=126 appName=ssl protocol=ssl attributeValue={"string": "verify.com"} - ${cn} Create Dictionary attributeType=string attributeName=cn appId=126 appName=ssl protocol=ssl attributeValue={"string": "verifytest.com"} - ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "126"} - ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test3"} - ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"192.168.50.3","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} - ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} - # 合成attributes字典集 - ${attributes} Create List ${sni} ${san} ${cn} ${app_id} ${subscriberid} ${ipsource} ${ipdestination} - ${verifySession} Create Dictionary attributes=${attributes} - ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} - log ${verifyList} - ${rescode} ${resData} VerifyPolicies ${verifyList} - # 打印检查结果 - # 将 策略id 加入对象 id - ${objectid_verify} Catenate SEPARATOR=, ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} - ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId} - # ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId} - # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 - log 1111111111111111${objectid_verify} - ${testType} Evaluate type($objectid_verify) - ${testType} Evaluate type($resData) - log 222222222222222${resData} - sleep 5 - ${ok} VerifyProxy ${resData} ${objectid_verify} - # # ${ok} VerifyProxy ${objectids} ${resData} - Should Be Equal As Strings ${ok} true - -VerifySecurity--Allow-SIP-00001_To_003 +VerifySecurity--Allow-SIP-00001_To_000010 [Tags] VerifyAllowSip0001_to_0003 log ${intid} #新增策略验证1 @@ -83,13 +50,13 @@ VerifySecurity--Allow-SIP-00001_To_003 log ${verifyList} ${rescode} ${resData} VerifyPolicies ${verifyList} # 打印检查结果 - ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId} - # ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId} + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId} # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 - log 1111111111111111${objectid_verify} + log ${objectid_verify} ${testType} Evaluate type($objectid_verify) ${testType} Evaluate type($resData) - log 222222222222222${resData} + log ${resData} sleep 5 ${ok} VerifyProxy ${resData} ${objectid_verify} # # ${ok} VerifyProxy ${objectids} ${resData} @@ -108,13 +75,13 @@ VerifySecurity--Allow-SIP-00001_To_003 log ${verifyList} ${rescode} ${resData} VerifyPolicies ${verifyList} # 打印检查结果 - ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId} - # ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId} + ${objectid_verify} Set Variable ${allow_sip_objectId17} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId} # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 - log 1111111111111111${objectid_verify} + log ${objectid_verify} ${testType} Evaluate type($objectid_verify) ${testType} Evaluate type($resData) - log 222222222222222${resData} + log ${resData} sleep 5 ${ok} VerifyProxy ${resData} ${objectid_verify} # # ${ok} VerifyProxy ${objectids} ${resData} @@ -133,13 +100,13 @@ VerifySecurity--Allow-SIP-00001_To_003 log ${verifyList} ${rescode} ${resData} VerifyPolicies ${verifyList} # 打印检查结果 - ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId} - # ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId} + ${objectid_verify} Set Variable ${allow_sip_objectId18} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId} # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 - log 1111111111111111${objectid_verify} + log ${objectid_verify} ${testType} Evaluate type($objectid_verify) ${testType} Evaluate type($resData) - log 222222222222222${resData} + log ${resData} sleep 5 ${ok} VerifyProxy ${resData} ${objectid_verify} # # ${ok} VerifyProxy ${objectids} ${resData} @@ -158,13 +125,13 @@ VerifySecurity--Allow-SIP-00001_To_003 log ${verifyList} ${rescode} ${resData} VerifyPolicies ${verifyList} # 打印检查结果 - ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId} - # ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId} + ${objectid_verify} Set Variable ${allow_sip_objectId19} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId} # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 - log 1111111111111111${objectid_verify} + log ${objectid_verify} ${testType} Evaluate type($objectid_verify) ${testType} Evaluate type($resData) - log 222222222222222${resData} + log ${resData} sleep 5 ${ok} VerifyProxy ${resData} ${objectid_verify} # # ${ok} VerifyProxy ${objectids} ${resData} @@ -174,7 +141,7 @@ VerifySecurity--Allow-SIP-00001_To_003 #创建attributes中的字典 ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} - ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP1}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${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} @@ -183,17 +150,18 @@ VerifySecurity--Allow-SIP-00001_To_003 log ${verifyList} ${rescode} ${resData} VerifyPolicies ${verifyList} # 打印检查结果 - ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId} - # ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId} + ${objectid_verify} Set Variable ${allow_sip_objectId20} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId1} # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 - log 1111111111111111${objectid_verify} + log ${objectid_verify} ${testType} Evaluate type($objectid_verify) ${testType} Evaluate type($resData) - log 222222222222222${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"} @@ -207,13 +175,13 @@ VerifySecurity--Allow-SIP-00001_To_003 log ${verifyList} ${rescode} ${resData} VerifyPolicies ${verifyList} # 打印检查结果 - ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId} - # ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId} + ${objectid_verify} Set Variable ${allow_sip_objectId21} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId1} # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 - log 1111111111111111${objectid_verify} + log ${objectid_verify} ${testType} Evaluate type($objectid_verify) ${testType} Evaluate type($resData) - log 222222222222222${resData} + log ${resData} sleep 5 ${ok} VerifyProxy ${resData} ${objectid_verify} # # ${ok} VerifyProxy ${objectids} ${resData} @@ -232,13 +200,13 @@ VerifySecurity--Allow-SIP-00001_To_003 log ${verifyList} ${rescode} ${resData} VerifyPolicies ${verifyList} # 打印检查结果 - ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId} - # ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId} + ${objectid_verify} Set Variable ${allow_sip_objectId22} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId1} # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 - log 1111111111111111${objectid_verify} + log ${objectid_verify} ${testType} Evaluate type($objectid_verify) ${testType} Evaluate type($resData) - log 222222222222222${resData} + log ${resData} sleep 5 ${ok} VerifyProxy ${resData} ${objectid_verify} # # ${ok} VerifyProxy ${objectids} ${resData} @@ -257,20 +225,50 @@ VerifySecurity--Allow-SIP-00001_To_003 log ${verifyList} ${rescode} ${resData} VerifyPolicies ${verifyList} # 打印检查结果 - ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId} - # ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId} + ${objectid_verify} Set Variable ${allow_sip_objectId23} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId1} # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 - log 1111111111111111${objectid_verify} + log ${objectid_verify} ${testType} Evaluate type($objectid_verify) ${testType} Evaluate type($resData) - log 222222222222222${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--Allow-SIP-000011and000012 +VerifySecurity--Allow-SIP-000011 [Tags] Verify #新增策略验证1 #创建attributes中的字典 @@ -280,23 +278,24 @@ VerifySecurity--Allow-SIP-000011and000012 ${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} + ${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} Catenate SEPARATOR=, ${objectid_verify} ${policyId} - # ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId} + ${objectid_verify} Set Variable ${allow_sip_objectId8} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId10} # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 - log 1111111111111111${objectid_verify} + log ${objectid_verify} ${testType} Evaluate type($objectid_verify) ${testType} Evaluate type($resData) - log 222222222222222${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"} @@ -305,23 +304,24 @@ VerifySecurity--Allow-SIP-000011and000012 ${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} + ${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} Catenate SEPARATOR=, ${objectid_verify} ${policyId} - # ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId} + ${objectid_verify} Set Variable ${allow_sip_objectId8} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId10} # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 - log 1111111111111111${objectid_verify} + log ${objectid_verify} ${testType} Evaluate type($objectid_verify) ${testType} Evaluate type($resData) - log 222222222222222${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"} @@ -330,26 +330,348 @@ VerifySecurity--Allow-SIP-000011and000012 ${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--Allow-SIP-000012 + [Tags] Verify + #新增策略验证1 + #创建attributes中的字典 + ${to} Create Dictionary attributeType=string attributeName=to 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} ${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 + #新增策略验证2 + #创建attributes中的字典 + ${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"} + ${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 ${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} Catenate SEPARATOR=, ${objectid_verify} ${policyId} - # ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId} + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_sip_policyId} # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 - log 1111111111111111${objectid_verify} + log ${objectid_verify} ${testType} Evaluate type($objectid_verify) ${testType} Evaluate type($resData) - log 222222222222222${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"} + ${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 ${deny_sip_objectId2} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_sip_policyId4} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + Comment 删除对象 + ${objectids} Create List [${deny_sip_objectId2}] + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_sip_policyId4}]} + +VerifySecurity--Deny-SIP-00005 + #新增策略验证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中的字典 - ${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":"${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"} @@ -361,99 +683,463 @@ VerifySecurity--Allow-SIP-000011and000012 log ${verifyList} ${rescode} ${resData} VerifyPolicies ${verifyList} # 打印检查结果 - ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId} - # ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId} + ${objectid_verify} Set Variable ${allow_sip_objectId20} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId1} # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 - log 1111111111111111${objectid_verify} + log ${objectid_verify} ${testType} Evaluate type($objectid_verify) ${testType} Evaluate type($resData) - log 222222222222222${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--Allow-SIP-000013and00014 - [Tags] Verify +VerifySecurity--Deny-SIP-000011 #新增策略验证1 #创建attributes中的字典 - ${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "wx7051406391"} + ${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":"${testClentIP2}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${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} + ${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} Catenate SEPARATOR=, ${objectid_verify} ${policyId} - # ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId} + ${objectid_verify} Set Variable ${allow_sip_objectId8} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId10} # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 - log 1111111111111111${objectid_verify} + log ${objectid_verify} ${testType} Evaluate type($objectid_verify) ${testType} Evaluate type($resData) - log 222222222222222${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": "wx7053123121231"} + ${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":"${testClentIP2}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${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} + ${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} Catenate SEPARATOR=, ${objectid_verify} ${policyId} - # ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId} + ${objectid_verify} Set Variable ${allow_sip_objectId8} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId10} # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 - log 1111111111111111${objectid_verify} + log ${objectid_verify} ${testType} Evaluate type($objectid_verify) ${testType} Evaluate type($resData) - log 222222222222222${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": "51406afswr"} + ${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":"${testClentIP2}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${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} + ${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} Catenate SEPARATOR=, ${objectid_verify} ${policyId} - # ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId} + ${objectid_verify} Set Variable ${allow_sip_objectId8} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId10} # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 - log 1111111111111111${objectid_verify} + log ${objectid_verify} ${testType} Evaluate type($objectid_verify) ${testType} Evaluate type($resData) - log 222222222222222${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": "afsfsfsf51406391"} - ${to} + ${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"} @@ -465,19 +1151,303 @@ VerifySecurity--Allow-SIP-000013and00014 log ${verifyList} ${rescode} ${resData} VerifyPolicies ${verifyList} # 打印检查结果 - ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId} - # ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId} + ${objectid_verify} Set Variable ${allow_sip_objectId21} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId1} # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 - log 1111111111111111${objectid_verify} + log ${objectid_verify} ${testType} Evaluate type($objectid_verify) ${testType} Evaluate type($resData) - log 222222222222222${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--Allow-SIP-000016 - [Tags] Verify +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}]} \ No newline at end of file