添加默认值,避免控制报错影响下面代码结果

This commit is contained in:
dongxiaoyan
2020-04-14 19:25:38 +08:00
parent 8aee95b648
commit 97bf4de593
2 changed files with 26 additions and 2 deletions

View File

@@ -37,13 +37,15 @@ SecurityPolicy-Deny-AllProtol-00001
... policyName=SecurityPolicy-Deny-AllProtol-00001 ... policyName=SecurityPolicy-Deny-AllProtol-00001
... policyType=tsg_security ... policyType=tsg_security
... policyDesc=autotest ... policyDesc=autotest
... userTags=
... action=deny ... action=deny
... effectiveRange=Nursurtan|Transtelecom&Astel,|Astel&Transtelecom ... effectiveRange=${effectiveRange}
... userRegion=method:rst ... userRegion=method:rst
... referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR ... referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR
... isValid=${1} ... isValid=${1}
... appObjectIdArray=2,3,4,5,6 ... appObjectIdArray=2,3,4,5,6
... userTags=${userTags}
... doLog=${2}
... scheduleId=${referenceObject}
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
${policyId} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} ${policyId} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}

View File

@@ -0,0 +1,22 @@
*** Variables ***
#策略
policyName autotest_policy
policyType tsg_security
policyDesc autotest
action deny
effectiveRange Nursurtan|Transtelecom&Astel,|Astel&Transtelecom
userRegion method:rst
referenceObject 1|TSG_SECURITY_DESTINATION_ADDR
isValid ${1}
appObjectIdArray 2,3,4,5,6
userTags 3
doLog 2
scheduleId 7
#对象
objectSubType ${objectSubType}
isValid ${isValid}
isInitialize ${isInitialize}
isExclusion ${isExclusion}
objectName ${objectName}
objectDesc ${objectDesc}
subObjectIds ${subObjectIds}