*** Settings *** Test Teardown DeletePolicyAndObject ${policyIds} ${objectids} Force Tags tsg_adc Security_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 Library Custometest Resource ../../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot *** Variables *** ${policyIds} ${EMPTY} ${objectids} ${EMPTY} *** Test Cases *** SecurityPolicy-Allow-Ftp-00001 [Tags] selfserver monitor ftp Comment 创建安全策略 ${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-FTP-00001 policyType=tsg_security policyDesc=autotest action=allow userRegion={"protocol":"FTP"} isValid=${1} appIdObjects=6 ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 #删除策略 ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]} Comment 功能端验证 ${starttime} Get Time Sleep ${policyVerificationSleepSeconds}s ${FTP} FTP_login ftp://192.168.100.5/test.txt -u"ftp_user:qazXSW@edc" 中文test should contain ${FTP} ftp_success Sleep ${policyLogVerificationSleepSeconds}s ${endtime} Get Time #日志验证 ${s} Convert to String ${policyId} GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} common_server_ip 192.168.100.5