自建环境用例
This commit is contained in:
@@ -7,6 +7,7 @@ Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot
|
||||
Resource ../../../03-Variable/PolicyObjectDefault.txt
|
||||
Resource ../../../02-Keyword/tsg_common/StmpHandle.robot
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
Library Custometest
|
||||
Library json
|
||||
|
||||
@@ -17,8 +18,10 @@ ${url} /policy/profile/responsepages
|
||||
${profiledId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
SecurityPolicy-Deny-AllProtol-00001
|
||||
[Tags] Deny
|
||||
SelfServerSecurityPolicy-Deny-AllProtol-00001
|
||||
[Tags] securitypolciy deny allprotol selfserver
|
||||
|
||||
${caseName} set variable SelfServerSecurityPolicy-Deny-AllProtol-00001
|
||||
# 创建对象-IP
|
||||
# addItemList全参数:(为方便说明,将参数值拆分为几部分,其实际值为单条无空格/回车字符串,每部分内代表的各参数不可跳跃。)
|
||||
# [addrType]|[protocol]|[direction]|[isSession]# 第一部分(可省略)
|
||||
@@ -28,12 +31,12 @@ SecurityPolicy-Deny-AllProtol-00001
|
||||
# ...
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary
|
||||
... objectType=${Default_ObjectType}
|
||||
... objectType=ip
|
||||
... isValid=${Default_IsValid}
|
||||
... objectSubType=${Default_ObjectSubType}
|
||||
... isInitialize=${Default_IsInitialize}
|
||||
... isExclusion=${Default_IsExclusion}
|
||||
... objectName=${Default_ObjectName}
|
||||
... objectName=${caseName}_IPobject
|
||||
... objectDesc=${Default_ObjectDesc}
|
||||
... subObjectIds=${Default_SubObjectIds}
|
||||
... addItemList=CIDR|192.168.100.5|32|0/0&${Default_AddItem_ServerIpFormat}|${Default_AddItem_ServerIp1}|${Default_AddItem_ServerIp2}|${Default_AddItem_ServerPort}|${Default_AddItem_IsInitialize}|${Default_AddItem_ItemName}|${Default_AddItem_ItemDesc}
|
||||
@@ -42,10 +45,10 @@ SecurityPolicy-Deny-AllProtol-00001
|
||||
|
||||
Comment 创建安全策略,针对所有协议,相当于BlackIP
|
||||
${policyDict} Create Dictionary
|
||||
... policyName=${Default_PolicyName}
|
||||
... policyType=${Default_PolicyType}
|
||||
... policyName=${caseName}_IPobject
|
||||
... policyType=${tsg_security}
|
||||
... policyDesc=${Default_PolicyDesc}
|
||||
... action=${Default_Action}
|
||||
... action=deny
|
||||
... effectiveRange=${Default_EffectiveRange}
|
||||
... userRegion=${Default_UserRegion}
|
||||
... referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR
|
||||
@@ -56,7 +59,7 @@ SecurityPolicy-Deny-AllProtol-00001
|
||||
... scheduleId=${Default_ScheduleId}
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
${s} Convert to String ${policyId}
|
||||
${policyId} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
|
||||
|
||||
Comment 功能端验证HTTP验证
|
||||
Reference in New Issue
Block a user