*** Settings *** Force Tags tsg_adc_wp tsg_bf_api Trusted_Certificate_Authorities Library String Library OperatingSystem Library Selenium2Library Library Collections Resource ../../../02-Keyword/tsg_bfapi/Common.robot Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywords.robot Resource ../../../03-Variable/BifangApiVariable.txt Library OperatingSystem Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot Resource ../../../03-Variable/AllFlowCaseVariable.txt Resource ../../../03-Variable/Policy_Objects_Module.txt Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot Resource ../../../02-Keyword/tsg_bfapi/policy_object/Object.robot Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot Resource ../../../02-Keyword/tsg_bfapi/Common.robot Library json Library DateTime Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot Library ../../../04-CustomLibrary/Library/VerifyPolicy.py Resource ../../../05-Other/AllFlowCaseVariable.txt *** Test Cases *** SecurityPolicy-Deny-Mail-00001 # # 新增策略验证 # 创建attributes中的字典 ${content_id} Create Dictionary attributeType=string attributeName=content appId=110 appName=mail protocol=mail attributeValue={"string": "Простопорно"} ${from_id} Create Dictionary attributeType=string attributeName=from appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning2021@163.com"} ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} # 合成attributes字典集 ${attributes} Create List ${content_id} ${from_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} ${verifySession} Create Dictionary attributes=${attributes} ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} ${rescode} ${resData} VerifyPolicies ${verifyList} sleep 10 # 打印检查结果 # 将 策略id 加入对象 id ${objectid_verify} set variable ${testClentIpId} ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId33} ${deny_mail_policyId} #sleep 5 # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 ${ok} VerifyProxy ${resData} ${objectid_verify} # # ${ok} VerifyProxy ${objectids} ${resData} Should Be Equal As Strings ${ok} true SecurityPolicy-Deny-Mail-00002 # # 新增策略验证 # 创建attributes中的字典 ${att_content_id} Create Dictionary attributeType=string attributeName=att_content appId=110 appName=mail protocol=mail attributeValue={"string": "姬巍川测试文件内容Простопорно"} ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} # 合成attributes字典集 ${attributes} Create List ${att_content_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} ${verifySession} Create Dictionary attributes=${attributes} ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} ${rescode} ${resData} VerifyPolicies ${verifyList} sleep 10 # 打印检查结果 # 将 策略id 加入对象 id ${objectid_verify} set variable ${testClentIpId} ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId34} ${deny_mail_policyId1} #sleep 5 # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 ${ok} VerifyProxy ${resData} ${objectid_verify} # # ${ok} VerifyProxy ${objectids} ${resData} Should Be Equal As Strings ${ok} true SecurityPolicy-Deny-Mail-00003 # # 新增策略验证 # 创建attributes中的字典 ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "ПОРНОВИДЕО"} ${from_id} Create Dictionary attributeType=string attributeName=from appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning2021@163.com"} ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} # 合成attributes字典集 ${attributes} Create List ${subject_id} ${from_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} ${verifySession} Create Dictionary attributes=${attributes} ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} ${rescode} ${resData} VerifyPolicies ${verifyList} sleep 10 # 打印检查结果 # 将 策略id 加入对象 id ${objectid_verify} set variable ${testClentIpId} ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId35} ${deny_mail_objectId36} ${deny_mail_policyId2} #sleep 5 # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 ${ok} VerifyProxy ${resData} ${objectid_verify} # # ${ok} VerifyProxy ${objectids} ${resData} Should Be Equal As Strings ${ok} true SecurityPolicy-Deny-Mail-00004 # # 新增策略验证 # 创建attributes中的字典 ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "明天周末"} ${from_id} Create Dictionary attributeType=string attributeName=from appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning2021@163.com"} ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} # 合成attributes字典集 ${attributes} Create List ${subject_id} ${from_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} ${verifySession} Create Dictionary attributes=${attributes} ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} ${rescode} ${resData} VerifyPolicies ${verifyList} sleep 10 # 打印检查结果 # 将 策略id 加入对象 id ${objectid_verify} set variable ${testClentIpId} ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId4} ${deny_mail_objectId5} ${deny_mail_policyId3} #sleep 5 # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 ${ok} VerifyProxy ${resData} ${objectid_verify} # # ${ok} VerifyProxy ${objectids} ${resData} Should Be Equal As Strings ${ok} true SecurityPolicy-Deny-Mail-00005 # # 新增策略验证 # 创建attributes中的字典 ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "1234567890"} ${from_id} Create Dictionary attributeType=string attributeName=from appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning2021@163.com"} ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} # 合成attributes字典集 ${attributes} Create List ${subject_id} ${from_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} ${verifySession} Create Dictionary attributes=${attributes} ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} ${rescode} ${resData} VerifyPolicies ${verifyList} sleep 10 # 打印检查结果 # 将 策略id 加入对象 id ${objectid_verify} set variable ${testClentIpId} ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId6} ${deny_mail_objectId7} ${deny_mail_policyId4} #sleep 5 # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 ${ok} VerifyProxy ${resData} ${objectid_verify} # # ${ok} VerifyProxy ${objectids} ${resData} Should Be Equal As Strings ${ok} true SecurityPolicy-Deny-Mail-00006 # # 新增策略验证 # 创建attributes中的字典 ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "afternoon"} ${from_id} Create Dictionary attributeType=string attributeName=from appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning2021@163.com"} ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} # 合成attributes字典集 ${attributes} Create List ${subject_id} ${from_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} ${verifySession} Create Dictionary attributes=${attributes} ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} ${rescode} ${resData} VerifyPolicies ${verifyList} sleep 10 # 打印检查结果 # 将 策略id 加入对象 id ${objectid_verify} set variable ${testClentIpId} ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId8} ${deny_mail_objectId9} ${deny_mail_policyId5} #sleep 5 # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 ${ok} VerifyProxy ${resData} ${objectid_verify} # # ${ok} VerifyProxy ${objectids} ${resData} Should Be Equal As Strings ${ok} true SecurityPolicy-Deny-Mail-00007 # # 新增策略验证 # 创建attributes中的字典 ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "Смотретьфильмыонлай"} ${to_id} Create Dictionary attributeType=string attributeName=to appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning@geedgenetworks.com"} ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} # 合成attributes字典集 ${attributes} Create List ${subject_id} ${to_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} ${verifySession} Create Dictionary attributes=${attributes} ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} ${rescode} ${resData} VerifyPolicies ${verifyList} sleep 10 # 打印检查结果 # 将 策略id 加入对象 id ${objectid_verify} set variable ${testClentIpId} ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId10} ${deny_mail_objectId11} ${deny_mail_policyId6} #sleep 5 # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 ${ok} VerifyProxy ${resData} ${objectid_verify} # # ${ok} VerifyProxy ${objectids} ${resData} Should Be Equal As Strings ${ok} true SecurityPolicy-Deny-Mail-00008 # # 新增策略验证 # 创建attributes中的字典 ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "zxcvbnm"} ${to_id} Create Dictionary attributeType=string attributeName=to appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning@geedgenetworks.com"} ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} # 合成attributes字典集 ${attributes} Create List ${subject_id} ${to_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} ${verifySession} Create Dictionary attributes=${attributes} ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} ${rescode} ${resData} VerifyPolicies ${verifyList} sleep 10 # 打印检查结果 # 将 策略id 加入对象 id ${objectid_verify} set variable ${testClentIpId} ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId12} ${deny_mail_objectId13} ${deny_mail_policyId7} #sleep 5 # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 ${ok} VerifyProxy ${resData} ${objectid_verify} # # ${ok} VerifyProxy ${objectids} ${resData} Should Be Equal As Strings ${ok} true SecurityPolicy-Deny-Mail-00009 # # 新增策略验证 # 创建attributes中的字典 ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "又是新的一天"} ${to_id} Create Dictionary attributeType=string attributeName=to appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning@geedgenetworks.com"} ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} # 合成attributes字典集 ${attributes} Create List ${subject_id} ${to_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} ${verifySession} Create Dictionary attributes=${attributes} ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} ${rescode} ${resData} VerifyPolicies ${verifyList} sleep 10 # 打印检查结果 # 将 策略id 加入对象 id ${objectid_verify} set variable ${testClentIpId} ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId14} ${deny_mail_objectId15} ${deny_mail_policyId8} #sleep 5 # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 ${ok} VerifyProxy ${resData} ${objectid_verify} # # ${ok} VerifyProxy ${objectids} ${resData} Should Be Equal As Strings ${ok} true SecurityPolicy-Deny-Mail-00010 # # 新增策略验证 # 创建attributes中的字典 ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "tomorrow"} ${to_id} Create Dictionary attributeType=string attributeName=to appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning@geedgenetworks.com"} ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} # 合成attributes字典集 ${attributes} Create List ${subject_id} ${to_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} ${verifySession} Create Dictionary attributes=${attributes} ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} ${rescode} ${resData} VerifyPolicies ${verifyList} sleep 10 # 打印检查结果 # 将 策略id 加入对象 id ${objectid_verify} set variable ${testClentIpId} ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId16} ${deny_mail_objectId17} ${deny_mail_policyId9} #sleep 5 # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 ${ok} VerifyProxy ${resData} ${objectid_verify} # # ${ok} VerifyProxy ${objectids} ${resData} Should Be Equal As Strings ${ok} true SecurityPolicy-Deny-Mail-00011 # # 新增策略验证 # 创建attributes中的字典 ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "邮件发送失败"} ${account_id} Create Dictionary attributeType=string attributeName=account appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning2021@163.com"} ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} # 合成attributes字典集 ${attributes} Create List ${subject_id} ${account_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} ${verifySession} Create Dictionary attributes=${attributes} ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} ${rescode} ${resData} VerifyPolicies ${verifyList} sleep 10 # 打印检查结果 # 将 策略id 加入对象 id ${objectid_verify} set variable ${testClentIpId} ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId18} ${deny_mail_objectId19} ${deny_mail_policyId10} #sleep 5 # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 ${ok} VerifyProxy ${resData} ${objectid_verify} # # ${ok} VerifyProxy ${objectids} ${resData} Should Be Equal As Strings ${ok} true SecurityPolicy-Deny-Mail-00012 # # 新增策略验证 # 创建attributes中的字典 ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "Онлайнфильмывхоро"} ${account_id} Create Dictionary attributeType=string attributeName=account appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning2021@163.com"} ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} # 合成attributes字典集 ${attributes} Create List ${subject_id} ${account_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} ${verifySession} Create Dictionary attributes=${attributes} ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} ${rescode} ${resData} VerifyPolicies ${verifyList} sleep 10 # 打印检查结果 # 将 策略id 加入对象 id ${objectid_verify} set variable ${testClentIpId} ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId20} ${deny_mail_objectId21} ${deny_mail_policyId11} #sleep 5 # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 ${ok} VerifyProxy ${resData} ${objectid_verify} # # ${ok} VerifyProxy ${objectids} ${resData} Should Be Equal As Strings ${ok} true SecurityPolicy-Deny-Mail-00013 # # 新增策略验证 # 创建attributes中的字典 ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "asdfghjkl"} ${account_id} Create Dictionary attributeType=string attributeName=account appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning2021@163.com"} ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} # 合成attributes字典集 ${attributes} Create List ${subject_id} ${account_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} ${verifySession} Create Dictionary attributes=${attributes} ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} ${rescode} ${resData} VerifyPolicies ${verifyList} sleep 10 # 打印检查结果 # 将 策略id 加入对象 id ${objectid_verify} set variable ${testClentIpId} ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId22} ${deny_mail_objectId23} ${deny_mail_policyId12} #sleep 5 # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 ${ok} VerifyProxy ${resData} ${objectid_verify} # # ${ok} VerifyProxy ${objectids} ${resData} Should Be Equal As Strings ${ok} true SecurityPolicy-Deny-Mail-00014 # # 新增策略验证 # 创建attributes中的字典 ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "马上就要下班了"} ${account_id} Create Dictionary attributeType=string attributeName=account appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning2021@163.com"} ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} # 合成attributes字典集 ${attributes} Create List ${subject_id} ${account_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} ${verifySession} Create Dictionary attributes=${attributes} ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} ${rescode} ${resData} VerifyPolicies ${verifyList} sleep 10 # 打印检查结果 # 将 策略id 加入对象 id ${objectid_verify} set variable ${testClentIpId} ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId24} ${deny_mail_objectId25} ${deny_mail_policyId13} #sleep 5 # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 ${ok} VerifyProxy ${resData} ${objectid_verify} # # ${ok} VerifyProxy ${objectids} ${resData} Should Be Equal As Strings ${ok} true SecurityPolicy-Deny-Mail-00015 # # 新增策略验证 # 创建attributes中的字典 ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "人生路远及时行乐"} ${content_id} Create Dictionary attributeType=string attributeName=content appId=110 appName=mail protocol=mail attributeValue={"string": "good"} ${att_content_id} Create Dictionary attributeType=string attributeName=att_content appId=110 appName=mail protocol=mail attributeValue={"string": "Простопорно"} ${account_id} Create Dictionary attributeType=string attributeName=account appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning2021@163.com"} ${from_id} Create Dictionary attributeType=string attributeName=from appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning2021@163.com"} ${to_id} Create Dictionary attributeType=string attributeName=to appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning@geedgenetworks.com"} ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} # 合成attributes字典集 ${attributes} Create List ${subject_id} ${content_id} ${att_content_id} ${from_id} ${to_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} ${account_id} ${verifySession} Create Dictionary attributes=${attributes} ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} ${rescode} ${resData} VerifyPolicies ${verifyList} sleep 10 # 打印检查结果 # 将 策略id 加入对象 id ${objectid_verify} set variable ${testClentIpId} ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId26} ${deny_mail_objectId27} ${deny_mail_objectId28} ${deny_mail_objectId29} ${deny_mail_objectId30} ${deny_mail_objectId31} ${deny_mail_policyId14} #sleep 5 # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 ${ok} VerifyProxy ${resData} ${objectid_verify} # # ${ok} VerifyProxy ${objectids} ${resData} Should Be Equal As Strings ${ok} true