提交tcp策略新建策略用例示例和修改tcp策略新增删除关键字(已验证通过)
This commit is contained in:
@@ -6,7 +6,7 @@ Resource ../objects/NewObject.robot
|
||||
|
||||
*** Keywords ***
|
||||
UIAddProxyTCPOptions
|
||||
[Arguments] ${TCPProxy} ${TCPClientDict} ${TCPServerDict} ${SourceInfo}=null ${DestinationInfo}=null
|
||||
[Arguments] ${TCPProxy} ${TCPClientDict} ${TCPServerDict} ${SourceInfo}=null ${DestinationInfo}=null ${FilterInfo}=null
|
||||
${return} ${Tcpname} Run Keyword And Ignore Error Get From Dictionary ${TCPProxy} Tcpname
|
||||
${Tcpname} Run Keyword If "${return}"=="FAIL" or "${Tcpname}}"=="${EMPTY}" set variable null
|
||||
... ELSE set variable ${Tcpname}
|
||||
@@ -349,30 +349,7 @@ Create-Destination
|
||||
... AND sleep ${sleep}
|
||||
... AND DestinationIPCreateOrSearch ${typepath} ${CreateOrSearch} ${Add} ${Type1} ${Name} ${ObjectName} ${Ipclienttext1} ${Port} ${Country} ${City} ${Fqdn} ${Protocols1} ${Degree} ${Times} ${Numbers} ${Limits}
|
||||
|
||||
SourceIPCreateOrSearch
|
||||
[Arguments] ${PolicyType} ${CreateOrSearch} ${Add} ${Ip_type} ${Name} ${ObjectName} ${Ipclienttext1}
|
||||
... ${Port} ${Country} ${City} ${Fqdn} ${Protocols1} ${Degree} ${Times} ${Numbers} ${Limits}
|
||||
[Documentation] 调用次关键字前需要添加必填参数:
|
||||
... ${CreateOrSearch}:填入Create或者Search
|
||||
... ${Add}:填入Address或Group
|
||||
... ${Name}:名称
|
||||
... ${Ip_type}:填入Ip或者Geography或者IPLearning
|
||||
... ${Ipclienttext1}:填入IPV4或6的值或range的ip段
|
||||
... ${Port}:填入端口
|
||||
... ${Country}:列表形式,列表中是国家名字
|
||||
... ${City}:列表形式,列表中是城市名字
|
||||
... ${Protocols1}:填入HTTP或SSL或HTTPSSL
|
||||
... ${Degree}:填入1Degree或2Degree
|
||||
... ${Times}:填入小时数,例如1或2
|
||||
... ${Numbers}:填入数值,例如1或10000
|
||||
... ${Limits}:填入数值,例如1或10000
|
||||
... ${ObjectName}:列表形式,列表中是对象的名字
|
||||
... 判断是新建ip还是搜索添加ip
|
||||
run keyword if "${CreateOrSearch}"=="Create" run keywords sleep ${sleep}
|
||||
... AND click element id=interceptionadd_proaddaddSource
|
||||
... AND SourceIPAdd ${PolicyType} ${Add} ${Ip_type} ${Name} ${ObjectName} ${Ipclienttext1} ${Port} ${Country} ${City} ${Fqdn} ${Protocols1} ${Degree} ${Times} ${Numbers} ${Limits}
|
||||
... ELSE IF "${CreateOrSearch}"=="Search" run keywords sleep ${sleep}
|
||||
... AND SourceSearch ${PolicyType} ${ObjectName}
|
||||
|
||||
SUBIDCreateOrSearch
|
||||
[Arguments] ${PolicyType} ${CreateOrSearch} ${Add} ${Name} ${Keywordtext} ${ObjectName}
|
||||
[Documentation] 调用次关键字前需要添加必填参数:
|
||||
@@ -675,10 +652,10 @@ DestinationCreate-ok
|
||||
# ... ELSE log 不添加Filter
|
||||
Filter-create
|
||||
[Arguments] ${FilterInfo}
|
||||
${return} ${Filtercreate} Run Keyword And Ignore Error Get From Dictionary ${PolicyInfo} Filtercreate
|
||||
${return} ${Filtercreate} Run Keyword And Ignore Error Get From Dictionary ${FilterInfo} Filtercreate
|
||||
${Filtercreate} Run Keyword If "${return}"=="FAIL" or "${Filtercreate}"=="${EMPTY}" set variable null
|
||||
... ELSE set variable ${Filtercreate}
|
||||
${return} ${SNIname} Run Keyword And Ignore Error Get From Dictionary ${PolicyInfo} SNIname
|
||||
${return} ${SNIname} Run Keyword And Ignore Error Get From Dictionary ${FilterInfo} SNIname
|
||||
${SNIname} Run Keyword If "${return}"=="FAIL" or "${SNIname}"=="${EMPTY}" set variable null
|
||||
... ELSE set variable ${SNIname}
|
||||
FOR ${i} IN @{Filtercreate}
|
||||
@@ -722,12 +699,9 @@ TCP-Bypass-Duplicated-Packet
|
||||
... ELSE log 不开启
|
||||
TCP-Client-side-Parameters
|
||||
[Arguments] ${TCPClientDict}
|
||||
# ... ${Clientelement}=/html/body/div[1]/div/div[3]/div[2]/div/div/div[1]/div[1]/div/div[2]/form/div[9]/div[2]/div[1]
|
||||
# ... ${ClientOverrideMSS}=null ${ClientMSSvalue}=null ${ClientNoDelay}=null ${Clientttlvalue}=null ${ClientKeepalive}=null ${ClientProbeNumber}=null
|
||||
# ... ${ClientIdleTime}=null ${ClientInterval}=null ${ClientUserTimeout}=null
|
||||
${return} ${Clientelement} Run Keyword And Ignore Error Get From Dictionary ${TCPClientDict} Clientelement
|
||||
${Clientelement} Run Keyword If "${return}"=="FAIL" or "${Clientelement}"=="${EMPTY}" set variable null
|
||||
... ELSE set variable ${Clientelement}
|
||||
|
||||
${Clientelement} set variable /html/body/div[1]/div/div[3]/div[2]/div/div/div[1]/div[1]/div/div[2]/form/div[9]/div[2]/div[1]
|
||||
|
||||
${return} ${ClientOverrideMSS} Run Keyword And Ignore Error Get From Dictionary ${TCPClientDict} ClientOverrideMSS
|
||||
${ClientOverrideMSS} Run Keyword If "${return}"=="FAIL" or "${ClientOverrideMSS}"=="${EMPTY}" set variable null
|
||||
... ELSE set variable ${ClientOverrideMSS}
|
||||
@@ -797,12 +771,8 @@ TCP-Client-side-Parameters
|
||||
sleep ${sleep}
|
||||
TCP-Server-side-Parameters
|
||||
[Arguments] ${TCPServerDict}
|
||||
# ... ${Serverelement}=/html/body/div[1]/div/div[3]/div[2]/div/div/div[1]/div[1]/div/div[2]/form/div[9]/div[2]/div[2]
|
||||
# ... ${ServerOverrideMSS}=null ${ServerMSSvalue}=null ${ServerNoDelay}=null ${Serverttlvalue}=null ${ServerKeepalive}=null ${ServerProbeNumber}=null
|
||||
# ... ${ServerIdleTime}=null ${ServerInterval}=null ${ServerUserTimeout}=null
|
||||
${return} ${Serverelement} Run Keyword And Ignore Error Get From Dictionary ${TCPServerDict} Serverelement
|
||||
${Serverelement} Run Keyword If "${return}"=="FAIL" or "${Serverelement}"=="${EMPTY}" set variable null
|
||||
... ELSE set variable ${Serverelement}
|
||||
|
||||
${Serverelement} set variable /html/body/div[1]/div/div[3]/div[2]/div/div/div[1]/div[1]/div/div[2]/form/div[9]/div[2]/div[2]
|
||||
|
||||
${return} ${ServerOverrideMSS} Run Keyword And Ignore Error Get From Dictionary ${TCPServerDict} ServerOverrideMSS
|
||||
${ServerOverrideMSS} Run Keyword If "${return}"=="FAIL" or "${ServerOverrideMSS}"=="${EMPTY}" set variable null
|
||||
|
||||
Reference in New Issue
Block a user