71 lines
4.1 KiB
Plaintext
71 lines
4.1 KiB
Plaintext
|
|
*** Settings ***
|
||
|
|
Test Teardown DeletePolicyAndObjectAndIPpoor ${policyIds} ${wan_ippoor}
|
||
|
|
Force Tags tsg_adc_wp adc_api wan_nat
|
||
|
|
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_adc/FileOperation.robot
|
||
|
|
Resource ../../../02-Keyword/tsg_adc/FileOperation.robot
|
||
|
|
Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot
|
||
|
|
Resource ../../../05-Other/AllFlowCaseVariable.txt
|
||
|
|
Resource ../../../02-Keyword/tsg_common/StmpHandle.robot
|
||
|
|
Library Custometest
|
||
|
|
|
||
|
|
*** Variables ***
|
||
|
|
${policyIds} ${EMPTY}
|
||
|
|
${wan_ippoor} ${EMPTY}
|
||
|
|
|
||
|
|
*** Test Cases ***
|
||
|
|
a_wan_nat-snat-00001
|
||
|
|
[Tags] Never+IP Pools内单个IP
|
||
|
|
${must_parameter} Create Dictionary profileName=jwctest profileId=
|
||
|
|
${iplist1} Create Dictionary ip=192.168.50.7 relative_location=internal link_info={"link_id":123,"src_mac":321}
|
||
|
|
${wan_nat_ip_iplist} Create List ${iplist1}
|
||
|
|
${WanNatIpPood} Add&EditWanIpPood ${must_parameter} ${wan_nat_ip_iplist}
|
||
|
|
log ${WanNatIpPood}
|
||
|
|
Comment 创建snat策略
|
||
|
|
${policyDict} Create Dictionary policyName=wan_nat_snat-00001 policyType=wannat policyDesc=autotest action=wannat userRegion={"method":"snat","snat_ip_pool_profile_id":[${WanNatIpPood}],"snat_vpn_user_account":"user-1","connection_timeout":"5","ip_select_option":{"snat_algorithm":"random","time":"","count":""}} isValid=${1}
|
||
|
|
log ${policyDict}
|
||
|
|
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
|
||
|
|
insert_policyId_to_file1 ip ${WanNatIpPood}
|
||
|
|
insert_policyId_to_file1 policyId2 ${policyId2}
|
||
|
|
|
||
|
|
b_wan_nat-snat-00001
|
||
|
|
[Tags] Never+IP Pools内单个IP
|
||
|
|
Comment 功能端验证
|
||
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/wan_nat_sant_00001.bat
|
||
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List Welcome to nginx HTTP
|
||
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||
|
|
Comment 功能端验证
|
||
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/wan_nat_sant_00002.bat
|
||
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List self signed certificate
|
||
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||
|
|
Comment 功能端验证
|
||
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable nslookup test.com
|
||
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List 114.114.114.114
|
||
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||
|
|
Comment 功能端验证
|
||
|
|
${FTP} FTP_login ftp://192.168.44.8/test.txt -u"ftpuser:123456" 123456
|
||
|
|
should contain ${FTP} ftp_success
|
||
|
|
Comment 功能端验证
|
||
|
|
${Smtp服务器} Set Variable 192.168.40.156
|
||
|
|
${Smtp服务器端口} Set Variable 25
|
||
|
|
${邮箱账号} Set Variable yyq@163.com
|
||
|
|
${邮箱密码} Set Variable 111111
|
||
|
|
${邮件主题} Set Variable 你好明天
|
||
|
|
${发送者} Set Variable yyq@163.com
|
||
|
|
${附件} Set Variable ["${mailpath}/朱明明测试文件.txt"]
|
||
|
|
${接收者} Set Variable ["zmm@163.com"]
|
||
|
|
${抄送者} Set Variable ["zmm@163.com"]
|
||
|
|
${密送者} Set Variable ["zmm@163.com"]
|
||
|
|
${邮件正文} Set Variable 朱明明content
|
||
|
|
${发送邮件返回结果} EmailSendFull ${Smtp服务器} ${Smtp服务器端口} ${邮箱账号} ${邮箱密码} ${邮件主题} ${发送者} ${接收者} ${抄送者} ${密送者} ${邮件正文} ${附件}
|
||
|
|
Log ${发送邮件返回结果}
|
||
|
|
should contain ${发送邮件返回结果} mail_success
|
||
|
|
|
||
|
|
c_wan_nat-snat-00001
|
||
|
|
[Tags] Never+IP Pools内单个IP
|
||
|
|
${policyIds} Create List {"policyType":"wannat","policyIds":[${policyId2}]}
|
||
|
|
${wan_ippoor} Create List ${ip}
|