69 lines
5.4 KiB
Plaintext
69 lines
5.4 KiB
Plaintext
*** Settings ***
|
|
Library Selenium2Library
|
|
Resource ../objects/NewObjectPages.robot
|
|
Resource ../objects/NewObject.robot
|
|
Resource ../Menu.robot
|
|
Resource ../../../03-Variable/PolicyObjectDefault.txt
|
|
Resource ../../../02-Keyword/tsg_ui/policy/UIPolicy.robot
|
|
|
|
*** Test Cases ***
|
|
Test-UIAddPolicies
|
|
# #新建对象fqdn
|
|
# Comment 新建对象fqdn
|
|
# CreatePage FQDN single zdhfqdn keywordtext=*www.baidu.com
|
|
# #新建对象url
|
|
# Comment 新建对象url
|
|
# CreatePage URL single zdhurl keywordtext=*.com
|
|
# #新建Request Header
|
|
# Comment Request Header
|
|
# #新建cookie
|
|
# CreatePage HTTPSignature single zdhreqck reqrestype=req reqresheader=ck keywordtext=1234@#%
|
|
# #新建ua
|
|
# CreatePage HTTPSignature single zdhrequa reqrestype=req reqresheader=ua keywordtext=*скрипцияк
|
|
# #新建Response Header
|
|
# Comment Response Header
|
|
# #新建set cookie
|
|
# CreatePage HTTPSignature single zdhressck reqrestype=res reqresheader=sck keywordtext=1234@#%
|
|
# #新建ct
|
|
# CreatePage HTTPSignature single zdhresct reqrestype=res reqresheader=ct keywordtext=text*
|
|
# #新建Request Content
|
|
# Comment Request Content
|
|
# #新建Request Content
|
|
# CreatePage Key single zdhreqcontent keywordtext=*pppp
|
|
${hostname} create list zdhfqdn
|
|
${urlname} create list zdhurl
|
|
${RequestHeadername} create list zdhreqck zdhrequa
|
|
${ResponseHeadername} create list zdhressck zdhresct
|
|
${RequestContentname} create list zdhreqcontent
|
|
${filter} create list Host URL Request Header Response Header Request Content
|
|
${policyInfo} Create Dictionary policyType=Security Policy policyName=${TEST NAME} policyAction=deny policySubAction=Drop ApplicationSearch=HTTP policyLogSession=1 policyEnabled=1
|
|
${sip1} Create Dictionary sordtype=Source type1=Ip CreateOrSearch=Create Add=Address name=${TEST NAME}_IP1 ipclienttext1=192.168.40.11-192.168.40.110 port=1-65535
|
|
${ip_name} create list ${TEST NAME}_IP1
|
|
${sip2} Create Dictionary sordtype=Source type1=Ip CreateOrSearch=Create Add=Group name=${TEST NAME}_IPGroup1 object_name=${ip_name}
|
|
${Country} create list Botswana
|
|
${City} create list Dekar
|
|
${sgeo1} Create Dictionary sordtype=Source type1=Geography CreateOrSearch=Create Add=Address name=${TEST NAME}_Geo1 Country=${Country} City=${City}
|
|
${sgeo_name} create list ${TEST NAME}_Geo1
|
|
${sgeo2} Create Dictionary sordtype=Source type1=Geography CreateOrSearch=Create Add=Group name=${TEST NAME}_GeoGroup1 object_name=${sgeo_name}
|
|
${slearn1} Create Dictionary sordtype=Source type1=IPLearning CreateOrSearch=Create Add=Address name=${TEST NAME}_Learn1 fqdn=*www.baidu.com Protocols1=HTTP Degree=2Degrees limits=10000 numbers=1 times=10000
|
|
${slearn2} Create Dictionary sordtype=Source type1=IPLearning CreateOrSearch=Create Add=Address name=${TEST NAME}_Learn2 fqdn=*www.baidu.com Protocols1=HTTPSSL Degree=1Degrees limits=10000 numbers=1 times=72
|
|
${ssub1} Create Dictionary sordtype=Source type1=SUBID CreateOrSearch=Create Add=Address name=${TEST NAME}_Subid1 keywordtext=$test25
|
|
${sub_name} create list ${TEST NAME}_Subid1
|
|
${ssub2} Create Dictionary sordtype=Source type1=SUBID CreateOrSearch=Create Add=Group name=${TEST NAME}_Subid2 object_name=${sub_name}
|
|
#${sourceAddIpList} Create List ${sip1} ${sip2} ${slearn1} ${slearn2} ${ssub1} ${ssub2} ${sgeo1} ${sgeo2}
|
|
${sourceAddIpList} Create List ${sgeo1} ${sgeo2}
|
|
${sourceInfo} Create Dictionary sourceAddIpList=${sourceAddIpList}
|
|
${ip_name1} create list ${TEST NAME}_IP1 ${TEST NAME}_IPGroup1
|
|
${sgeo_name1} create list ${TEST NAME}_Geo1 ${TEST NAME}_GeoGroup1
|
|
${slearn_name1} create list ${TEST NAME}_Learn1 ${TEST NAME}_Learn2
|
|
${sub_name1} create list ${TEST NAME}_Subid1 ${TEST NAME}_Subid2
|
|
${dip1} Create Dictionary sordtype=Destination type1=Ip CreateOrSearch=Search object_name=${ip_name1}
|
|
${dsgeo} Create Dictionary sordtype=Destination type1=Geography CreateOrSearch=Search object_name=${sgeo_name1}
|
|
${dslearn} Create Dictionary sordtype=Destination type1=IPLearning CreateOrSearch=Search object_name=${slearn_name1}
|
|
${destinationAddIpList} Create List ${dip1} ${dsgeo} ${dslearn}
|
|
${destinationInfo} Create Dictionary destinationAddIpList=${destinationAddIpList}
|
|
${filterInfo} Create Dictionary Filter=${filter} Hostname=${hostname} URLname=${urlname} Request Headername=${RequestHeadername} Response Headername=${ResponseHeadername}
|
|
... Request Contentname=${RequestContentname}
|
|
#UIAddPolicies ${policyInfo} sourceInfo=${sourceInfo} destinationInfo=${destinationInfo} filterInfo=${filterInfo}
|
|
UIAddPolicies ${policyInfo} destinationInfo=${destinationInfo} filterInfo=${filterInfo}
|