diff --git a/01-TestCase/tsg_adc/multi_step/a_Allow_Allow_120UIAPI.robot b/01-TestCase/tsg_adc/multi_step/a_Allow_Allow_120UIAPI.robot new file mode 100644 index 0000000..9621aed --- /dev/null +++ b/01-TestCase/tsg_adc/multi_step/a_Allow_Allow_120UIAPI.robot @@ -0,0 +1,27 @@ +*** 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-UIAPI + [Tags] uiallow + ${addItemList1} Create Dictionary isSession=endpoint ip=192.168.40.120/32 port=0-0 direction=0 protocol=0 isInitialize=0 + #可以添加多个 + ${addItemLists} Create list ${addItemList1} + #objectList对象 + ${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=${addItemLists} + ${rescode} ${objectId} AddObjects ${1} ${objectDict} + Comment 创建安全策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-120 policyType=tsg_security policyDesc=autotest action=allow destination=${objectId}|TSG_SECURITY_DESTINATION_ADDR userRegion=${EMPTY} isValid=${1} appIdObjects=2,3 + log ${policyDict} + ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 SecurityPolicy-Allow ${objectId} + insert_policyId_to_file1 SecurityPolicy-Allow ${policyId} + + + diff --git a/01-TestCase/tsg_adc/multi_step/a_Allow_Http_Tests.robot b/01-TestCase/tsg_adc/multi_step/a_Allow_Http_Tests.robot index 55c2b0d..1bed08c 100644 --- a/01-TestCase/tsg_adc/multi_step/a_Allow_Http_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/a_Allow_Http_Tests.robot @@ -32,14 +32,14 @@ SecurityPolicy-Allow-Http-00002 insert_policyId_to_file1 allow_http_objectId1 ${objectId} insert_policyId_to_file1 allow_http_policyId1 ${policyId} -SecurityPolicy-Allow-Http-00003 - [Tags] cat完整匹配 - Comment 创建fqdn - ${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=$192.168.40.120 - ${rescode} ${objectId} AddObject2 ${1} ${objectDict} - Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-Http-00003 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_objectId2 ${objectId} - insert_policyId_to_file1 allow_http_policyId2 ${policyId} +#SecurityPolicy-Allow-Http-00003 +# [Tags] cat完整匹配 +# Comment 创建fqdn +# ${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=$192.168.40.120 +# ${rescode} ${objectId} AddObject2 ${1} ${objectDict} +# Comment 创建安全策略 +# ${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-Http-00003 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_objectId2 ${objectId} +# insert_policyId_to_file1 allow_http_policyId2 ${policyId}