2020-08-13 18:38:54 +08:00
|
|
|
*** Settings ***
|
|
|
|
|
Test Teardown DeletePolicyAndObject ${policyIds} ${objectids}
|
|
|
|
|
Force Tags tsg_adc proxy_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_bfapi/ApiRequest.robot
|
|
|
|
|
Resource ../../../03-Variable/AllFlowCaseVariable.txt
|
|
|
|
|
Library String
|
|
|
|
|
Library Custometest
|
|
|
|
|
|
|
|
|
|
*** Variables ***
|
|
|
|
|
${policyIds} ${EMPTY}
|
|
|
|
|
${objectids} ${EMPTY}
|
2020-08-14 18:25:39 +08:00
|
|
|
${url} /v1/policy/profile/responsepages
|
|
|
|
|
${profiledId} ${EMPTY}
|
2020-08-13 18:38:54 +08:00
|
|
|
|
2020-08-14 18:25:39 +08:00
|
|
|
*** Test Cases ***
|
2021-03-10 19:31:05 +08:00
|
|
|
create_PacketCapture_Select_DataCenter
|
2020-08-14 18:25:39 +08:00
|
|
|
# 创建捕包策略
|
|
|
|
|
log 创建捕包策略
|
2021-03-10 19:31:05 +08:00
|
|
|
${PacketCapture} Create Dictionary policyId= policyName=${TEST NAME} addrType=4 protocol=6 clientIp=${testClentIP} clientPort=0-65535 serverIp=0.0.0.0 serverPort=0-65535 maxPacket=10 captureDuration=1
|
|
|
|
|
# ${location} Create List Almaty
|
|
|
|
|
${DataCenter} Create List Almaty
|
2020-08-13 18:38:54 +08:00
|
|
|
# ${isp} Create List transtel tnsplus ktel-mask ktel-bng ktel-mxpe
|
|
|
|
|
log ${PacketCapture}
|
2021-03-10 19:31:05 +08:00
|
|
|
${response_policy_id} ${response_task_id} Add&Edit_PacketCapture ${PacketCapture} ${DataCenter}
|
|
|
|
|
LOG WEQEWEQWEWEWERWERWQERWEQRWERWEQRWQEQWERWEQR
|
2020-08-14 18:25:39 +08:00
|
|
|
LOG 捕包进度查询
|
2021-03-10 19:31:05 +08:00
|
|
|
${progress_response} BaseGetRequestForV2 troubleshooting/packetcapture/log/progress policyId=${response_policy_id} v1
|
|
|
|
|
${response_task_id} Set Variable ${progress_response['data']['list'][0]['taskId']}
|
2020-08-14 18:25:39 +08:00
|
|
|
LOG 捕包任务详情查询
|
2021-03-10 19:31:05 +08:00
|
|
|
${progress_response_task} BaseGetRequestForV2 troubleshooting/packetcapture/log/detail taskId=${response_task_id} v1
|
2020-08-14 18:25:39 +08:00
|
|
|
LOG 捕包设备执行情况查询
|
2021-03-10 19:31:05 +08:00
|
|
|
${progress_response_detail} BaseGetRequestForV2 troubleshooting/packetcapture/log/progress/detail taskId=${response_task_id} v1
|
|
|
|
|
log 删除task
|
|
|
|
|
# ${delete_task_res} BaseGetRequestForV2 troubleshooting/packetcapture/policy taskId=${response_task_id} v1
|
|
|
|
|
${policyid1} Set Variable {"policyIds":[${response_policy_id}]}
|
|
|
|
|
log ${policyid1}
|
|
|
|
|
log 删除policy
|
|
|
|
|
${delete_policy_res} BaseDeleteRequest troubleshooting/packetcapture/policy policyId=${policyid1} v1
|
2020-08-14 18:25:39 +08:00
|
|
|
|
2021-03-10 19:31:05 +08:00
|
|
|
create_PacketCapture_Select_maxPacket
|
|
|
|
|
# 创建捕包策略
|
|
|
|
|
log 创建捕包策略
|
|
|
|
|
${PacketCapture} Create Dictionary policyId= policyName=${TEST NAME} addrType=4 protocol=6 clientIp=${testClentIP} clientPort=0-65535 serverIp=0.0.0.0 serverPort=0-65535 maxPacket=100000 captureDuration=2
|
|
|
|
|
# ${location} Create List Almaty
|
|
|
|
|
${DataCenter} Create List Almaty
|
|
|
|
|
# ${isp} Create List transtel tnsplus ktel-mask ktel-bng ktel-mxpe
|
|
|
|
|
log ${PacketCapture}
|
|
|
|
|
${response_policy_id} ${response_task_id} Add&Edit_PacketCapture ${PacketCapture} ${DataCenter}
|
|
|
|
|
LOG WEQEWEQWEWEWERWERWQERWEQRWERWEQRWQEQWERWEQR
|
|
|
|
|
LOG 捕包进度查询
|
|
|
|
|
${progress_response} BaseGetRequestForV2 troubleshooting/packetcapture/log/progress policyId=${response_policy_id} v1
|
|
|
|
|
# LOG 捕包任务详情查询
|
|
|
|
|
# ${progress_response} BaseGetRequestForV2 troubleshooting/packetcapture/log/detail taskId=${response_task_id} v1
|
|
|
|
|
# LOG 捕包设备执行情况查询
|
|
|
|
|
# ${progress_response} BaseGetRequestForV2 troubleshooting/packetcapture/log/progress/detail taskId=${response_task_id} v1
|
|
|
|
|
# sleep 12
|
|
|
|
|
Comment 修改捕包策略
|
|
|
|
|
${PacketCapture} Create Dictionary policyId=${response_policy_id} policyName=${TEST NAME} addrType=4 protocol=6 clientIp=${testClentIP} clientPort=0-65535 serverIp=0.0.0.0 serverPort=0-65535 maxPacket=100 captureDuration=3
|
|
|
|
|
${DataCenter} Create List Aktau
|
|
|
|
|
log ${PacketCapture}
|
|
|
|
|
${response_policy_id} ${response_task_id} Add&Edit_PacketCapture ${PacketCapture} ${DataCenter}
|
2020-08-14 18:25:39 +08:00
|
|
|
create_PacketCapture_Select_ISP
|
|
|
|
|
# 创建捕包策略
|
|
|
|
|
log 创建捕包策略
|
|
|
|
|
${PacketCapture} Create Dictionary policyId= policyName=zmmtest addrType=4 protocol=6 clientIp=192.168.50.60 clientPort=8080 serverIp=0.0.0.0 serverPort=0 maxPacket=1000 captureDuration=1
|
|
|
|
|
# ${location} Create List Almaty Nursurtan
|
|
|
|
|
${location} Create List
|
|
|
|
|
${isp} Create List transtel tnsplus ktel-mask ktel-bng ktel-mxpe
|
|
|
|
|
# ${isp} Create List
|
|
|
|
|
log ${PacketCapture}
|
|
|
|
|
${PacketCaptureresponse} Add&Edit_PacketCapture ${PacketCapture} ${location} ${isp}
|
|
|
|
|
LOG 捕包进度查询
|
|
|
|
|
${progress_response} BaseGetRequestForV2 troubleshooting/packetcapture/log/progress policyId=${policyId3} v1
|
|
|
|
|
LOG 捕包任务详情查询
|
|
|
|
|
${progress_response} BaseGetRequestForV2 troubleshooting/packetcapture/log/detail taskId=${PacketCaptureresponse} v1
|
|
|
|
|
LOG 捕包设备执行情况查询
|
|
|
|
|
${progress_response} BaseGetRequestForV2 troubleshooting/packetcapture/log/progress/detail taskId=${PacketCaptureresponse} v1
|
|
|
|
|
|
2020-08-13 18:38:54 +08:00
|
|
|
create_PacketCapture_Select_ISP
|
2020-08-14 18:25:39 +08:00
|
|
|
# 创建捕包策略
|
|
|
|
|
log 创建捕包策略
|
|
|
|
|
${PacketCapture} Create Dictionary policyId= policyName=zmmtest addrType=4 protocol=6 clientIp=192.168.50.60 clientPort=8080 serverIp=0.0.0.0 serverPort=0 maxPacket=1000 captureDuration=1
|
|
|
|
|
${location} Create List Almaty Nursurtan
|
|
|
|
|
# ${location} Create List
|
|
|
|
|
${isp} Create List transtel tnsplus ktel-mask ktel-bng ktel-mxpe
|
|
|
|
|
# ${isp} Create List
|
|
|
|
|
log ${PacketCapture}
|
2021-03-10 19:31:05 +08:00
|
|
|
${PacketCaptureresponse} Add&Edit_PacketCapture ${PacketCapture} ${location} ${isp}
|
2020-08-14 18:25:39 +08:00
|
|
|
LOG 捕包进度查询
|
|
|
|
|
${progress_response} BaseGetRequestForV2 troubleshooting/packetcapture/log/progress policyId=${policyId3} v1
|
|
|
|
|
LOG 捕包任务详情查询
|
|
|
|
|
${progress_response} BaseGetRequestForV2 troubleshooting/packetcapture/log/detail taskId=${PacketCaptureresponse} v1
|
|
|
|
|
LOG 捕包设备执行情况查询
|
|
|
|
|
${progress_response} BaseGetRequestForV2 troubleshooting/packetcapture/log/progress/detail taskId=${PacketCaptureresponse} v1
|
2021-03-10 19:31:05 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-08-14 18:25:39 +08:00
|
|
|
|