a步骤调整取策略id逻辑,使策略可以被删除

This commit is contained in:
hebingning
2021-02-01 19:16:09 +08:00
parent aeb8c8e5ca
commit 066af7d9d7
10 changed files with 526 additions and 89 deletions

View File

@@ -18,21 +18,26 @@ SecurityPolicy-Allow-Http-00001
${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=${HTTP_ID}
log ${policyDict}
${rescode} ${policyId} AddPolicies 1 ${policyDict} v2
${policyId} Get-Pids ${policyId}
${policyId} Set Variable ${policyId}[0]
insert_policyId_to_file1 allow_http_objectId ${objectId}
insert_policyId_to_file1 allow_http_policyId ${policyId}
SecurityPolicy-Allow-Http-00002
[Tags] cat完整匹配
[Tags] cat
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=$www.airpano.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
# ${objectDict} Create Dictionary objectType=fqdn 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=${HTTP_ID}
${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-Http-00002 policyType=tsg_security policyDesc=autotest action=allow userRegion={"protocol":"HTTP"} filterList=109|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} ${policyId} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 allow_http_objectId1 ${objectId}
${policyId} Get-Pids ${policyId}
${policyId} Set Variable ${policyId}[0]
#insert_policyId_to_file1 allow_http_objectId1 ${objectId}
insert_policyId_to_file1 allow_http_policyId1 ${policyId}
#SecurityPolicy-Allow-Http-00003
# [Tags] cat完整匹配
# Comment 创建fqdn