diff options
| author | 董晓燕 <[email protected]> | 2021-06-03 09:55:45 +0000 |
|---|---|---|
| committer | 董晓燕 <[email protected]> | 2021-06-03 09:55:45 +0000 |
| commit | ac68e65f508799a0e555a240ae374d313a0a8d75 (patch) | |
| tree | 2a339bbd8acd65e2fb235159cc9c5303ae5725b7 /case/security/dns | |
| parent | 2f39b56d617e5fba2b8d73d81cd5e6d894f85352 (diff) | |
| parent | 4667c668725ff7cb673c637a297c67283876d4d4 (diff) | |
Develop
See merge request dongxiaoyan/gap_tsg_api!4
Diffstat (limited to 'case/security/dns')
| -rw-r--r-- | case/security/dns/deny_dns_test.robot | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/case/security/dns/deny_dns_test.robot b/case/security/dns/deny_dns_test.robot new file mode 100644 index 0000000..2cd7c2a --- /dev/null +++ b/case/security/dns/deny_dns_test.robot @@ -0,0 +1,36 @@ +*** Settings ***
+Force Tags api objects ip
+Library OperatingSystem
+Library Selenium2Library
+Resource ../../../keyword/objects/object.robot
+Resource ../../../keyword/policys/policy.robot
+Resource ../../../keyword/policys/process_policy_body.robot
+Resource ../../../keyword/common/file_operation.robot
+
+*** Variables ***
+${policyIds} ${EMPTY}
+${objectids} ${EMPTY}
+
+*** Test Cases ***
+
+security_policy_allow_ssl
+ [Tags] fqdn完整匹配 update policy:ip geo
+ Comment 创建fqdn
+ ${addItemList1} Create Dictionary keywordArray=$homebank.kz isHexbin=${0}
+ ${addItemLists} Create list ${addItemList1}
+ ${objectDict} Create Dictionary objectType=fqdn objectSubType=fqdn isValid=${1} addItemList=${addItemLists}
+ ${rescode} ${objectId} AddObjects ${1} ${objectDict}
+ Comment 创建ip geo
+ ${addItemList1} Create Dictionary keywordArray=XXG地区.*
+ ${addItemLists} Create list ${addItemList1}
+ ${objectDict} Create Dictionary objectType=ip objectSubType=geo_location isValid=${1} addItemList=${addItemLists}
+ ${rescode} ${objectId1} AddObjects ${1} ${objectDict}
+ Comment 创建安全策略
+ ${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-Ssl-00001 policyType=tsg_security policyDesc=autotest action=allow userRegion={"protocol":"SSL"} filterList=${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
+ log ${policyDict}
+ ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2
+ ${policyId} GetPids ${policyId}
+ ${policyId} Set Variable ${policyId}[0]
+ InsertObjectIdToFile allow_ssl_objectId ${objectId}
+ InsertObjectIdToFile allow_ssl_objectId2 ${objectId1}
+ InsertObjectIdToFile allow_ssl_policyId ${policyId}
\ No newline at end of file |
