33 lines
2.0 KiB
Plaintext
33 lines
2.0 KiB
Plaintext
*** Settings ***
|
|
Force Tags tsg_adc_wp adc_api security_policy
|
|
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_adc/FileOperation.robot
|
|
Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot
|
|
|
|
*** Test Cases ***
|
|
SecurityPolicy-Allow-Http-00001
|
|
[Tags] fqdn
|
|
Comment 创建fqdn
|
|
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*clintonairport.com
|
|
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
|
Comment 创建安全策略
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-Http-00001 policyType=tsg_security policyDesc=autotest action=allow userRegion={"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=2
|
|
log ${policyDict}
|
|
${rescode} ${policyId} AddPolicies 1 ${policyDict} v2
|
|
insert_policyId_to_file1 allow_http_objectId ${objectId}
|
|
insert_policyId_to_file1 allow_http_policyId ${policyId}
|
|
|
|
SecurityPolicy-Allow-Http-00002
|
|
[Tags] cat
|
|
Comment 创建fqdn
|
|
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=$www.airpano.com
|
|
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
|
Comment 创建安全策略
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-Http-00002 policyType=tsg_security policyDesc=autotest action=allow userRegion={"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=2
|
|
log ${policyDict}
|
|
${rescode} ${policyId} AddPolicies 1 ${policyDict} v2
|
|
insert_policyId_to_file1 allow_http_objectId ${objectId}
|
|
insert_policyId_to_file1 allow_http_policyId ${policyId} |