diff options
Diffstat (limited to 'output.xml')
| -rw-r--r-- | output.xml | 41762 |
1 files changed, 41762 insertions, 0 deletions
diff --git a/output.xml b/output.xml new file mode 100644 index 0000000..6938977 --- /dev/null +++ b/output.xml @@ -0,0 +1,41762 @@ +<?xml version="1.0" encoding="UTF-8"?> +<robot generator="Robot 3.1.2 (Python 3.6.8 on win32)" generated="20210602 14:11:19.630" rpa="false"> +<suite id="s1" name="Gap Tsg Api" source="C:\Users\admin\Desktop\gap_tsg_api\gap_tsg_api"> +<kw name="LoginAndAddLocalIP" library="login_logout_switch" type="setup"> +<tags> +<tag>adc_api</tag> +<tag>adc_log</tag> +<tag>adc_verify</tag> +<tag>tsg_adc</tag> +<tag>tsg_adc_wp</tag> +<tag>tsg_bf_api</tag> +<tag>tsg_device</tag> +</tags> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>'${loginType}' == 'api'</arg> +<arg>BifangLoginAndAddLocalIP</arg> +<arg>ELSE IF</arg> +<arg>'${loginType}' != '${None}'</arg> +<arg>UiLoginAndAddLocalIP</arg> +</arguments> +<kw name="BifangLoginAndAddLocalIP" library="login_logout"> +<tags> +<tag>tsg_adc</tag> +<tag>tsg_bf_api</tag> +</tags> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>ApiLoginAndAddLocalIP</arg> +</arguments> +<msg timestamp="20210602 14:11:20.959" level="INFO">ApiLoginAndAddLocalIP</msg> +<status status="PASS" starttime="20210602 14:11:20.958" endtime="20210602 14:11:20.959"></status> +</kw> +<kw name="ApiLogin" library="login_logout"> +<kw name="Get" library="REST"> +<tags> +<tag>http</tag> +</tags> +<doc>*Sends a GET request to the endpoint.*</doc> +<arguments> +<arg>/${version}/user/encryptpwd?password=${password}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:20.960" endtime="20210602 14:11:21.184"></status> +</kw> +<kw name="Object" library="REST"> +<tags> +<tag>assertions</tag> +</tags> +<doc>*Asserts the field as JSON object.*</doc> +<arguments> +<arg>response body</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.185" endtime="20210602 14:11:21.186"></status> +</kw> +<kw name="Integer" library="REST"> +<tags> +<tag>assertions</tag> +</tags> +<doc>*Asserts the field as JSON integer.*</doc> +<arguments> +<arg>$.code</arg> +<arg>200</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.186" endtime="20210602 14:11:21.216"></status> +</kw> +<kw name="String" library="REST"> +<tags> +<tag>assertions</tag> +</tags> +<doc>*Asserts the field as JSON string.*</doc> +<arguments> +<arg>$.data.encryptpwd</arg> +</arguments> +<assign> +<var>${pwd}</var> +</assign> +<msg timestamp="20210602 14:11:21.243" level="INFO">${pwd} = ['Gg1Etyh7fs1y/v/K2XOJDg==']</msg> +<status status="PASS" starttime="20210602 14:11:21.217" endtime="20210602 14:11:21.243"></status> +</kw> +<kw name="Get From List" library="Collections"> +<doc>Returns the value specified with an ``index`` from ``list``.</doc> +<arguments> +<arg>${pwd}</arg> +<arg>0</arg> +</arguments> +<assign> +<var>${pwdstr}</var> +</assign> +<msg timestamp="20210602 14:11:21.244" level="INFO">${pwdstr} = Gg1Etyh7fs1y/v/K2XOJDg==</msg> +<status status="PASS" starttime="20210602 14:11:21.244" endtime="20210602 14:11:21.244"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>${pwdstr}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.245" level="INFO">Gg1Etyh7fs1y/v/K2XOJDg==</msg> +<status status="PASS" starttime="20210602 14:11:21.245" endtime="20210602 14:11:21.245"></status> +</kw> +<kw name="Set Global Variable" library="BuiltIn"> +<doc>Makes a variable available globally in all tests and suites.</doc> +<arguments> +<arg>${encodePassword}</arg> +<arg>${pwdstr}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.246" level="INFO">${encodePassword} = Gg1Etyh7fs1y/v/K2XOJDg==</msg> +<status status="PASS" starttime="20210602 14:11:21.245" endtime="20210602 14:11:21.246"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>${encodePassword}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.246" level="INFO">Gg1Etyh7fs1y/v/K2XOJDg==</msg> +<status status="PASS" starttime="20210602 14:11:21.246" endtime="20210602 14:11:21.247"></status> +</kw> +<kw name="Post" library="REST"> +<tags> +<tag>http</tag> +</tags> +<doc>*Sends a POST request to the endpoint.*</doc> +<arguments> +<arg>/${version}/user/login?username=${username}&password=${encodePassword}&authMode=${authmode}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.247" endtime="20210602 14:11:21.263"></status> +</kw> +<kw name="Object" library="REST"> +<tags> +<tag>assertions</tag> +</tags> +<doc>*Asserts the field as JSON object.*</doc> +<arguments> +<arg>response body</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.264" endtime="20210602 14:11:21.265"></status> +</kw> +<kw name="Integer" library="REST"> +<tags> +<tag>assertions</tag> +</tags> +<doc>*Asserts the field as JSON integer.*</doc> +<arguments> +<arg>$.code</arg> +<arg>200</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.265" endtime="20210602 14:11:21.292"></status> +</kw> +<kw name="Integer" library="REST"> +<tags> +<tag>assertions</tag> +</tags> +<doc>*Asserts the field as JSON integer.*</doc> +<arguments> +<arg>$.code</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:21.319" level="INFO">${rescode} = [200]</msg> +<status status="PASS" starttime="20210602 14:11:21.293" endtime="20210602 14:11:21.319"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>${rescode}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.320" level="INFO">[200]</msg> +<status status="PASS" starttime="20210602 14:11:21.319" endtime="20210602 14:11:21.320"></status> +</kw> +<kw name="String" library="REST"> +<tags> +<tag>assertions</tag> +</tags> +<doc>*Asserts the field as JSON string.*</doc> +<arguments> +<arg>$.data.token</arg> +</arguments> +<assign> +<var>${tokenGlobal}</var> +</assign> +<msg timestamp="20210602 14:11:21.366" level="INFO">${tokenGlobal} = ['e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&']</msg> +<status status="PASS" starttime="20210602 14:11:21.320" endtime="20210602 14:11:21.367"></status> +</kw> +<kw name="Get From List" library="Collections"> +<doc>Returns the value specified with an ``index`` from ``list``.</doc> +<arguments> +<arg>${tokenGlobal}</arg> +<arg>0</arg> +</arguments> +<assign> +<var>${tokenStr}</var> +</assign> +<msg timestamp="20210602 14:11:21.367" level="INFO">${tokenStr} = e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&</msg> +<status status="PASS" starttime="20210602 14:11:21.367" endtime="20210602 14:11:21.367"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>${tokenStr}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.368" level="INFO">e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&</msg> +<status status="PASS" starttime="20210602 14:11:21.368" endtime="20210602 14:11:21.368"></status> +</kw> +<kw name="Set Global Variable" library="BuiltIn"> +<doc>Makes a variable available globally in all tests and suites.</doc> +<arguments> +<arg>${token}</arg> +<arg>${tokenStr}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.369" level="INFO">${token} = e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&</msg> +<status status="PASS" starttime="20210602 14:11:21.368" endtime="20210602 14:11:21.369"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>${token}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.370" level="INFO">e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&</msg> +<status status="PASS" starttime="20210602 14:11:21.369" endtime="20210602 14:11:21.370"></status> +</kw> +<kw name="Set Global Variable" library="BuiltIn"> +<doc>Makes a variable available globally in all tests and suites.</doc> +<arguments> +<arg>${headers}</arg> +<arg>{"Contest-Type":"application/json","Authorization":"${token}"}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.373" level="INFO">${headers} = {"Contest-Type":"application/json","Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&"}</msg> +<status status="PASS" starttime="20210602 14:11:21.371" endtime="20210602 14:11:21.373"></status> +</kw> +<kw name="InitPotocol" library="login_logout"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<assign> +<var>${appDict}</var> +</assign> +<msg timestamp="20210602 14:11:21.374" level="INFO">${appDict} = {}</msg> +<status status="PASS" starttime="20210602 14:11:21.374" endtime="20210602 14:11:21.375"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<assign> +<var>${appVDict}</var> +</assign> +<msg timestamp="20210602 14:11:21.375" level="INFO">${appVDict} = {}</msg> +<status status="PASS" starttime="20210602 14:11:21.375" endtime="20210602 14:11:21.375"></status> +</kw> +<kw name="Connect To Database Using Custom Params" library="DatabaseLibrary"> +<doc>Loads the DB API 2.0 module given `dbapiModuleName` then uses it to +connect to the database using the map string `db_custom_param_string`.</doc> +<arguments> +<arg>pymysql</arg> +<arg>${mysqlHost}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.426" level="INFO">Executing : Connect To Database Using Custom Params : pymysql.connect(db_api_2.connect(host='192.168.44.72',port=3306,user='root',passwd='bifang!@#',database='tsg-bifang')) </msg> +<status status="PASS" starttime="20210602 14:11:21.376" endtime="20210602 14:11:21.440"></status> +</kw> +<kw name="Query" library="DatabaseLibrary"> +<doc>Uses the input `selectStatement` to query for the values that will be returned as a list of tuples. Set optional +input `sansTran` to True to run command without an explicit transaction commit or rollback. +Set optional input `returnAsDict` to True to return values as a list of dictionaries.</doc> +<arguments> +<arg>SELECT group_id,low_boundary,region_name FROM tsg_obj_app_id WHERE is_valid=1 AND region_name='http' OR region_name='ssl' OR region_name='dns' OR region_name='ftp' OR region_name='mail' OR region_name='doh' OR region_name='rtp' OR region_name='sip'</arg> +</arguments> +<assign> +<var>${app_id}</var> +</assign> +<msg timestamp="20210602 14:11:21.444" level="INFO">Executing : Query | SELECT group_id,low_boundary,region_name FROM tsg_obj_app_id WHERE is_valid=1 AND region_name='http' OR region_name='ssl' OR region_name='dns' OR region_name='ftp' OR region_name='mail' OR region_name='doh' OR region_name='rtp' OR region_name='sip' </msg> +<msg timestamp="20210602 14:11:21.450" level="INFO">${app_id} = ((75167, 32, 'dns'), (75479, 45, 'ftp'), (75744, 67, 'http'), (76907, 175, 'rtp'), (77048, 182, 'sip'), (77159, 199, 'ssl'), (77950, 8004, 'MAIL'), (77952, 8006, 'DoH'))</msg> +<status status="PASS" starttime="20210602 14:11:21.443" endtime="20210602 14:11:21.451"></status> +</kw> +<kw name="Get Length" library="BuiltIn"> +<doc>Returns and logs the length of the given item as an integer.</doc> +<arguments> +<arg>${app_id}</arg> +</arguments> +<assign> +<var>${app_length}</var> +</assign> +<msg timestamp="20210602 14:11:21.454" level="INFO">Length is 8</msg> +<msg timestamp="20210602 14:11:21.455" level="INFO">${app_length} = 8</msg> +<status status="PASS" starttime="20210602 14:11:21.452" endtime="20210602 14:11:21.455"></status> +</kw> +<kw name="${n} IN RANGE [ ${app_length} ]" type="for"> +<kw name="${n} = 0" type="foritem"> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>${n}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.456" level="INFO">0</msg> +<status status="PASS" starttime="20210602 14:11:21.456" endtime="20210602 14:11:21.457"></status> +</kw> +<kw name="Set To Dictionary" library="Collections"> +<doc>Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``.</doc> +<arguments> +<arg>${appDict}</arg> +<arg>${app_id}[${n}][2]=${app_id}[${n}][0]</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.457" endtime="20210602 14:11:21.457"></status> +</kw> +<kw name="Set To Dictionary" library="Collections"> +<doc>Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``.</doc> +<arguments> +<arg>${appVDict}</arg> +<arg>${app_id}[${n}][2]=${app_id}[${n}][1]</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.458" endtime="20210602 14:11:21.458"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>${appDict}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.459" level="INFO">{'dns': 75167}</msg> +<status status="PASS" starttime="20210602 14:11:21.459" endtime="20210602 14:11:21.459"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>${appVDict}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.460" level="INFO">{'dns': 32}</msg> +<status status="PASS" starttime="20210602 14:11:21.459" endtime="20210602 14:11:21.460"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:21.456" endtime="20210602 14:11:21.460"></status> +</kw> +<kw name="${n} = 1" type="foritem"> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>${n}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.461" level="INFO">1</msg> +<status status="PASS" starttime="20210602 14:11:21.460" endtime="20210602 14:11:21.461"></status> +</kw> +<kw name="Set To Dictionary" library="Collections"> +<doc>Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``.</doc> +<arguments> +<arg>${appDict}</arg> +<arg>${app_id}[${n}][2]=${app_id}[${n}][0]</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.461" endtime="20210602 14:11:21.462"></status> +</kw> +<kw name="Set To Dictionary" library="Collections"> +<doc>Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``.</doc> +<arguments> +<arg>${appVDict}</arg> +<arg>${app_id}[${n}][2]=${app_id}[${n}][1]</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.462" endtime="20210602 14:11:21.463"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>${appDict}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.463" level="INFO">{'dns': 75167, 'ftp': 75479}</msg> +<status status="PASS" starttime="20210602 14:11:21.463" endtime="20210602 14:11:21.464"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>${appVDict}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.464" level="INFO">{'dns': 32, 'ftp': 45}</msg> +<status status="PASS" starttime="20210602 14:11:21.464" endtime="20210602 14:11:21.464"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:21.460" endtime="20210602 14:11:21.465"></status> +</kw> +<kw name="${n} = 2" type="foritem"> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>${n}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.465" level="INFO">2</msg> +<status status="PASS" starttime="20210602 14:11:21.465" endtime="20210602 14:11:21.465"></status> +</kw> +<kw name="Set To Dictionary" library="Collections"> +<doc>Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``.</doc> +<arguments> +<arg>${appDict}</arg> +<arg>${app_id}[${n}][2]=${app_id}[${n}][0]</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.466" endtime="20210602 14:11:21.466"></status> +</kw> +<kw name="Set To Dictionary" library="Collections"> +<doc>Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``.</doc> +<arguments> +<arg>${appVDict}</arg> +<arg>${app_id}[${n}][2]=${app_id}[${n}][1]</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.467" endtime="20210602 14:11:21.467"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>${appDict}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.468" level="INFO">{'dns': 75167, 'ftp': 75479, 'http': 75744}</msg> +<status status="PASS" starttime="20210602 14:11:21.467" endtime="20210602 14:11:21.468"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>${appVDict}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.469" level="INFO">{'dns': 32, 'ftp': 45, 'http': 67}</msg> +<status status="PASS" starttime="20210602 14:11:21.468" endtime="20210602 14:11:21.469"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:21.465" endtime="20210602 14:11:21.469"></status> +</kw> +<kw name="${n} = 3" type="foritem"> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>${n}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.470" level="INFO">3</msg> +<status status="PASS" starttime="20210602 14:11:21.469" endtime="20210602 14:11:21.470"></status> +</kw> +<kw name="Set To Dictionary" library="Collections"> +<doc>Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``.</doc> +<arguments> +<arg>${appDict}</arg> +<arg>${app_id}[${n}][2]=${app_id}[${n}][0]</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.470" endtime="20210602 14:11:21.471"></status> +</kw> +<kw name="Set To Dictionary" library="Collections"> +<doc>Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``.</doc> +<arguments> +<arg>${appVDict}</arg> +<arg>${app_id}[${n}][2]=${app_id}[${n}][1]</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.471" endtime="20210602 14:11:21.471"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>${appDict}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.472" level="INFO">{'dns': 75167, 'ftp': 75479, 'http': 75744, 'rtp': 76907}</msg> +<status status="PASS" starttime="20210602 14:11:21.472" endtime="20210602 14:11:21.472"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>${appVDict}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.473" level="INFO">{'dns': 32, 'ftp': 45, 'http': 67, 'rtp': 175}</msg> +<status status="PASS" starttime="20210602 14:11:21.472" endtime="20210602 14:11:21.473"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:21.469" endtime="20210602 14:11:21.473"></status> +</kw> +<kw name="${n} = 4" type="foritem"> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>${n}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.474" level="INFO">4</msg> +<status status="PASS" starttime="20210602 14:11:21.473" endtime="20210602 14:11:21.474"></status> +</kw> +<kw name="Set To Dictionary" library="Collections"> +<doc>Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``.</doc> +<arguments> +<arg>${appDict}</arg> +<arg>${app_id}[${n}][2]=${app_id}[${n}][0]</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.474" endtime="20210602 14:11:21.475"></status> +</kw> +<kw name="Set To Dictionary" library="Collections"> +<doc>Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``.</doc> +<arguments> +<arg>${appVDict}</arg> +<arg>${app_id}[${n}][2]=${app_id}[${n}][1]</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.475" endtime="20210602 14:11:21.475"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>${appDict}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.476" level="INFO">{'dns': 75167, 'ftp': 75479, 'http': 75744, 'rtp': 76907, 'sip': 77048}</msg> +<status status="PASS" starttime="20210602 14:11:21.476" endtime="20210602 14:11:21.477"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>${appVDict}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.478" level="INFO">{'dns': 32, 'ftp': 45, 'http': 67, 'rtp': 175, 'sip': 182}</msg> +<status status="PASS" starttime="20210602 14:11:21.477" endtime="20210602 14:11:21.478"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:21.473" endtime="20210602 14:11:21.478"></status> +</kw> +<kw name="${n} = 5" type="foritem"> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>${n}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.479" level="INFO">5</msg> +<status status="PASS" starttime="20210602 14:11:21.478" endtime="20210602 14:11:21.479"></status> +</kw> +<kw name="Set To Dictionary" library="Collections"> +<doc>Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``.</doc> +<arguments> +<arg>${appDict}</arg> +<arg>${app_id}[${n}][2]=${app_id}[${n}][0]</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.479" endtime="20210602 14:11:21.480"></status> +</kw> +<kw name="Set To Dictionary" library="Collections"> +<doc>Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``.</doc> +<arguments> +<arg>${appVDict}</arg> +<arg>${app_id}[${n}][2]=${app_id}[${n}][1]</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.480" endtime="20210602 14:11:21.481"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>${appDict}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.481" level="INFO">{'dns': 75167, 'ftp': 75479, 'http': 75744, 'rtp': 76907, 'sip': 77048, 'ssl': 77159}</msg> +<status status="PASS" starttime="20210602 14:11:21.481" endtime="20210602 14:11:21.481"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>${appVDict}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.482" level="INFO">{'dns': 32, 'ftp': 45, 'http': 67, 'rtp': 175, 'sip': 182, 'ssl': 199}</msg> +<status status="PASS" starttime="20210602 14:11:21.482" endtime="20210602 14:11:21.482"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:21.478" endtime="20210602 14:11:21.482"></status> +</kw> +<kw name="${n} = 6" type="foritem"> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>${n}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.483" level="INFO">6</msg> +<status status="PASS" starttime="20210602 14:11:21.483" endtime="20210602 14:11:21.483"></status> +</kw> +<kw name="Set To Dictionary" library="Collections"> +<doc>Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``.</doc> +<arguments> +<arg>${appDict}</arg> +<arg>${app_id}[${n}][2]=${app_id}[${n}][0]</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.484" endtime="20210602 14:11:21.484"></status> +</kw> +<kw name="Set To Dictionary" library="Collections"> +<doc>Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``.</doc> +<arguments> +<arg>${appVDict}</arg> +<arg>${app_id}[${n}][2]=${app_id}[${n}][1]</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.485" endtime="20210602 14:11:21.485"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>${appDict}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.486" level="INFO">{'dns': 75167, 'ftp': 75479, 'http': 75744, 'rtp': 76907, 'sip': 77048, 'ssl': 77159, 'MAIL': 77950}</msg> +<status status="PASS" starttime="20210602 14:11:21.485" endtime="20210602 14:11:21.486"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>${appVDict}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.486" level="INFO">{'dns': 32, 'ftp': 45, 'http': 67, 'rtp': 175, 'sip': 182, 'ssl': 199, 'MAIL': 8004}</msg> +<status status="PASS" starttime="20210602 14:11:21.486" endtime="20210602 14:11:21.486"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:21.483" endtime="20210602 14:11:21.487"></status> +</kw> +<kw name="${n} = 7" type="foritem"> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>${n}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.487" level="INFO">7</msg> +<status status="PASS" starttime="20210602 14:11:21.487" endtime="20210602 14:11:21.488"></status> +</kw> +<kw name="Set To Dictionary" library="Collections"> +<doc>Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``.</doc> +<arguments> +<arg>${appDict}</arg> +<arg>${app_id}[${n}][2]=${app_id}[${n}][0]</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.488" endtime="20210602 14:11:21.488"></status> +</kw> +<kw name="Set To Dictionary" library="Collections"> +<doc>Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``.</doc> +<arguments> +<arg>${appVDict}</arg> +<arg>${app_id}[${n}][2]=${app_id}[${n}][1]</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.489" endtime="20210602 14:11:21.489"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>${appDict}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.490" level="INFO">{'dns': 75167, 'ftp': 75479, 'http': 75744, 'rtp': 76907, 'sip': 77048, 'ssl': 77159, 'MAIL': 77950, 'DoH': 77952}</msg> +<status status="PASS" starttime="20210602 14:11:21.489" endtime="20210602 14:11:21.490"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>${appVDict}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.490" level="INFO">{'dns': 32, 'ftp': 45, 'http': 67, 'rtp': 175, 'sip': 182, 'ssl': 199, 'MAIL': 8004, 'DoH': 8006}</msg> +<status status="PASS" starttime="20210602 14:11:21.490" endtime="20210602 14:11:21.491"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:21.487" endtime="20210602 14:11:21.491"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:21.455" endtime="20210602 14:11:21.491"></status> +</kw> +<kw name="Disconnect From Database" library="DatabaseLibrary"> +<doc>Disconnects from the database.</doc> +<msg timestamp="20210602 14:11:21.491" level="INFO">Executing : Disconnect From Database</msg> +<status status="PASS" starttime="20210602 14:11:21.491" endtime="20210602 14:11:21.492"></status> +</kw> +<kw name="Set Global Variable" library="BuiltIn"> +<doc>Makes a variable available globally in all tests and suites.</doc> +<arguments> +<arg>${objprotol}</arg> +<arg>${appDict}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.494" level="INFO">${objprotol} = {'dns': 75167, 'ftp': 75479, 'http': 75744, 'rtp': 76907, 'sip': 77048, 'ssl': 77159, 'MAIL': 77950, 'DoH': 77952}</msg> +<status status="PASS" starttime="20210602 14:11:21.492" endtime="20210602 14:11:21.494"></status> +</kw> +<kw name="Set Global Variable" library="BuiltIn"> +<doc>Makes a variable available globally in all tests and suites.</doc> +<arguments> +<arg>${appportol}</arg> +<arg>${appVDict}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.496" level="INFO">${appportol} = {'dns': 32, 'ftp': 45, 'http': 67, 'rtp': 175, 'sip': 182, 'ssl': 199, 'MAIL': 8004, 'DoH': 8006}</msg> +<status status="PASS" starttime="20210602 14:11:21.494" endtime="20210602 14:11:21.496"></status> +</kw> +<kw name="GetProtocol" library="login_logout"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objprotol}</arg> +<arg>http</arg> +</arguments> +<assign> +<var>${HTTP_ID1}</var> +</assign> +<msg timestamp="20210602 14:11:21.498" level="INFO">${HTTP_ID1} = 75744</msg> +<status status="PASS" starttime="20210602 14:11:21.497" endtime="20210602 14:11:21.498"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objprotol}</arg> +<arg>rtp</arg> +</arguments> +<assign> +<var>${RTP_ID1}</var> +</assign> +<msg timestamp="20210602 14:11:21.499" level="INFO">${RTP_ID1} = 76907</msg> +<status status="PASS" starttime="20210602 14:11:21.498" endtime="20210602 14:11:21.499"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objprotol}</arg> +<arg>dns</arg> +</arguments> +<assign> +<var>${DNS_ID1}</var> +</assign> +<msg timestamp="20210602 14:11:21.499" level="INFO">${DNS_ID1} = 75167</msg> +<status status="PASS" starttime="20210602 14:11:21.499" endtime="20210602 14:11:21.499"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objprotol}</arg> +<arg>MAIL</arg> +</arguments> +<assign> +<var>${MAIL_ID1}</var> +</assign> +<msg timestamp="20210602 14:11:21.500" level="INFO">${MAIL_ID1} = 77950</msg> +<status status="PASS" starttime="20210602 14:11:21.500" endtime="20210602 14:11:21.500"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objprotol}</arg> +<arg>ftp</arg> +</arguments> +<assign> +<var>${FTP_ID1}</var> +</assign> +<msg timestamp="20210602 14:11:21.501" level="INFO">${FTP_ID1} = 75479</msg> +<status status="PASS" starttime="20210602 14:11:21.501" endtime="20210602 14:11:21.501"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objprotol}</arg> +<arg>sip</arg> +</arguments> +<assign> +<var>${SIP_ID1}</var> +</assign> +<msg timestamp="20210602 14:11:21.502" level="INFO">${SIP_ID1} = 77048</msg> +<status status="PASS" starttime="20210602 14:11:21.501" endtime="20210602 14:11:21.502"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objprotol}</arg> +<arg>ssl</arg> +</arguments> +<assign> +<var>${SSL_ID1}</var> +</assign> +<msg timestamp="20210602 14:11:21.502" level="INFO">${SSL_ID1} = 77159</msg> +<status status="PASS" starttime="20210602 14:11:21.502" endtime="20210602 14:11:21.502"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objprotol}</arg> +<arg>DoH</arg> +</arguments> +<assign> +<var>${DOH_ID1}</var> +</assign> +<msg timestamp="20210602 14:11:21.503" level="INFO">${DOH_ID1} = 77952</msg> +<status status="PASS" starttime="20210602 14:11:21.503" endtime="20210602 14:11:21.503"></status> +</kw> +<kw name="Set Global Variable" library="BuiltIn"> +<doc>Makes a variable available globally in all tests and suites.</doc> +<arguments> +<arg>${HTTP_ID}</arg> +<arg>${HTTP_ID1}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.505" level="INFO">${HTTP_ID} = 75744</msg> +<status status="PASS" starttime="20210602 14:11:21.504" endtime="20210602 14:11:21.505"></status> +</kw> +<kw name="Set Global Variable" library="BuiltIn"> +<doc>Makes a variable available globally in all tests and suites.</doc> +<arguments> +<arg>${RTP_ID}</arg> +<arg>${RTP_ID1}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.507" level="INFO">${RTP_ID} = 76907</msg> +<status status="PASS" starttime="20210602 14:11:21.506" endtime="20210602 14:11:21.508"></status> +</kw> +<kw name="Set Global Variable" library="BuiltIn"> +<doc>Makes a variable available globally in all tests and suites.</doc> +<arguments> +<arg>${DNS_ID}</arg> +<arg>${DNS_ID1}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.510" level="INFO">${DNS_ID} = 75167</msg> +<status status="PASS" starttime="20210602 14:11:21.508" endtime="20210602 14:11:21.510"></status> +</kw> +<kw name="Set Global Variable" library="BuiltIn"> +<doc>Makes a variable available globally in all tests and suites.</doc> +<arguments> +<arg>${MAIL_ID}</arg> +<arg>${MAIL_ID1}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.512" level="INFO">${MAIL_ID} = 77950</msg> +<status status="PASS" starttime="20210602 14:11:21.510" endtime="20210602 14:11:21.513"></status> +</kw> +<kw name="Set Global Variable" library="BuiltIn"> +<doc>Makes a variable available globally in all tests and suites.</doc> +<arguments> +<arg>${FTP_ID}</arg> +<arg>${FTP_ID1}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.515" level="INFO">${FTP_ID} = 75479</msg> +<status status="PASS" starttime="20210602 14:11:21.513" endtime="20210602 14:11:21.515"></status> +</kw> +<kw name="Set Global Variable" library="BuiltIn"> +<doc>Makes a variable available globally in all tests and suites.</doc> +<arguments> +<arg>${SIP_ID}</arg> +<arg>${SIP_ID1}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.518" level="INFO">${SIP_ID} = 77048</msg> +<status status="PASS" starttime="20210602 14:11:21.515" endtime="20210602 14:11:21.518"></status> +</kw> +<kw name="Set Global Variable" library="BuiltIn"> +<doc>Makes a variable available globally in all tests and suites.</doc> +<arguments> +<arg>${SSL_ID}</arg> +<arg>${SSL_ID1}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.520" level="INFO">${SSL_ID} = 77159</msg> +<status status="PASS" starttime="20210602 14:11:21.518" endtime="20210602 14:11:21.520"></status> +</kw> +<kw name="Set Global Variable" library="BuiltIn"> +<doc>Makes a variable available globally in all tests and suites.</doc> +<arguments> +<arg>${DOH_ID}</arg> +<arg>${DOH_ID1}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.522" level="INFO">${DOH_ID} = 77952</msg> +<status status="PASS" starttime="20210602 14:11:21.520" endtime="20210602 14:11:21.522"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${appportol}</arg> +<arg>http</arg> +</arguments> +<assign> +<var>${HTTP_VID1}</var> +</assign> +<msg timestamp="20210602 14:11:21.523" level="INFO">${HTTP_VID1} = 67</msg> +<status status="PASS" starttime="20210602 14:11:21.522" endtime="20210602 14:11:21.523"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${appportol}</arg> +<arg>rtp</arg> +</arguments> +<assign> +<var>${RTP_VID1}</var> +</assign> +<msg timestamp="20210602 14:11:21.524" level="INFO">${RTP_VID1} = 175</msg> +<status status="PASS" starttime="20210602 14:11:21.523" endtime="20210602 14:11:21.524"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${appportol}</arg> +<arg>dns</arg> +</arguments> +<assign> +<var>${DNS_VID1}</var> +</assign> +<msg timestamp="20210602 14:11:21.524" level="INFO">${DNS_VID1} = 32</msg> +<status status="PASS" starttime="20210602 14:11:21.524" endtime="20210602 14:11:21.524"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${appportol}</arg> +<arg>MAIL</arg> +</arguments> +<assign> +<var>${MAIL_VID1}</var> +</assign> +<msg timestamp="20210602 14:11:21.525" level="INFO">${MAIL_VID1} = 8004</msg> +<status status="PASS" starttime="20210602 14:11:21.525" endtime="20210602 14:11:21.525"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${appportol}</arg> +<arg>ftp</arg> +</arguments> +<assign> +<var>${FTP_VID1}</var> +</assign> +<msg timestamp="20210602 14:11:21.526" level="INFO">${FTP_VID1} = 45</msg> +<status status="PASS" starttime="20210602 14:11:21.525" endtime="20210602 14:11:21.526"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${appportol}</arg> +<arg>sip</arg> +</arguments> +<assign> +<var>${SIP_VID1}</var> +</assign> +<msg timestamp="20210602 14:11:21.527" level="INFO">${SIP_VID1} = 182</msg> +<status status="PASS" starttime="20210602 14:11:21.526" endtime="20210602 14:11:21.527"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${appportol}</arg> +<arg>ssl</arg> +</arguments> +<assign> +<var>${SSL_VID1}</var> +</assign> +<msg timestamp="20210602 14:11:21.527" level="INFO">${SSL_VID1} = 199</msg> +<status status="PASS" starttime="20210602 14:11:21.527" endtime="20210602 14:11:21.527"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${appportol}</arg> +<arg>DoH</arg> +</arguments> +<assign> +<var>${DOH_VID1}</var> +</assign> +<msg timestamp="20210602 14:11:21.528" level="INFO">${DOH_VID1} = 8006</msg> +<status status="PASS" starttime="20210602 14:11:21.528" endtime="20210602 14:11:21.528"></status> +</kw> +<kw name="Set Global Variable" library="BuiltIn"> +<doc>Makes a variable available globally in all tests and suites.</doc> +<arguments> +<arg>${HTTP_VID}</arg> +<arg>${HTTP_VID1}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.531" level="INFO">${HTTP_VID} = 67</msg> +<status status="PASS" starttime="20210602 14:11:21.528" endtime="20210602 14:11:21.531"></status> +</kw> +<kw name="Set Global Variable" library="BuiltIn"> +<doc>Makes a variable available globally in all tests and suites.</doc> +<arguments> +<arg>${RTP_VID}</arg> +<arg>${RTP_VID1}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.534" level="INFO">${RTP_VID} = 175</msg> +<status status="PASS" starttime="20210602 14:11:21.531" endtime="20210602 14:11:21.534"></status> +</kw> +<kw name="Set Global Variable" library="BuiltIn"> +<doc>Makes a variable available globally in all tests and suites.</doc> +<arguments> +<arg>${DNS_VID}</arg> +<arg>${DNS_VID1}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.537" level="INFO">${DNS_VID} = 32</msg> +<status status="PASS" starttime="20210602 14:11:21.535" endtime="20210602 14:11:21.537"></status> +</kw> +<kw name="Set Global Variable" library="BuiltIn"> +<doc>Makes a variable available globally in all tests and suites.</doc> +<arguments> +<arg>${MAIL_VID}</arg> +<arg>${MAIL_VID1}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.541" level="INFO">${MAIL_VID} = 8004</msg> +<status status="PASS" starttime="20210602 14:11:21.537" endtime="20210602 14:11:21.541"></status> +</kw> +<kw name="Set Global Variable" library="BuiltIn"> +<doc>Makes a variable available globally in all tests and suites.</doc> +<arguments> +<arg>${FTP_VID}</arg> +<arg>${FTP_VID1}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.544" level="INFO">${FTP_VID} = 45</msg> +<status status="PASS" starttime="20210602 14:11:21.541" endtime="20210602 14:11:21.544"></status> +</kw> +<kw name="Set Global Variable" library="BuiltIn"> +<doc>Makes a variable available globally in all tests and suites.</doc> +<arguments> +<arg>${SIP_VID}</arg> +<arg>${SIP_VID1}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.547" level="INFO">${SIP_VID} = 182</msg> +<status status="PASS" starttime="20210602 14:11:21.545" endtime="20210602 14:11:21.547"></status> +</kw> +<kw name="Set Global Variable" library="BuiltIn"> +<doc>Makes a variable available globally in all tests and suites.</doc> +<arguments> +<arg>${SSL_VID}</arg> +<arg>${SSL_VID1}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.550" level="INFO">${SSL_VID} = 199</msg> +<status status="PASS" starttime="20210602 14:11:21.548" endtime="20210602 14:11:21.550"></status> +</kw> +<kw name="Set Global Variable" library="BuiltIn"> +<doc>Makes a variable available globally in all tests and suites.</doc> +<arguments> +<arg>${DOH_VID}</arg> +<arg>${DOH_VID1}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.553" level="INFO">${DOH_VID} = 8006</msg> +<status status="PASS" starttime="20210602 14:11:21.551" endtime="20210602 14:11:21.553"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:21.497" endtime="20210602 14:11:21.553"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:21.373" endtime="20210602 14:11:21.553"></status> +</kw> +<kw name="InitTemplate" library="login_logout"> +<kw name="Get File" library="OperatingSystem"> +<doc>Returns the contents of a specified file.</doc> +<arguments> +<arg>${path}/data/template/template.yaml</arg> +</arguments> +<assign> +<var>${YAML}</var> +</assign> +<msg timestamp="20210602 14:11:21.555" level="INFO" html="yes">Getting file '<a href="file://C:\Users\admin\Desktop\gap_tsg_api\gap_tsg_api\other\data\template\template.yaml">C:\Users\admin\Desktop\gap_tsg_api\gap_tsg_api\other\data\template\template.yaml</a>'.</msg> +<msg timestamp="20210602 14:11:21.556" level="INFO">${YAML} = #ip正向用例 +"ip_batch_mode": + #"ip_v4_single": + "datafomat": "complate" #完整数据:complate;部分数据:part + "opAction": "add" + "returnData": 1 + "objectList": + - + "objectId": + "objectType": "ip" + ...</msg> +<status status="PASS" starttime="20210602 14:11:21.555" endtime="20210602 14:11:21.556"></status> +</kw> +<kw name="Safe Load" library="yaml"> +<doc>Parse the first YAML document in a stream +and produce the corresponding Python object.</doc> +<arguments> +<arg>${YAML}</arg> +</arguments> +<assign> +<var>${LOADED}</var> +</assign> +<msg timestamp="20210602 14:11:21.562" level="INFO">${LOADED} = {'ip_batch_mode': {'datafomat': 'complate', 'opAction': 'add', 'returnData': 1, 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isE...</msg> +<status status="PASS" starttime="20210602 14:11:21.557" endtime="20210602 14:11:21.562"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${LOADED}</arg> +<arg>ip_batch_mode</arg> +</arguments> +<assign> +<var>${objMode}</var> +</assign> +<msg timestamp="20210602 14:11:21.563" level="INFO">${objMode} = {'datafomat': 'complate', 'opAction': 'add', 'returnData': 1, 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'obj...</msg> +<status status="PASS" starttime="20210602 14:11:21.562" endtime="20210602 14:11:21.563"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objMode}</arg> +<arg>objectList</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:21.563" level="INFO">${objList} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [None], 'a...</msg> +<status status="PASS" starttime="20210602 14:11:21.563" endtime="20210602 14:11:21.564"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${objMode}</arg> +</arguments> +<assign> +<var>${toJson}</var> +</assign> +<msg timestamp="20210602 14:11:21.564" level="INFO">${toJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:21.564" endtime="20210602 14:11:21.564"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${objList}</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:21.565" level="INFO">${objList} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:21.565" endtime="20210602 14:11:21.565"></status> +</kw> +<kw name="Set Global Variable" library="BuiltIn"> +<doc>Makes a variable available globally in all tests and suites.</doc> +<arguments> +<arg>${objModeJson}</arg> +<arg>${toJson}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.567" level="INFO">${objModeJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:21.565" endtime="20210602 14:11:21.567"></status> +</kw> +<kw name="Set Global Variable" library="BuiltIn"> +<doc>Makes a variable available globally in all tests and suites.</doc> +<arguments> +<arg>${objListMode}</arg> +<arg>${objList}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.569" level="INFO">${objListMode} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:21.568" endtime="20210602 14:11:21.569"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${LOADED}</arg> +<arg>policy_template</arg> +</arguments> +<assign> +<var>${policyMode}</var> +</assign> +<msg timestamp="20210602 14:11:21.570" level="INFO">${policyMode} = {'opAction': 'add', 'returnData': 1, 'policyList': {'policyName': 'autotest', 'policyType': 'tsg_security', 'action': 'allow', 'userTags': '', 'doBlacklist': 0, 'doLog': 1, 'policyDesc': 'autotest', '...</msg> +<status status="PASS" starttime="20210602 14:11:21.570" endtime="20210602 14:11:21.570"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyMode}</arg> +<arg>policyList</arg> +</arguments> +<assign> +<var>${policyList}</var> +</assign> +<msg timestamp="20210602 14:11:21.571" level="INFO">${policyList} = {'policyName': 'autotest', 'policyType': 'tsg_security', 'action': 'allow', 'userTags': '', 'doBlacklist': 0, 'doLog': 1, 'policyDesc': 'autotest', 'effectiveRange': None, 'userRegion': None, 'source'...</msg> +<status status="PASS" starttime="20210602 14:11:21.571" endtime="20210602 14:11:21.571"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${policyMode}</arg> +</arguments> +<assign> +<var>${toJson}</var> +</assign> +<msg timestamp="20210602 14:11:21.572" level="INFO">${toJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...</msg> +<status status="PASS" starttime="20210602 14:11:21.571" endtime="20210602 14:11:21.572"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${policyList}</arg> +</arguments> +<assign> +<var>${policyList}</var> +</assign> +<msg timestamp="20210602 14:11:21.572" level="INFO">${policyList} = {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "effectiveRange": null, "userRegion": null, "source"...</msg> +<status status="PASS" starttime="20210602 14:11:21.572" endtime="20210602 14:11:21.573"></status> +</kw> +<kw name="Set Global Variable" library="BuiltIn"> +<doc>Makes a variable available globally in all tests and suites.</doc> +<arguments> +<arg>${policyModeJson}</arg> +<arg>${toJson}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.575" level="INFO">${policyModeJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...</msg> +<status status="PASS" starttime="20210602 14:11:21.573" endtime="20210602 14:11:21.575"></status> +</kw> +<kw name="Set Global Variable" library="BuiltIn"> +<doc>Makes a variable available globally in all tests and suites.</doc> +<arguments> +<arg>${policyListMode}</arg> +<arg>${policyList}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.577" level="INFO">${policyListMode} = {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "effectiveRange": null, "userRegion": null, "source"...</msg> +<status status="PASS" starttime="20210602 14:11:21.575" endtime="20210602 14:11:21.577"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:21.554" endtime="20210602 14:11:21.578"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:20.960" endtime="20210602 14:11:21.578"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${addTestClentIPFlag}==1</arg> +<arg>AddLocalIPObject</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.578" endtime="20210602 14:11:21.579"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>ApiLoginAndAddLocalIP</arg> +</arguments> +<msg timestamp="20210602 14:11:21.579" level="INFO">ApiLoginAndAddLocalIP</msg> +<status status="PASS" starttime="20210602 14:11:21.579" endtime="20210602 14:11:21.580"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${addTsgUIAPIFlag}==1</arg> +<arg>SecurityPolicyAllowTSGUIAPIAdd</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.580" endtime="20210602 14:11:21.580"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:20.958" endtime="20210602 14:11:21.580"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:20.957" endtime="20210602 14:11:21.581"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:20.957" endtime="20210602 14:11:21.581"></status> +</kw> +<suite id="s1-s1" name="Case" source="C:\Users\admin\Desktop\gap_tsg_api\gap_tsg_api\case"> +<suite id="s1-s1-s1" name="Security" source="C:\Users\admin\Desktop\gap_tsg_api\gap_tsg_api\case\security"> +<suite id="s1-s1-s1-s1" name="Http" source="C:\Users\admin\Desktop\gap_tsg_api\gap_tsg_api\case\security\http"> +<suite id="s1-s1-s1-s1-s1" name="Demo" source="C:\Users\admin\Desktop\gap_tsg_api\gap_tsg_api\case\security\http\demo.robot"> +<test id="s1-s1-s1-s1-s1-t1" name="policy_http_allow"> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>${TEST NAME}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.693" level="INFO">policy_http_allow</msg> +<status status="PASS" starttime="20210602 14:11:21.692" endtime="20210602 14:11:21.694"></status> +</kw> +<kw name="PolilcysByTemplate" library="policy"> +<doc>根据测试数据文件,使用对应公共模板,创建策略及策略相关数据:策略信息,对象信息,引用文件信息,返回本策略创建的策略及策略相关数据,用于teamdow删除</doc> +<arguments> +<arg>${path}/data/security/http/demo_data.yaml</arg> +<arg>${TEST NAME}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${policyIds}</var> +</assign> +<kw name="Get File" library="OperatingSystem"> +<doc>Returns the contents of a specified file.</doc> +<arguments> +<arg>${dataFilePath}</arg> +</arguments> +<assign> +<var>${yamlData}</var> +</assign> +<msg timestamp="20210602 14:11:21.695" level="INFO" html="yes">Getting file '<a href="file://C:\Users\admin\Desktop\gap_tsg_api\gap_tsg_api\other\data\security\http\demo_data.yaml">C:\Users\admin\Desktop\gap_tsg_api\gap_tsg_api\other\data\security\http\demo_data.yaml</a>'.</msg> +<msg timestamp="20210602 14:11:21.696" level="INFO">${yamlData} = #policy:{"opAction":"add","refuseCode":true,"policyList":{"policyId":"","policyName":"dxytest","policyType":"tsg_security","action":"allow","userTags":"","doBlacklist":0,"doLog":1,"policyDesc":"","eff...</msg> +<status status="PASS" starttime="20210602 14:11:21.695" endtime="20210602 14:11:21.696"></status> +</kw> +<kw name="Safe Load" library="yaml"> +<doc>Parse the first YAML document in a stream +and produce the corresponding Python object.</doc> +<arguments> +<arg>${yamlData}</arg> +</arguments> +<assign> +<var>${loadedData}</var> +</assign> +<msg timestamp="20210602 14:11:21.765" level="INFO">${loadedData} = {'policy_http_allow_data': [{'opAction': 'add', 'returnData': 1, 'policyName': 'autotestmonitor', 'policyType': 'tsg_security', 'action': 'monitor', 'userTags': '', 'doBlacklist': 0, 'doLog': 1, 'poli...</msg> +<status status="PASS" starttime="20210602 14:11:21.696" endtime="20210602 14:11:21.765"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${loadedData}</arg> +<arg>${keyword}_data</arg> +</arguments> +<assign> +<var>${policyList}</var> +</assign> +<msg timestamp="20210602 14:11:21.766" level="INFO">${policyList} = [{'opAction': 'add', 'returnData': 1, 'policyName': 'autotestmonitor', 'policyType': 'tsg_security', 'action': 'monitor', 'userTags': '', 'doBlacklist': 0, 'doLog': 1, 'policyDesc': 'autotest', 'effec...</msg> +<status status="PASS" starttime="20210602 14:11:21.766" endtime="20210602 14:11:21.766"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIds}</var> +</assign> +<msg timestamp="20210602 14:11:21.767" level="INFO">${objectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:21.767" endtime="20210602 14:11:21.767"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${policyIds}</var> +</assign> +<msg timestamp="20210602 14:11:21.768" level="INFO">${policyIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:21.767" endtime="20210602 14:11:21.768"></status> +</kw> +<kw name="${key} IN [ @{policyList} ]" type="for"> +<kw name="${key} = {'opAction': 'add', 'returnData': 1, 'policyName': 'autotestmonitor', 'policyType': 'tsg_security', 'action': 'monitor', 'userTags': '', 'doBlacklist': 0, 'doLog': 1, 'policyDesc': 'autotest', 'effect..." type="foritem"> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>passssssssss</arg> +</arguments> +<msg timestamp="20210602 14:11:21.769" level="INFO">passssssssss</msg> +<status status="PASS" starttime="20210602 14:11:21.769" endtime="20210602 14:11:21.769"></status> +</kw> +<kw name="CreatePolicysAndObjects" library="policy"> +<doc>组织单个策略数据${modleFilePath}策略模板文件路径 ${policyData}从数据文件中获取的单个策略数据</doc> +<arguments> +<arg>${key}</arg> +<arg>${keyword}</arg> +</arguments> +<assign> +<var>${objectId}</var> +<var>${policyId}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>获取模板</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.775" endtime="20210602 14:11:21.775"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${policyModeJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.775" endtime="20210602 14:11:21.776"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${policyModeJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<msg timestamp="20210602 14:11:21.777" level="INFO">${policyJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...</msg> +<status status="PASS" starttime="20210602 14:11:21.776" endtime="20210602 14:11:21.777"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>用data数据替换模板内容生成策略新增数据</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.777" endtime="20210602 14:11:21.778"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>condation</arg> +</arguments> +<assign> +<var>${condation}</var> +</assign> +<msg timestamp="20210602 14:11:21.779" level="INFO">${condation} = [{'protocolField': None, 'objectType': 'subscriberid', 'objectSubType': 'subscriberid', 'objList': [{'addItemList': [{'keywordArray': '$abce'}, {'keywordArray': '$abce1234'}]}, {'addItemList': [{'keyw...</msg> +<status status="PASS" starttime="20210602 14:11:21.778" endtime="20210602 14:11:21.779"></status> +</kw> +<kw name="CreateCondation" library="policy"> +<doc>解析策略条件,根据key值判断其在source、destation、filter中</doc> +<arguments> +<arg>${condation}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${sourceList}</var> +<var>${destinationList}</var> +<var>${filterList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>循环读取对象list</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.779" endtime="20210602 14:11:21.780"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${sourceList}</var> +</assign> +<msg timestamp="20210602 14:11:21.780" level="INFO">${sourceList} = []</msg> +<status status="PASS" starttime="20210602 14:11:21.780" endtime="20210602 14:11:21.780"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${destinationList}</var> +</assign> +<msg timestamp="20210602 14:11:21.781" level="INFO">${destinationList} = []</msg> +<status status="PASS" starttime="20210602 14:11:21.781" endtime="20210602 14:11:21.781"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${filterList}</var> +</assign> +<msg timestamp="20210602 14:11:21.782" level="INFO">${filterList} = []</msg> +<status status="PASS" starttime="20210602 14:11:21.781" endtime="20210602 14:11:21.782"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIdsList}</var> +</assign> +<msg timestamp="20210602 14:11:21.782" level="INFO">${objectIdsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:21.782" endtime="20210602 14:11:21.783"></status> +</kw> +<kw name="${key} IN [ @{objectListData} ]" type="for"> +<kw name="${key} = {'protocolField': None, 'objectType': 'subscriberid', 'objectSubType': 'subscriberid', 'objList': [{'addItemList': [{'keywordArray': '$abce'}, {'keywordArray': '$abce1234'}]}, {'addItemList': [{'keywo..." type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${key}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:21.784" level="INFO">${protocolField} = None</msg> +<status status="PASS" starttime="20210602 14:11:21.783" endtime="20210602 14:11:21.784"></status> +</kw> +<kw name="CreateObjectList" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${key}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.785" endtime="20210602 14:11:21.785"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:21.785" level="INFO">${protocolField} = None</msg> +<status status="PASS" starttime="20210602 14:11:21.785" endtime="20210602 14:11:21.785"></status> +</kw> +<kw name="CreateObjects" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.786" endtime="20210602 14:11:21.786"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:21.787" level="INFO">${protocolField} = None</msg> +<status status="PASS" starttime="20210602 14:11:21.787" endtime="20210602 14:11:21.787"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objList</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:21.788" level="INFO">${objList} = [{'addItemList': [{'keywordArray': '$abce'}, {'keywordArray': '$abce1234'}]}, {'addItemList': [{'keywordArray': '$abce!@#$%^&*()_+'}, {'keywordArray': '$1234'}]}]</msg> +<status status="PASS" starttime="20210602 14:11:21.787" endtime="20210602 14:11:21.788"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${objJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.789" endtime="20210602 14:11:21.789"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objModeJson}</arg> +</arguments> +<assign> +<var>${objJson}</var> +</assign> +<msg timestamp="20210602 14:11:21.790" level="INFO">${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:21.789" endtime="20210602 14:11:21.790"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objListMode}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:21.791" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:21.790" endtime="20210602 14:11:21.791"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.792" endtime="20210602 14:11:21.792"></status> +</kw> +<msg timestamp="20210602 14:11:21.792" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:21.792" level="INFO">${objectType} = subscriberid</msg> +<status status="PASS" starttime="20210602 14:11:21.791" endtime="20210602 14:11:21.793"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.794" endtime="20210602 14:11:21.794"></status> +</kw> +<msg timestamp="20210602 14:11:21.795" level="INFO">${objectJson} = [{"objectId": null, "objectType":"subscriberid", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": ...</msg> +<status status="PASS" starttime="20210602 14:11:21.793" endtime="20210602 14:11:21.795"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectSubType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.796" endtime="20210602 14:11:21.796"></status> +</kw> +<msg timestamp="20210602 14:11:21.796" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:21.796" level="INFO">${objectSubType} = subscriberid</msg> +<status status="PASS" starttime="20210602 14:11:21.795" endtime="20210602 14:11:21.796"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.797" endtime="20210602 14:11:21.798"></status> +</kw> +<msg timestamp="20210602 14:11:21.798" level="INFO">${objectJson} = [{"objectId": null, "objectType":"subscriberid", "objectSubType":"subscriberid", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc...</msg> +<status status="PASS" starttime="20210602 14:11:21.797" endtime="20210602 14:11:21.798"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<msg timestamp="20210602 14:11:21.799" level="FAIL">Dictionary does not contain key 'objectId'.</msg> +<status status="FAIL" starttime="20210602 14:11:21.799" endtime="20210602 14:11:21.799"></status> +</kw> +<msg timestamp="20210602 14:11:21.800" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:21.800" level="INFO">${objectId} = Dictionary does not contain key 'objectId'.</msg> +<status status="PASS" starttime="20210602 14:11:21.798" endtime="20210602 14:11:21.800"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectId": null</arg> +<arg>"objectId":${objectId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.801" endtime="20210602 14:11:21.801"></status> +</kw> +<msg timestamp="20210602 14:11:21.801" level="INFO">${objectJson} = [{"objectId": null, "objectType":"subscriberid", "objectSubType":"subscriberid", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc...</msg> +<status status="PASS" starttime="20210602 14:11:21.800" endtime="20210602 14:11:21.801"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"option": "update"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.802" endtime="20210602 14:11:21.802"></status> +</kw> +<msg timestamp="20210602 14:11:21.803" level="INFO">${objectJson} = [{"objectId": null, "objectType":"subscriberid", "objectSubType":"subscriberid", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc...</msg> +<status status="PASS" starttime="20210602 14:11:21.802" endtime="20210602 14:11:21.803"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectJsonList}</var> +</assign> +<msg timestamp="20210602 14:11:21.803" level="INFO">${objectJsonList} = []</msg> +<status status="PASS" starttime="20210602 14:11:21.803" endtime="20210602 14:11:21.804"></status> +</kw> +<kw name="Evaluate" library="BuiltIn"> +<doc>Evaluates the given expression in Python and returns the results.</doc> +<arguments> +<arg>type(${objList})</arg> +</arguments> +<assign> +<var>${objListType}</var> +</assign> +<msg timestamp="20210602 14:11:21.809" level="INFO">${objListType} = <class 'list'></msg> +<status status="PASS" starttime="20210602 14:11:21.804" endtime="20210602 14:11:21.809"></status> +</kw> +<kw name="${obj} IN [ @{objList} ]" type="for"> +<kw name="${obj} = {'addItemList': [{'keywordArray': '$abce'}, {'keywordArray': '$abce1234'}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.811" endtime="20210602 14:11:21.812"></status> +</kw> +<msg timestamp="20210602 14:11:21.812" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:21.812" level="INFO">${addItemList} = [{'keywordArray': '$abce'}, {'keywordArray': '$abce1234'}]</msg> +<status status="PASS" starttime="20210602 14:11:21.811" endtime="20210602 14:11:21.812"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:21.813" level="INFO">${addItemList} = [{"keywordArray": "$abce"}, {"keywordArray": "$abce1234"}]</msg> +<status status="PASS" starttime="20210602 14:11:21.812" endtime="20210602 14:11:21.813"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.814" endtime="20210602 14:11:21.814"></status> +</kw> +<msg timestamp="20210602 14:11:21.814" level="INFO">${addItemList} = [{"keywordArray": "$abce"}, {"keywordArray": "$abce1234"}]</msg> +<status status="PASS" starttime="20210602 14:11:21.813" endtime="20210602 14:11:21.814"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.815" endtime="20210602 14:11:21.816"></status> +</kw> +<msg timestamp="20210602 14:11:21.816" level="INFO">${addItemList} = [{"keywordArray": "$abce"}, {"keywordArray": "$abce1234"}]</msg> +<status status="PASS" starttime="20210602 14:11:21.815" endtime="20210602 14:11:21.816"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.817" endtime="20210602 14:11:21.817"></status> +</kw> +<msg timestamp="20210602 14:11:21.817" level="INFO">${objectJson} = [{"objectId": null, "objectType":"subscriberid", "objectSubType":"subscriberid", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc...</msg> +<status status="PASS" starttime="20210602 14:11:21.816" endtime="20210602 14:11:21.817"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:21.818" level="INFO">${objectJson} = [{"objectId": null, "objectType":"subscriberid", "objectSubType":"subscriberid", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc...</msg> +<status status="PASS" starttime="20210602 14:11:21.818" endtime="20210602 14:11:21.818"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:21.819" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'subscriberid', 'objectSubType': 'subscriberid', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectId...</msg> +<status status="PASS" starttime="20210602 14:11:21.818" endtime="20210602 14:11:21.819"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.830" endtime="20210602 14:11:21.830"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.831" endtime="20210602 14:11:21.831"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'subscriberid', 'objectSubType': 'subscriberid', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.832" endtime="20210602 14:11:21.832"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:21.832" endtime="20210602 14:11:21.832"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:21.831" endtime="20210602 14:11:21.832"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:21.830" endtime="20210602 14:11:21.833"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:21.810" endtime="20210602 14:11:21.833"></status> +</kw> +<kw name="${obj} = {'addItemList': [{'keywordArray': '$abce!@#$%^&*()_+'}, {'keywordArray': '$1234'}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.834" endtime="20210602 14:11:21.834"></status> +</kw> +<msg timestamp="20210602 14:11:21.834" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:21.835" level="INFO">${addItemList} = [{'keywordArray': '$abce!@#$%^&*()_+'}, {'keywordArray': '$1234'}]</msg> +<status status="PASS" starttime="20210602 14:11:21.833" endtime="20210602 14:11:21.835"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:21.835" level="INFO">${addItemList} = [{"keywordArray": "$abce!@#$%^&*()_+"}, {"keywordArray": "$1234"}]</msg> +<status status="PASS" starttime="20210602 14:11:21.835" endtime="20210602 14:11:21.835"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.836" endtime="20210602 14:11:21.836"></status> +</kw> +<msg timestamp="20210602 14:11:21.837" level="INFO">${addItemList} = [{"keywordArray": "$abce!@#$%^&*()_+"}, {"keywordArray": "$1234"}]</msg> +<status status="PASS" starttime="20210602 14:11:21.836" endtime="20210602 14:11:21.837"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.839" endtime="20210602 14:11:21.839"></status> +</kw> +<msg timestamp="20210602 14:11:21.839" level="INFO">${addItemList} = [{"keywordArray": "$abce!@#$%^&*()_+"}, {"keywordArray": "$1234"}]</msg> +<status status="PASS" starttime="20210602 14:11:21.838" endtime="20210602 14:11:21.840"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.840" endtime="20210602 14:11:21.841"></status> +</kw> +<msg timestamp="20210602 14:11:21.841" level="INFO">${objectJson} = [{"objectId": null, "objectType":"subscriberid", "objectSubType":"subscriberid", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc...</msg> +<status status="PASS" starttime="20210602 14:11:21.840" endtime="20210602 14:11:21.841"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:21.842" level="INFO">${objectJson} = [{"objectId": null, "objectType":"subscriberid", "objectSubType":"subscriberid", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc...</msg> +<status status="PASS" starttime="20210602 14:11:21.841" endtime="20210602 14:11:21.842"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:21.842" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'subscriberid', 'objectSubType': 'subscriberid', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectId...</msg> +<status status="PASS" starttime="20210602 14:11:21.842" endtime="20210602 14:11:21.843"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.854" endtime="20210602 14:11:21.854"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.854" endtime="20210602 14:11:21.854"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'subscriberid', 'objectSubType': 'subscriberid', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.855" endtime="20210602 14:11:21.855"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:21.855" endtime="20210602 14:11:21.856"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:21.855" endtime="20210602 14:11:21.856"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:21.853" endtime="20210602 14:11:21.856"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:21.833" endtime="20210602 14:11:21.856"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:21.810" endtime="20210602 14:11:21.856"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>opAction=add</arg> +<arg>returnData=1</arg> +<arg>objectList=${objectJsonList}</arg> +</arguments> +<assign> +<var>${objectData}</var> +</assign> +<msg timestamp="20210602 14:11:21.858" level="INFO">${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'subscriberid', 'objectSubType': 'subscriberid', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName':...</msg> +<status status="PASS" starttime="20210602 14:11:21.857" endtime="20210602 14:11:21.858"></status> +</kw> +<kw name="createObject" library="object"> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${rescode}</var> +<var>${objectIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${ipList}对象dict</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.859" endtime="20210602 14:11:21.859"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建IP</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:21.859" endtime="20210602 14:11:21.860"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${ipList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:21.861" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:21.860" endtime="20210602 14:11:21.861"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${ipList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:21.861" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "subscriberid", "objectSubType": "subscriberid", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName":...</msg> +<status status="PASS" starttime="20210602 14:11:21.861" endtime="20210602 14:11:21.862"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${objectUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:21.863" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:21.862" endtime="20210602 14:11:21.863"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:21.864" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v1, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:21.863" endtime="20210602 14:11:21.864"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:21.865" level="INFO">POST Request using : uri=/policy/object, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "subscriberid", "objectSubType": "subscriberid", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"keywordArray": "$abce"}, {"keywordArray": "$abce1234"}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}, {"objectId": null, "objectType": "subscriberid", "objectSubType": "subscriberid", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"keywordArray": "$abce"}, {"keywordArray": "$abce1234"}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]} +json=None</msg> +<msg timestamp="20210602 14:11:22.149" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:21.864" endtime="20210602 14:11:22.149"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:22.151" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:22.151" endtime="20210602 14:11:22.152"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:22.152" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:22.152" endtime="20210602 14:11:22.153"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:22.153" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "objectList" : [ { + "addItemList" : [ { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:21", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "abce" ], + "itemId" : 10074647, + "objectId" : 107866 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:21", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "abce1234" ], + "itemId" : 10074648, + "objectId" : 107866 + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107866, + "objectName" : "auttest单ip指定端口", + "objectType" : "subscriberid", + "opTime" : "2021-06-02 14:11:21", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + }, { + "addItemList" : [ { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:21", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "abce" ], + "itemId" : 10074649, + "objectId" : 107867 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:21", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "abce1234" ], + "itemId" : 10074650, + "objectId" : 107867 + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107867, + "objectName" : "auttest单ip指定端口", + "objectType" : "subscriberid", + "opTime" : "2021-06-02 14:11:21", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:22.154" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:22.154" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:21', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:22.153" endtime="20210602 14:11:22.154"></status> +</kw> +<msg timestamp="20210602 14:11:22.154" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:21', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:21.862" endtime="20210602 14:11:22.154"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>getObjectListIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${objectIds}</var> +</assign> +<kw name="getObjectListIds" library="process_object_body"> +<doc>获取结果中的对象ID</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>Call Get-ObjectIds</arg> +</arguments> +<msg timestamp="20210602 14:11:22.156" level="INFO">Call Get-ObjectIds</msg> +<status status="PASS" starttime="20210602 14:11:22.156" endtime="20210602 14:11:22.156"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIds}</var> +</assign> +<msg timestamp="20210602 14:11:22.157" level="INFO">${objectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:22.156" endtime="20210602 14:11:22.157"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${objectIdsTemp}</var> +</assign> +<msg timestamp="20210602 14:11:22.157" level="INFO">${objectIdsTemp} = </msg> +<status status="PASS" starttime="20210602 14:11:22.157" endtime="20210602 14:11:22.157"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${data}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.158" endtime="20210602 14:11:22.158"></status> +</kw> +<msg timestamp="20210602 14:11:22.159" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:22.159" level="INFO">${data} = {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:21', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['a...</msg> +<status status="PASS" starttime="20210602 14:11:22.158" endtime="20210602 14:11:22.159"></status> +</kw> +<kw name="Return From Keyword If" library="BuiltIn"> +<doc>Returns from the enclosing user keyword if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"=="FAIL"</arg> +<arg>${objectIdsTemp}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.160" endtime="20210602 14:11:22.160"></status> +</kw> +<kw name="${object} IN [ @{value['data']['objectList']} ]" type="for"> +<kw name="${object} = {'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:21', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['abce'], 'itemId':..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.161" endtime="20210602 14:11:22.161"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:22.160" endtime="20210602 14:11:22.161"></status> +</kw> +<kw name="${object} = {'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:21', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['abce'], 'itemId':..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.162" endtime="20210602 14:11:22.162"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:22.161" endtime="20210602 14:11:22.162"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:22.160" endtime="20210602 14:11:22.162"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:22.155" endtime="20210602 14:11:22.163"></status> +</kw> +<msg timestamp="20210602 14:11:22.163" level="INFO">${objectIds} = [107866, 107867]</msg> +<status status="PASS" starttime="20210602 14:11:22.155" endtime="20210602 14:11:22.163"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:22.164" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:22.163" endtime="20210602 14:11:22.164"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:22.165" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:22.164" endtime="20210602 14:11:22.165"></status> +</kw> +<msg timestamp="20210602 14:11:22.165" level="INFO">${rescode} = 200</msg> +<msg timestamp="20210602 14:11:22.165" level="INFO">${objectIds} = [107866, 107867]</msg> +<status status="PASS" starttime="20210602 14:11:21.858" endtime="20210602 14:11:22.165"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:22.166" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:22.166" endtime="20210602 14:11:22.166"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${protocolField}</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:22.167" level="INFO">${protocolField} = None</msg> +<status status="PASS" starttime="20210602 14:11:22.166" endtime="20210602 14:11:22.167"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectsList}</var> +</assign> +<msg timestamp="20210602 14:11:22.167" level="INFO">${objectsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:22.167" endtime="20210602 14:11:22.168"></status> +</kw> +<kw name="${obj} IN [ @{objectIds} ]" type="for"> +<kw name="${obj} = 107866" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:22.169" level="INFO">${objectList} = {'objectId': 107866, 'protocolField': None}</msg> +<status status="PASS" starttime="20210602 14:11:22.168" endtime="20210602 14:11:22.169"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.169" endtime="20210602 14:11:22.169"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:22.168" endtime="20210602 14:11:22.170"></status> +</kw> +<kw name="${obj} = 107867" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:22.170" level="INFO">${objectList} = {'objectId': 107866, 'protocolField': None}</msg> +<status status="PASS" starttime="20210602 14:11:22.170" endtime="20210602 14:11:22.171"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.171" endtime="20210602 14:11:22.171"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:22.170" endtime="20210602 14:11:22.171"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:22.168" endtime="20210602 14:11:22.172"></status> +</kw> +<msg timestamp="20210602 14:11:22.172" level="INFO">${objectIds} = [107866, 107867]</msg> +<msg timestamp="20210602 14:11:22.172" level="INFO">${objectList} = {'objectId': 107866, 'protocolField': None}</msg> +<status status="PASS" starttime="20210602 14:11:21.786" endtime="20210602 14:11:22.172"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>OrangeFilter</arg> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.174" endtime="20210602 14:11:22.174"></status> +</kw> +<msg timestamp="20210602 14:11:22.174" level="INFO">${objectList} = {'objectId': 107866, 'protocolField': None}</msg> +<status status="PASS" starttime="20210602 14:11:22.173" endtime="20210602 14:11:22.175"></status> +</kw> +<msg timestamp="20210602 14:11:22.175" level="INFO">${objectIds} = [107866, 107867]</msg> +<msg timestamp="20210602 14:11:22.175" level="INFO">${objectList} = {'objectId': 107866, 'protocolField': None}</msg> +<status status="PASS" starttime="20210602 14:11:21.784" endtime="20210602 14:11:22.175"></status> +</kw> +<kw name="Get Length" library="BuiltIn"> +<doc>Returns and logs the length of the given item as an integer.</doc> +<arguments> +<arg>${objectIdsList}</arg> +</arguments> +<assign> +<var>${len}</var> +</assign> +<msg timestamp="20210602 14:11:22.176" level="INFO">Length is 0</msg> +<msg timestamp="20210602 14:11:22.176" level="INFO">${len} = 0</msg> +<status status="PASS" starttime="20210602 14:11:22.176" endtime="20210602 14:11:22.176"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${len} != 0</arg> +<arg>AppendListToList</arg> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectIds}</arg> +</arguments> +<assign> +<var>${objectIdsList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectIds}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.177" endtime="20210602 14:11:22.177"></status> +</kw> +<msg timestamp="20210602 14:11:22.177" level="INFO">${objectIdsList} = [107866, 107867]</msg> +<status status="PASS" starttime="20210602 14:11:22.177" endtime="20210602 14:11:22.178"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Append To List</arg> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Append To List</arg> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>Append To List</arg> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.179" endtime="20210602 14:11:22.179"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:22.178" endtime="20210602 14:11:22.180"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:21.783" endtime="20210602 14:11:22.180"></status> +</kw> +<kw name="${key} = {'protocolField': 'TSG_SECURITY_SOURCE_ADDR', 'objectType': 'ip', 'objectSubType': 'endpoint', 'objList': [{'addItemList': [{'ip': '255.255.255.255', 'port': '0-65535'}, {'ip': '255.255.255.255', 'por..." type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${key}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:22.181" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:22.180" endtime="20210602 14:11:22.181"></status> +</kw> +<kw name="CreateObjectList" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${key}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.182" endtime="20210602 14:11:22.182"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:22.183" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:22.182" endtime="20210602 14:11:22.183"></status> +</kw> +<kw name="CreateObjects" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.183" endtime="20210602 14:11:22.184"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:22.184" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:22.184" endtime="20210602 14:11:22.184"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objList</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:22.185" level="INFO">${objList} = [{'addItemList': [{'ip': '255.255.255.255', 'port': '0-65535'}, {'ip': '255.255.255.255', 'port': '1-65535'}]}, {'addItemList': [{'ip': '255.255.255.1-255.255.255.255', 'port': '0-65535'}, {'ip': '255...</msg> +<status status="PASS" starttime="20210602 14:11:22.185" endtime="20210602 14:11:22.185"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${objJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.185" endtime="20210602 14:11:22.186"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objModeJson}</arg> +</arguments> +<assign> +<var>${objJson}</var> +</assign> +<msg timestamp="20210602 14:11:22.186" level="INFO">${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:22.186" endtime="20210602 14:11:22.187"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objListMode}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:22.187" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:22.187" endtime="20210602 14:11:22.187"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.188" endtime="20210602 14:11:22.188"></status> +</kw> +<msg timestamp="20210602 14:11:22.189" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:22.189" level="INFO">${objectType} = ip</msg> +<status status="PASS" starttime="20210602 14:11:22.188" endtime="20210602 14:11:22.189"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.190" endtime="20210602 14:11:22.190"></status> +</kw> +<msg timestamp="20210602 14:11:22.190" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "s...</msg> +<status status="PASS" starttime="20210602 14:11:22.189" endtime="20210602 14:11:22.190"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectSubType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.191" endtime="20210602 14:11:22.191"></status> +</kw> +<msg timestamp="20210602 14:11:22.192" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:22.192" level="INFO">${objectSubType} = endpoint</msg> +<status status="PASS" starttime="20210602 14:11:22.191" endtime="20210602 14:11:22.192"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.193" endtime="20210602 14:11:22.193"></status> +</kw> +<msg timestamp="20210602 14:11:22.193" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...</msg> +<status status="PASS" starttime="20210602 14:11:22.192" endtime="20210602 14:11:22.194"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<msg timestamp="20210602 14:11:22.195" level="FAIL">Dictionary does not contain key 'objectId'.</msg> +<status status="FAIL" starttime="20210602 14:11:22.194" endtime="20210602 14:11:22.195"></status> +</kw> +<msg timestamp="20210602 14:11:22.195" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:22.195" level="INFO">${objectId} = Dictionary does not contain key 'objectId'.</msg> +<status status="PASS" starttime="20210602 14:11:22.194" endtime="20210602 14:11:22.195"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectId": null</arg> +<arg>"objectId":${objectId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.196" endtime="20210602 14:11:22.196"></status> +</kw> +<msg timestamp="20210602 14:11:22.197" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...</msg> +<status status="PASS" starttime="20210602 14:11:22.196" endtime="20210602 14:11:22.197"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"option": "update"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.198" endtime="20210602 14:11:22.198"></status> +</kw> +<msg timestamp="20210602 14:11:22.198" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...</msg> +<status status="PASS" starttime="20210602 14:11:22.197" endtime="20210602 14:11:22.198"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectJsonList}</var> +</assign> +<msg timestamp="20210602 14:11:22.199" level="INFO">${objectJsonList} = []</msg> +<status status="PASS" starttime="20210602 14:11:22.199" endtime="20210602 14:11:22.199"></status> +</kw> +<kw name="Evaluate" library="BuiltIn"> +<doc>Evaluates the given expression in Python and returns the results.</doc> +<arguments> +<arg>type(${objList})</arg> +</arguments> +<assign> +<var>${objListType}</var> +</assign> +<msg timestamp="20210602 14:11:22.200" level="INFO">${objListType} = <class 'list'></msg> +<status status="PASS" starttime="20210602 14:11:22.199" endtime="20210602 14:11:22.200"></status> +</kw> +<kw name="${obj} IN [ @{objList} ]" type="for"> +<kw name="${obj} = {'addItemList': [{'ip': '255.255.255.255', 'port': '0-65535'}, {'ip': '255.255.255.255', 'port': '1-65535'}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.201" endtime="20210602 14:11:22.201"></status> +</kw> +<msg timestamp="20210602 14:11:22.202" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:22.202" level="INFO">${addItemList} = [{'ip': '255.255.255.255', 'port': '0-65535'}, {'ip': '255.255.255.255', 'port': '1-65535'}]</msg> +<status status="PASS" starttime="20210602 14:11:22.201" endtime="20210602 14:11:22.202"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:22.203" level="INFO">${addItemList} = [{"ip": "255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.255", "port": "1-65535"}]</msg> +<status status="PASS" starttime="20210602 14:11:22.202" endtime="20210602 14:11:22.203"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.203" endtime="20210602 14:11:22.204"></status> +</kw> +<msg timestamp="20210602 14:11:22.204" level="INFO">${addItemList} = [{"ip": "255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.255", "port": "1-65535"}]</msg> +<status status="PASS" starttime="20210602 14:11:22.203" endtime="20210602 14:11:22.204"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.205" endtime="20210602 14:11:22.205"></status> +</kw> +<msg timestamp="20210602 14:11:22.205" level="INFO">${addItemList} = [{"ip": "255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.255", "port": "1-65535"}]</msg> +<status status="PASS" starttime="20210602 14:11:22.204" endtime="20210602 14:11:22.206"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.206" endtime="20210602 14:11:22.207"></status> +</kw> +<msg timestamp="20210602 14:11:22.207" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...</msg> +<status status="PASS" starttime="20210602 14:11:22.206" endtime="20210602 14:11:22.207"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:22.208" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...</msg> +<status status="PASS" starttime="20210602 14:11:22.208" endtime="20210602 14:11:22.208"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:22.209" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addIt...</msg> +<status status="PASS" starttime="20210602 14:11:22.208" endtime="20210602 14:11:22.209"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.221" endtime="20210602 14:11:22.221"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.221" endtime="20210602 14:11:22.222"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addIte..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.222" endtime="20210602 14:11:22.223"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:22.222" endtime="20210602 14:11:22.223"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:22.222" endtime="20210602 14:11:22.223"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:22.220" endtime="20210602 14:11:22.223"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:22.200" endtime="20210602 14:11:22.224"></status> +</kw> +<kw name="${obj} = {'addItemList': [{'ip': '255.255.255.1-255.255.255.255', 'port': '0-65535'}, {'ip': '255.255.255.2/24', 'port': '1-65535'}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.225" endtime="20210602 14:11:22.225"></status> +</kw> +<msg timestamp="20210602 14:11:22.225" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:22.225" level="INFO">${addItemList} = [{'ip': '255.255.255.1-255.255.255.255', 'port': '0-65535'}, {'ip': '255.255.255.2/24', 'port': '1-65535'}]</msg> +<status status="PASS" starttime="20210602 14:11:22.224" endtime="20210602 14:11:22.225"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:22.227" level="INFO">${addItemList} = [{"ip": "255.255.255.1-255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.2/24", "port": "1-65535"}]</msg> +<status status="PASS" starttime="20210602 14:11:22.226" endtime="20210602 14:11:22.227"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.227" endtime="20210602 14:11:22.228"></status> +</kw> +<msg timestamp="20210602 14:11:22.228" level="INFO">${addItemList} = [{"ip": "255.255.255.1-255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.2/24", "port": "1-65535"}]</msg> +<status status="PASS" starttime="20210602 14:11:22.227" endtime="20210602 14:11:22.228"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.229" endtime="20210602 14:11:22.229"></status> +</kw> +<msg timestamp="20210602 14:11:22.230" level="INFO">${addItemList} = [{"ip": "255.255.255.1-255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.2/24", "port": "1-65535"}]</msg> +<status status="PASS" starttime="20210602 14:11:22.228" endtime="20210602 14:11:22.230"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.231" endtime="20210602 14:11:22.231"></status> +</kw> +<msg timestamp="20210602 14:11:22.231" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...</msg> +<status status="PASS" starttime="20210602 14:11:22.230" endtime="20210602 14:11:22.231"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:22.232" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...</msg> +<status status="PASS" starttime="20210602 14:11:22.232" endtime="20210602 14:11:22.232"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:22.233" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addIt...</msg> +<status status="PASS" starttime="20210602 14:11:22.233" endtime="20210602 14:11:22.233"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.243" endtime="20210602 14:11:22.243"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.244" endtime="20210602 14:11:22.244"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addIte..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.245" endtime="20210602 14:11:22.245"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:22.244" endtime="20210602 14:11:22.245"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:22.244" endtime="20210602 14:11:22.245"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:22.243" endtime="20210602 14:11:22.246"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:22.224" endtime="20210602 14:11:22.246"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:22.200" endtime="20210602 14:11:22.246"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>opAction=add</arg> +<arg>returnData=1</arg> +<arg>objectList=${objectJsonList}</arg> +</arguments> +<assign> +<var>${objectData}</var> +</assign> +<msg timestamp="20210602 14:11:22.248" level="INFO">${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定...</msg> +<status status="PASS" starttime="20210602 14:11:22.247" endtime="20210602 14:11:22.248"></status> +</kw> +<kw name="createObject" library="object"> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${rescode}</var> +<var>${objectIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${ipList}对象dict</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.249" endtime="20210602 14:11:22.249"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建IP</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:22.249" endtime="20210602 14:11:22.250"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${ipList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:22.250" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:22.250" endtime="20210602 14:11:22.251"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${ipList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:22.251" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u535...</msg> +<status status="PASS" starttime="20210602 14:11:22.251" endtime="20210602 14:11:22.251"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${objectUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:22.252" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:22.252" endtime="20210602 14:11:22.253"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:22.253" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v1, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:22.253" endtime="20210602 14:11:22.254"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:22.254" level="INFO">POST Request using : uri=/policy/object, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"ip": "255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.255", "port": "1-65535"}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}, {"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"ip": "255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.255", "port": "1-65535"}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]} +json=None</msg> +<msg timestamp="20210602 14:11:25.000" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:22.254" endtime="20210602 14:11:25.001"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:25.006" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:25.003" endtime="20210602 14:11:25.007"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:25.012" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:25.009" endtime="20210602 14:11:25.013"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:25.016" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "objectList" : [ { + "addItemList" : [ { + "addrType" : 4, + "clientIp1" : "255.255.255.255", + "clientIp2" : "32", + "clientIpFormat" : "CIDR", + "clientPort1" : "0", + "clientPort2" : "65535", + "clientPortFormat" : "range", + "direction" : 0, + "ip" : "255.255.255.255", + "isInitialize" : 0, + "isSession" : "endpoint", + "isValid" : 1, + "itemDesc" : "{ \"ip\":\"255.255.255.255\" ,\"port\":\"0-65535\"}", + "itemId" : 10074651, + "itemName" : null, + "itemType" : "ip", + "objectId" : 107868, + "opTime" : "2021-06-02 14:11:24", + "opUser" : 425, + "port" : "0-65535", + "protocol" : 0, + "serverIp1" : "0.0.0.0", + "serverIp2" : "255.255.255.255", + "serverIpFormat" : "mask", + "serverPort1" : "0", + "serverPort2" : "65535", + "serverPortFormat" : "mask" + }, { + "addrType" : 4, + "clientIp1" : "255.255.255.255", + "clientIp2" : "32", + "clientIpFormat" : "CIDR", + "clientPort1" : "1", + "clientPort2" : "65535", + "clientPortFormat" : "range", + "direction" : 0, + "ip" : "255.255.255.255", + "isInitialize" : 0, + "isSession" : "endpoint", + "isValid" : 1, + "itemDesc" : "{ \"ip\":\"255.255.255.255\" ,\"port\":\"1-65535\"}", + "itemId" : 10074652, + "itemName" : null, + "itemType" : "ip", + "objectId" : 107868, + "opTime" : "2021-06-02 14:11:24", + "opUser" : 425, + "port" : "1-65535", + "protocol" : 0, + "serverIp1" : "0.0.0.0", + "serverIp2" : "255.255.255.255", + "serverIpFormat" : "mask", + "serverPort1" : "0", + "serverPort2" : "65535", + "serverPortFormat" : "mask" + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107868, + "objectName" : "auttest单ip指定端口", + "objectSubType" : "endpoint", + "objectType" : "ip", + "opTime" : "2021-06-02 14:11:21", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + }, { + "addItemList" : [ { + "addrType" : 4, + "clientIp1" : "255.255.255.255", + "clientIp2" : "32", + "clientIpFormat" : "CIDR", + "clientPort1" : "0", + "clientPort2" : "65535", + "clientPortFormat" : "range", + "direction" : 0, + "ip" : "255.255.255.255", + "isInitialize" : 0, + "isSession" : "endpoint", + "isValid" : 1, + "itemDesc" : "{ \"ip\":\"255.255.255.255\" ,\"port\":\"0-65535\"}", + "itemId" : 10074653, + "itemName" : null, + "itemType" : "ip", + "objectId" : 107869, + "opTime" : "2021-06-02 14:11:24", + "opUser" : 425, + "port" : "0-65535", + "protocol" : 0, + "serverIp1" : "0.0.0.0", + "serverIp2" : "255.255.255.255", + "serverIpFormat" : "mask", + "serverPort1" : "0", + "serverPort2" : "65535", + "serverPortFormat" : "mask" + }, { + "addrType" : 4, + "clientIp1" : "255.255.255.255", + "clientIp2" : "32", + "clientIpFormat" : "CIDR", + "clientPort1" : "1", + "clientPort2" : "65535", + "clientPortFormat" : "range", + "direction" : 0, + "ip" : "255.255.255.255", + "isInitialize" : 0, + "isSession" : "endpoint", + "isValid" : 1, + "itemDesc" : "{ \"ip\":\"255.255.255.255\" ,\"port\":\"1-65535\"}", + "itemId" : 10074654, + "itemName" : null, + "itemType" : "ip", + "objectId" : 107869, + "opTime" : "2021-06-02 14:11:24", + "opUser" : 425, + "port" : "1-65535", + "protocol" : 0, + "serverIp1" : "0.0.0.0", + "serverIp2" : "255.255.255.255", + "serverIpFormat" : "mask", + "serverPort1" : "0", + "serverPort2" : "65535", + "serverPortFormat" : "mask" + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107869, + "objectName" : "auttest单ip指定端口", + "objectSubType" : "endpoint", + "objectType" : "ip", + "opTime" : "2021-06-02 14:11:21", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:25.017" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:25.018" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.255', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '0', 'clientPort2':...</msg> +<status status="PASS" starttime="20210602 14:11:25.014" endtime="20210602 14:11:25.018"></status> +</kw> +<msg timestamp="20210602 14:11:25.019" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.255', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '0', 'clientPort2':...</msg> +<status status="PASS" starttime="20210602 14:11:22.252" endtime="20210602 14:11:25.019"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>getObjectListIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${objectIds}</var> +</assign> +<kw name="getObjectListIds" library="process_object_body"> +<doc>获取结果中的对象ID</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>Call Get-ObjectIds</arg> +</arguments> +<msg timestamp="20210602 14:11:25.023" level="INFO">Call Get-ObjectIds</msg> +<status status="PASS" starttime="20210602 14:11:25.022" endtime="20210602 14:11:25.023"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIds}</var> +</assign> +<msg timestamp="20210602 14:11:25.024" level="INFO">${objectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:25.024" endtime="20210602 14:11:25.025"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${objectIdsTemp}</var> +</assign> +<msg timestamp="20210602 14:11:25.026" level="INFO">${objectIdsTemp} = </msg> +<status status="PASS" starttime="20210602 14:11:25.025" endtime="20210602 14:11:25.027"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${data}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.028" endtime="20210602 14:11:25.028"></status> +</kw> +<msg timestamp="20210602 14:11:25.029" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:25.029" level="INFO">${data} = {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.255', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '0', 'clientPort2': '65535', 'clientPortFormat': 'range', '...</msg> +<status status="PASS" starttime="20210602 14:11:25.027" endtime="20210602 14:11:25.029"></status> +</kw> +<kw name="Return From Keyword If" library="BuiltIn"> +<doc>Returns from the enclosing user keyword if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"=="FAIL"</arg> +<arg>${objectIdsTemp}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.030" endtime="20210602 14:11:25.030"></status> +</kw> +<kw name="${object} IN [ @{value['data']['objectList']} ]" type="for"> +<kw name="${object} = {'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.255', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '0', 'clientPort2': '65535', 'clientPortFormat': 'range', 'direction': 0, '..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.031" endtime="20210602 14:11:25.032"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.031" endtime="20210602 14:11:25.032"></status> +</kw> +<kw name="${object} = {'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.255', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '0', 'clientPort2': '65535', 'clientPortFormat': 'range', 'direction': 0, '..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.033" endtime="20210602 14:11:25.033"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.032" endtime="20210602 14:11:25.034"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.030" endtime="20210602 14:11:25.034"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.021" endtime="20210602 14:11:25.034"></status> +</kw> +<msg timestamp="20210602 14:11:25.034" level="INFO">${objectIds} = [107868, 107869]</msg> +<status status="PASS" starttime="20210602 14:11:25.020" endtime="20210602 14:11:25.035"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:25.036" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:25.035" endtime="20210602 14:11:25.036"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:25.037" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:25.036" endtime="20210602 14:11:25.037"></status> +</kw> +<msg timestamp="20210602 14:11:25.037" level="INFO">${rescode} = 200</msg> +<msg timestamp="20210602 14:11:25.038" level="INFO">${objectIds} = [107868, 107869]</msg> +<status status="PASS" starttime="20210602 14:11:22.248" endtime="20210602 14:11:25.038"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:25.039" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:25.038" endtime="20210602 14:11:25.039"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${protocolField}</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${protocolField}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.040" endtime="20210602 14:11:25.041"></status> +</kw> +<msg timestamp="20210602 14:11:25.041" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:25.040" endtime="20210602 14:11:25.042"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectsList}</var> +</assign> +<msg timestamp="20210602 14:11:25.042" level="INFO">${objectsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:25.042" endtime="20210602 14:11:25.043"></status> +</kw> +<kw name="${obj} IN [ @{objectIds} ]" type="for"> +<kw name="${obj} = 107868" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:25.044" level="INFO">${objectList} = {'objectId': 107868, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:25.043" endtime="20210602 14:11:25.044"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.044" endtime="20210602 14:11:25.045"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.043" endtime="20210602 14:11:25.045"></status> +</kw> +<kw name="${obj} = 107869" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:25.046" level="INFO">${objectList} = {'objectId': 107868, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:25.045" endtime="20210602 14:11:25.046"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.047" endtime="20210602 14:11:25.047"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.045" endtime="20210602 14:11:25.047"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.043" endtime="20210602 14:11:25.048"></status> +</kw> +<msg timestamp="20210602 14:11:25.048" level="INFO">${objectIds} = [107868, 107869]</msg> +<msg timestamp="20210602 14:11:25.048" level="INFO">${objectList} = {'objectId': 107868, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:22.183" endtime="20210602 14:11:25.048"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>OrangeFilter</arg> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.050" endtime="20210602 14:11:25.050"></status> +</kw> +<msg timestamp="20210602 14:11:25.050" level="INFO">${objectList} = {'objectId': 107868, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:25.049" endtime="20210602 14:11:25.050"></status> +</kw> +<msg timestamp="20210602 14:11:25.051" level="INFO">${objectIds} = [107868, 107869]</msg> +<msg timestamp="20210602 14:11:25.051" level="INFO">${objectList} = {'objectId': 107868, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:22.181" endtime="20210602 14:11:25.051"></status> +</kw> +<kw name="Get Length" library="BuiltIn"> +<doc>Returns and logs the length of the given item as an integer.</doc> +<arguments> +<arg>${objectIdsList}</arg> +</arguments> +<assign> +<var>${len}</var> +</assign> +<msg timestamp="20210602 14:11:25.052" level="INFO">Length is 2</msg> +<msg timestamp="20210602 14:11:25.052" level="INFO">${len} = 2</msg> +<status status="PASS" starttime="20210602 14:11:25.052" endtime="20210602 14:11:25.052"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${len} != 0</arg> +<arg>AppendListToList</arg> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectIds}</arg> +</arguments> +<assign> +<var>${objectIdsList}</var> +</assign> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.063" endtime="20210602 14:11:25.064"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.064" endtime="20210602 14:11:25.064"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = 107868" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.065" endtime="20210602 14:11:25.065"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.065" endtime="20210602 14:11:25.065"></status> +</kw> +<kw name="${objdict} = 107869" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.066" endtime="20210602 14:11:25.066"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.066" endtime="20210602 14:11:25.066"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.064" endtime="20210602 14:11:25.067"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.063" endtime="20210602 14:11:25.067"></status> +</kw> +<msg timestamp="20210602 14:11:25.067" level="INFO">${objectIdsList} = [107866, 107867, 107868, 107869]</msg> +<status status="PASS" starttime="20210602 14:11:25.053" endtime="20210602 14:11:25.067"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Append To List</arg> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Append To List</arg> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>Append To List</arg> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.068" endtime="20210602 14:11:25.068"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.067" endtime="20210602 14:11:25.069"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:22.180" endtime="20210602 14:11:25.069"></status> +</kw> +<kw name="${key} = {'protocolField': 'TSG_SECURITY_SOURCE_LOCATION', 'objectType': 'ip', 'objectSubType': 'geo_location', 'objList': [{'addItemList': [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}..." type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${key}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:25.070" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_LOCATION</msg> +<status status="PASS" starttime="20210602 14:11:25.069" endtime="20210602 14:11:25.070"></status> +</kw> +<kw name="CreateObjectList" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${key}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.071" endtime="20210602 14:11:25.071"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:25.072" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_LOCATION</msg> +<status status="PASS" starttime="20210602 14:11:25.071" endtime="20210602 14:11:25.072"></status> +</kw> +<kw name="CreateObjects" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.072" endtime="20210602 14:11:25.073"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:25.073" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_LOCATION</msg> +<status status="PASS" starttime="20210602 14:11:25.073" endtime="20210602 14:11:25.074"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objList</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:25.074" level="INFO">${objList} = [{'addItemList': [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}, {'keywordArray': ['China.Duyun.*']}]}]</msg> +<status status="PASS" starttime="20210602 14:11:25.074" endtime="20210602 14:11:25.074"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${objJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.075" endtime="20210602 14:11:25.075"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objModeJson}</arg> +</arguments> +<assign> +<var>${objJson}</var> +</assign> +<msg timestamp="20210602 14:11:25.076" level="INFO">${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:25.075" endtime="20210602 14:11:25.076"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objListMode}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:25.076" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:25.076" endtime="20210602 14:11:25.076"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.077" endtime="20210602 14:11:25.077"></status> +</kw> +<msg timestamp="20210602 14:11:25.078" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:25.078" level="INFO">${objectType} = ip</msg> +<status status="PASS" starttime="20210602 14:11:25.077" endtime="20210602 14:11:25.078"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.079" endtime="20210602 14:11:25.079"></status> +</kw> +<msg timestamp="20210602 14:11:25.079" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "s...</msg> +<status status="PASS" starttime="20210602 14:11:25.078" endtime="20210602 14:11:25.080"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectSubType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.080" endtime="20210602 14:11:25.081"></status> +</kw> +<msg timestamp="20210602 14:11:25.081" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:25.081" level="INFO">${objectSubType} = geo_location</msg> +<status status="PASS" starttime="20210602 14:11:25.080" endtime="20210602 14:11:25.081"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.082" endtime="20210602 14:11:25.082"></status> +</kw> +<msg timestamp="20210602 14:11:25.082" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...</msg> +<status status="PASS" starttime="20210602 14:11:25.081" endtime="20210602 14:11:25.083"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<msg timestamp="20210602 14:11:25.084" level="FAIL">Dictionary does not contain key 'objectId'.</msg> +<status status="FAIL" starttime="20210602 14:11:25.083" endtime="20210602 14:11:25.084"></status> +</kw> +<msg timestamp="20210602 14:11:25.084" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:25.084" level="INFO">${objectId} = Dictionary does not contain key 'objectId'.</msg> +<status status="PASS" starttime="20210602 14:11:25.083" endtime="20210602 14:11:25.084"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectId": null</arg> +<arg>"objectId":${objectId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.085" endtime="20210602 14:11:25.085"></status> +</kw> +<msg timestamp="20210602 14:11:25.086" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...</msg> +<status status="PASS" starttime="20210602 14:11:25.085" endtime="20210602 14:11:25.086"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"option": "update"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.087" endtime="20210602 14:11:25.087"></status> +</kw> +<msg timestamp="20210602 14:11:25.087" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...</msg> +<status status="PASS" starttime="20210602 14:11:25.086" endtime="20210602 14:11:25.088"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectJsonList}</var> +</assign> +<msg timestamp="20210602 14:11:25.088" level="INFO">${objectJsonList} = []</msg> +<status status="PASS" starttime="20210602 14:11:25.088" endtime="20210602 14:11:25.088"></status> +</kw> +<kw name="Evaluate" library="BuiltIn"> +<doc>Evaluates the given expression in Python and returns the results.</doc> +<arguments> +<arg>type(${objList})</arg> +</arguments> +<assign> +<var>${objListType}</var> +</assign> +<msg timestamp="20210602 14:11:25.089" level="INFO">${objListType} = <class 'list'></msg> +<status status="PASS" starttime="20210602 14:11:25.089" endtime="20210602 14:11:25.089"></status> +</kw> +<kw name="${obj} IN [ @{objList} ]" type="for"> +<kw name="${obj} = {'addItemList': [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}, {'keywordArray': ['China.Duyun.*']}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.090" endtime="20210602 14:11:25.091"></status> +</kw> +<msg timestamp="20210602 14:11:25.091" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:25.091" level="INFO">${addItemList} = [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}, {'keywordArray': ['China.Duyun.*']}]</msg> +<status status="PASS" starttime="20210602 14:11:25.090" endtime="20210602 14:11:25.091"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:25.092" level="INFO">${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}, {"keywordArray": ["China.Duyun.*"]}]</msg> +<status status="PASS" starttime="20210602 14:11:25.091" endtime="20210602 14:11:25.092"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.093" endtime="20210602 14:11:25.093"></status> +</kw> +<msg timestamp="20210602 14:11:25.093" level="INFO">${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}, {"keywordArray": ["China.Duyun.*"]}]</msg> +<status status="PASS" starttime="20210602 14:11:25.092" endtime="20210602 14:11:25.093"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.094" endtime="20210602 14:11:25.095"></status> +</kw> +<msg timestamp="20210602 14:11:25.095" level="INFO">${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}, {"keywordArray": ["China.Duyun.*"]}]</msg> +<status status="PASS" starttime="20210602 14:11:25.094" endtime="20210602 14:11:25.095"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.096" endtime="20210602 14:11:25.096"></status> +</kw> +<msg timestamp="20210602 14:11:25.096" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...</msg> +<status status="PASS" starttime="20210602 14:11:25.095" endtime="20210602 14:11:25.097"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:25.097" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...</msg> +<status status="PASS" starttime="20210602 14:11:25.097" endtime="20210602 14:11:25.097"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:25.098" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'geo_location', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'a...</msg> +<status status="PASS" starttime="20210602 14:11:25.098" endtime="20210602 14:11:25.098"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.109" endtime="20210602 14:11:25.109"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.109" endtime="20210602 14:11:25.110"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'ip', 'objectSubType': 'geo_location', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'ad..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.110" endtime="20210602 14:11:25.110"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.110" endtime="20210602 14:11:25.111"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.110" endtime="20210602 14:11:25.111"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.108" endtime="20210602 14:11:25.111"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.090" endtime="20210602 14:11:25.111"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.089" endtime="20210602 14:11:25.111"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>opAction=add</arg> +<arg>returnData=1</arg> +<arg>objectList=${objectJsonList}</arg> +</arguments> +<assign> +<var>${objectData}</var> +</assign> +<msg timestamp="20210602 14:11:25.112" level="INFO">${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'geo_location', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单...</msg> +<status status="PASS" starttime="20210602 14:11:25.112" endtime="20210602 14:11:25.112"></status> +</kw> +<kw name="createObject" library="object"> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${rescode}</var> +<var>${objectIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${ipList}对象dict</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.113" endtime="20210602 14:11:25.113"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建IP</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.114" endtime="20210602 14:11:25.114"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${ipList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:25.114" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:25.114" endtime="20210602 14:11:25.115"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${ipList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:25.115" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\...</msg> +<status status="PASS" starttime="20210602 14:11:25.115" endtime="20210602 14:11:25.115"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${objectUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:25.117" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:25.116" endtime="20210602 14:11:25.117"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:25.118" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v1, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:25.117" endtime="20210602 14:11:25.118"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:25.119" level="INFO">POST Request using : uri=/policy/object, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}, {"keywordArray": ["China.Duyun.*"]}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]} +json=None</msg> +<msg timestamp="20210602 14:11:25.295" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:25.119" endtime="20210602 14:11:25.295"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:25.296" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:25.296" endtime="20210602 14:11:25.296"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:25.298" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:25.297" endtime="20210602 14:11:25.298"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:25.300" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "objectList" : [ { + "addItemList" : [ { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:24", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "Algeria." ], + "itemId" : 10074655, + "objectId" : 107870 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:24", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "China.Duyun." ], + "itemId" : 10074656, + "objectId" : 107870 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:24", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "China.Duyun." ], + "itemId" : 10074657, + "objectId" : 107870 + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107870, + "objectName" : "auttest单ip指定端口", + "objectSubType" : "geo_location", + "objectType" : "ip", + "opTime" : "2021-06-02 14:11:24", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:25.300" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:25.300" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:24', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:25.299" endtime="20210602 14:11:25.300"></status> +</kw> +<msg timestamp="20210602 14:11:25.301" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:24', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:25.116" endtime="20210602 14:11:25.301"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>getObjectListIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${objectIds}</var> +</assign> +<kw name="getObjectListIds" library="process_object_body"> +<doc>获取结果中的对象ID</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>Call Get-ObjectIds</arg> +</arguments> +<msg timestamp="20210602 14:11:25.303" level="INFO">Call Get-ObjectIds</msg> +<status status="PASS" starttime="20210602 14:11:25.302" endtime="20210602 14:11:25.303"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIds}</var> +</assign> +<msg timestamp="20210602 14:11:25.304" level="INFO">${objectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:25.303" endtime="20210602 14:11:25.304"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${objectIdsTemp}</var> +</assign> +<msg timestamp="20210602 14:11:25.305" level="INFO">${objectIdsTemp} = </msg> +<status status="PASS" starttime="20210602 14:11:25.304" endtime="20210602 14:11:25.305"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${data}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.306" endtime="20210602 14:11:25.306"></status> +</kw> +<msg timestamp="20210602 14:11:25.306" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:25.306" level="INFO">${data} = {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:24', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['A...</msg> +<status status="PASS" starttime="20210602 14:11:25.305" endtime="20210602 14:11:25.307"></status> +</kw> +<kw name="Return From Keyword If" library="BuiltIn"> +<doc>Returns from the enclosing user keyword if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"=="FAIL"</arg> +<arg>${objectIdsTemp}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.307" endtime="20210602 14:11:25.307"></status> +</kw> +<kw name="${object} IN [ @{value['data']['objectList']} ]" type="for"> +<kw name="${object} = {'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:24', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['Algeria.'], 'item..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.308" endtime="20210602 14:11:25.309"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.308" endtime="20210602 14:11:25.309"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.308" endtime="20210602 14:11:25.309"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.302" endtime="20210602 14:11:25.309"></status> +</kw> +<msg timestamp="20210602 14:11:25.310" level="INFO">${objectIds} = [107870]</msg> +<status status="PASS" starttime="20210602 14:11:25.301" endtime="20210602 14:11:25.310"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:25.311" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:25.310" endtime="20210602 14:11:25.311"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:25.312" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:25.311" endtime="20210602 14:11:25.312"></status> +</kw> +<msg timestamp="20210602 14:11:25.312" level="INFO">${rescode} = 200</msg> +<msg timestamp="20210602 14:11:25.312" level="INFO">${objectIds} = [107870]</msg> +<status status="PASS" starttime="20210602 14:11:25.113" endtime="20210602 14:11:25.313"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:25.313" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:25.313" endtime="20210602 14:11:25.314"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${protocolField}</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${protocolField}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.315" endtime="20210602 14:11:25.315"></status> +</kw> +<msg timestamp="20210602 14:11:25.315" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_LOCATION</msg> +<status status="PASS" starttime="20210602 14:11:25.314" endtime="20210602 14:11:25.315"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectsList}</var> +</assign> +<msg timestamp="20210602 14:11:25.316" level="INFO">${objectsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:25.316" endtime="20210602 14:11:25.316"></status> +</kw> +<kw name="${obj} IN [ @{objectIds} ]" type="for"> +<kw name="${obj} = 107870" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:25.317" level="INFO">${objectList} = {'objectId': 107870, 'protocolField': 'TSG_SECURITY_SOURCE_LOCATION'}</msg> +<status status="PASS" starttime="20210602 14:11:25.317" endtime="20210602 14:11:25.317"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.318" endtime="20210602 14:11:25.318"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.317" endtime="20210602 14:11:25.318"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.316" endtime="20210602 14:11:25.318"></status> +</kw> +<msg timestamp="20210602 14:11:25.319" level="INFO">${objectIds} = [107870]</msg> +<msg timestamp="20210602 14:11:25.319" level="INFO">${objectList} = {'objectId': 107870, 'protocolField': 'TSG_SECURITY_SOURCE_LOCATION'}</msg> +<status status="PASS" starttime="20210602 14:11:25.072" endtime="20210602 14:11:25.319"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>OrangeFilter</arg> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.320" endtime="20210602 14:11:25.320"></status> +</kw> +<msg timestamp="20210602 14:11:25.320" level="INFO">${objectList} = {'objectId': 107870, 'protocolField': 'TSG_SECURITY_SOURCE_LOCATION'}</msg> +<status status="PASS" starttime="20210602 14:11:25.319" endtime="20210602 14:11:25.321"></status> +</kw> +<msg timestamp="20210602 14:11:25.321" level="INFO">${objectIds} = [107870]</msg> +<msg timestamp="20210602 14:11:25.321" level="INFO">${objectList} = {'objectId': 107870, 'protocolField': 'TSG_SECURITY_SOURCE_LOCATION'}</msg> +<status status="PASS" starttime="20210602 14:11:25.070" endtime="20210602 14:11:25.321"></status> +</kw> +<kw name="Get Length" library="BuiltIn"> +<doc>Returns and logs the length of the given item as an integer.</doc> +<arguments> +<arg>${objectIdsList}</arg> +</arguments> +<assign> +<var>${len}</var> +</assign> +<msg timestamp="20210602 14:11:25.322" level="INFO">Length is 4</msg> +<msg timestamp="20210602 14:11:25.322" level="INFO">${len} = 4</msg> +<status status="PASS" starttime="20210602 14:11:25.321" endtime="20210602 14:11:25.322"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${len} != 0</arg> +<arg>AppendListToList</arg> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectIds}</arg> +</arguments> +<assign> +<var>${objectIdsList}</var> +</assign> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.337" endtime="20210602 14:11:25.337"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.337" endtime="20210602 14:11:25.337"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = 107870" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.338" endtime="20210602 14:11:25.339"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.338" endtime="20210602 14:11:25.339"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.338" endtime="20210602 14:11:25.339"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.336" endtime="20210602 14:11:25.339"></status> +</kw> +<msg timestamp="20210602 14:11:25.339" level="INFO">${objectIdsList} = [107866, 107867, 107868, 107869, 107870]</msg> +<status status="PASS" starttime="20210602 14:11:25.322" endtime="20210602 14:11:25.339"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Append To List</arg> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Append To List</arg> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>Append To List</arg> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.341" endtime="20210602 14:11:25.341"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.340" endtime="20210602 14:11:25.341"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.069" endtime="20210602 14:11:25.341"></status> +</kw> +<kw name="${key} = {'protocolField': 'TSG_FILED_GTP_IMSI', 'objectType': 'mobile_identity', 'objectSubType': 'imsi', 'objList': [{'addItemList': [{'keywordArray': ['123*']}, {'keywordArray': ['456*']}, {'keywordArray': ..." type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${key}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:25.342" level="INFO">${protocolField} = TSG_FILED_GTP_IMSI</msg> +<status status="PASS" starttime="20210602 14:11:25.342" endtime="20210602 14:11:25.342"></status> +</kw> +<kw name="CreateObjectList" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${key}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.343" endtime="20210602 14:11:25.343"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:25.344" level="INFO">${protocolField} = TSG_FILED_GTP_IMSI</msg> +<status status="PASS" starttime="20210602 14:11:25.344" endtime="20210602 14:11:25.344"></status> +</kw> +<kw name="CreateObjects" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.345" endtime="20210602 14:11:25.345"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:25.346" level="INFO">${protocolField} = TSG_FILED_GTP_IMSI</msg> +<status status="PASS" starttime="20210602 14:11:25.345" endtime="20210602 14:11:25.346"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objList</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:25.347" level="INFO">${objList} = [{'addItemList': [{'keywordArray': ['123*']}, {'keywordArray': ['456*']}, {'keywordArray': ['12345678912345*']}]}]</msg> +<status status="PASS" starttime="20210602 14:11:25.347" endtime="20210602 14:11:25.347"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${objJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.347" endtime="20210602 14:11:25.348"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objModeJson}</arg> +</arguments> +<assign> +<var>${objJson}</var> +</assign> +<msg timestamp="20210602 14:11:25.348" level="INFO">${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:25.348" endtime="20210602 14:11:25.348"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objListMode}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:25.349" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:25.349" endtime="20210602 14:11:25.349"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.350" endtime="20210602 14:11:25.350"></status> +</kw> +<msg timestamp="20210602 14:11:25.350" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:25.351" level="INFO">${objectType} = mobile_identity</msg> +<status status="PASS" starttime="20210602 14:11:25.350" endtime="20210602 14:11:25.351"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.352" endtime="20210602 14:11:25.353"></status> +</kw> +<msg timestamp="20210602 14:11:25.353" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc...</msg> +<status status="PASS" starttime="20210602 14:11:25.351" endtime="20210602 14:11:25.353"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectSubType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.354" endtime="20210602 14:11:25.354"></status> +</kw> +<msg timestamp="20210602 14:11:25.354" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:25.355" level="INFO">${objectSubType} = imsi</msg> +<status status="PASS" starttime="20210602 14:11:25.354" endtime="20210602 14:11:25.355"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.356" endtime="20210602 14:11:25.356"></status> +</kw> +<msg timestamp="20210602 14:11:25.356" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "t...</msg> +<status status="PASS" starttime="20210602 14:11:25.355" endtime="20210602 14:11:25.356"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<msg timestamp="20210602 14:11:25.358" level="FAIL">Dictionary does not contain key 'objectId'.</msg> +<status status="FAIL" starttime="20210602 14:11:25.357" endtime="20210602 14:11:25.358"></status> +</kw> +<msg timestamp="20210602 14:11:25.358" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:25.358" level="INFO">${objectId} = Dictionary does not contain key 'objectId'.</msg> +<status status="PASS" starttime="20210602 14:11:25.357" endtime="20210602 14:11:25.358"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectId": null</arg> +<arg>"objectId":${objectId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.359" endtime="20210602 14:11:25.359"></status> +</kw> +<msg timestamp="20210602 14:11:25.360" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "t...</msg> +<status status="PASS" starttime="20210602 14:11:25.358" endtime="20210602 14:11:25.360"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"option": "update"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.360" endtime="20210602 14:11:25.361"></status> +</kw> +<msg timestamp="20210602 14:11:25.361" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "t...</msg> +<status status="PASS" starttime="20210602 14:11:25.360" endtime="20210602 14:11:25.361"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectJsonList}</var> +</assign> +<msg timestamp="20210602 14:11:25.362" level="INFO">${objectJsonList} = []</msg> +<status status="PASS" starttime="20210602 14:11:25.361" endtime="20210602 14:11:25.362"></status> +</kw> +<kw name="Evaluate" library="BuiltIn"> +<doc>Evaluates the given expression in Python and returns the results.</doc> +<arguments> +<arg>type(${objList})</arg> +</arguments> +<assign> +<var>${objListType}</var> +</assign> +<msg timestamp="20210602 14:11:25.363" level="INFO">${objListType} = <class 'list'></msg> +<status status="PASS" starttime="20210602 14:11:25.362" endtime="20210602 14:11:25.363"></status> +</kw> +<kw name="${obj} IN [ @{objList} ]" type="for"> +<kw name="${obj} = {'addItemList': [{'keywordArray': ['123*']}, {'keywordArray': ['456*']}, {'keywordArray': ['12345678912345*']}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.364" endtime="20210602 14:11:25.364"></status> +</kw> +<msg timestamp="20210602 14:11:25.365" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:25.365" level="INFO">${addItemList} = [{'keywordArray': ['123*']}, {'keywordArray': ['456*']}, {'keywordArray': ['12345678912345*']}]</msg> +<status status="PASS" starttime="20210602 14:11:25.364" endtime="20210602 14:11:25.365"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:25.366" level="INFO">${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["456*"]}, {"keywordArray": ["12345678912345*"]}]</msg> +<status status="PASS" starttime="20210602 14:11:25.365" endtime="20210602 14:11:25.366"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.367" endtime="20210602 14:11:25.368"></status> +</kw> +<msg timestamp="20210602 14:11:25.368" level="INFO">${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["456*"]}, {"keywordArray": ["12345678912345*"]}]</msg> +<status status="PASS" starttime="20210602 14:11:25.366" endtime="20210602 14:11:25.368"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.369" endtime="20210602 14:11:25.369"></status> +</kw> +<msg timestamp="20210602 14:11:25.370" level="INFO">${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["456*"]}, {"keywordArray": ["12345678912345*"]}]</msg> +<status status="PASS" starttime="20210602 14:11:25.368" endtime="20210602 14:11:25.370"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.371" endtime="20210602 14:11:25.371"></status> +</kw> +<msg timestamp="20210602 14:11:25.371" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "t...</msg> +<status status="PASS" starttime="20210602 14:11:25.370" endtime="20210602 14:11:25.371"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:25.372" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "t...</msg> +<status status="PASS" starttime="20210602 14:11:25.372" endtime="20210602 14:11:25.372"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:25.373" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'mobile_identity', 'objectSubType': 'imsi', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [...</msg> +<status status="PASS" starttime="20210602 14:11:25.372" endtime="20210602 14:11:25.373"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.384" endtime="20210602 14:11:25.385"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.385" endtime="20210602 14:11:25.385"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'mobile_identity', 'objectSubType': 'imsi', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': []..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.386" endtime="20210602 14:11:25.386"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.386" endtime="20210602 14:11:25.386"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.385" endtime="20210602 14:11:25.387"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.384" endtime="20210602 14:11:25.387"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.363" endtime="20210602 14:11:25.387"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.363" endtime="20210602 14:11:25.387"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>opAction=add</arg> +<arg>returnData=1</arg> +<arg>objectList=${objectJsonList}</arg> +</arguments> +<assign> +<var>${objectData}</var> +</assign> +<msg timestamp="20210602 14:11:25.388" level="INFO">${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'mobile_identity', 'objectSubType': 'imsi', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'aut...</msg> +<status status="PASS" starttime="20210602 14:11:25.388" endtime="20210602 14:11:25.388"></status> +</kw> +<kw name="createObject" library="object"> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${rescode}</var> +<var>${objectIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${ipList}对象dict</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.389" endtime="20210602 14:11:25.389"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建IP</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.390" endtime="20210602 14:11:25.390"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${ipList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:25.390" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:25.390" endtime="20210602 14:11:25.391"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${ipList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:25.391" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "mobile_identity", "objectSubType": "imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "aut...</msg> +<status status="PASS" starttime="20210602 14:11:25.391" endtime="20210602 14:11:25.391"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${objectUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:25.393" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:25.392" endtime="20210602 14:11:25.393"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:25.393" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v1, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:25.393" endtime="20210602 14:11:25.394"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:25.395" level="INFO">POST Request using : uri=/policy/object, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "mobile_identity", "objectSubType": "imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"keywordArray": ["123*"]}, {"keywordArray": ["456*"]}, {"keywordArray": ["12345678912345*"]}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]} +json=None</msg> +<msg timestamp="20210602 14:11:25.467" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:25.394" endtime="20210602 14:11:25.468"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:25.469" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:25.468" endtime="20210602 14:11:25.470"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:25.471" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:25.470" endtime="20210602 14:11:25.472"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:25.473" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "objectList" : [ { + "addItemList" : [ { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:24", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "123" ], + "itemId" : 10074658, + "objectId" : 107871 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:24", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "456" ], + "itemId" : 10074659, + "objectId" : 107871 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:24", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "12345678912345" ], + "itemId" : 10074660, + "objectId" : 107871 + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107871, + "objectName" : "auttest单ip指定端口", + "objectSubType" : "imsi", + "objectType" : "mobile_identity", + "opTime" : "2021-06-02 14:11:24", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:25.474" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:25.474" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:24', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:25.472" endtime="20210602 14:11:25.474"></status> +</kw> +<msg timestamp="20210602 14:11:25.475" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:24', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:25.392" endtime="20210602 14:11:25.475"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>getObjectListIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${objectIds}</var> +</assign> +<kw name="getObjectListIds" library="process_object_body"> +<doc>获取结果中的对象ID</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>Call Get-ObjectIds</arg> +</arguments> +<msg timestamp="20210602 14:11:25.479" level="INFO">Call Get-ObjectIds</msg> +<status status="PASS" starttime="20210602 14:11:25.478" endtime="20210602 14:11:25.479"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIds}</var> +</assign> +<msg timestamp="20210602 14:11:25.481" level="INFO">${objectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:25.480" endtime="20210602 14:11:25.481"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${objectIdsTemp}</var> +</assign> +<msg timestamp="20210602 14:11:25.482" level="INFO">${objectIdsTemp} = </msg> +<status status="PASS" starttime="20210602 14:11:25.482" endtime="20210602 14:11:25.483"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${data}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.484" endtime="20210602 14:11:25.485"></status> +</kw> +<msg timestamp="20210602 14:11:25.485" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:25.485" level="INFO">${data} = {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:24', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['1...</msg> +<status status="PASS" starttime="20210602 14:11:25.483" endtime="20210602 14:11:25.485"></status> +</kw> +<kw name="Return From Keyword If" library="BuiltIn"> +<doc>Returns from the enclosing user keyword if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"=="FAIL"</arg> +<arg>${objectIdsTemp}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.486" endtime="20210602 14:11:25.487"></status> +</kw> +<kw name="${object} IN [ @{value['data']['objectList']} ]" type="for"> +<kw name="${object} = {'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:24', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['123'], 'itemId': ..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.488" endtime="20210602 14:11:25.488"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.487" endtime="20210602 14:11:25.489"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.487" endtime="20210602 14:11:25.489"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.477" endtime="20210602 14:11:25.489"></status> +</kw> +<msg timestamp="20210602 14:11:25.490" level="INFO">${objectIds} = [107871]</msg> +<status status="PASS" starttime="20210602 14:11:25.476" endtime="20210602 14:11:25.490"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:25.491" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:25.490" endtime="20210602 14:11:25.491"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:25.492" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:25.492" endtime="20210602 14:11:25.492"></status> +</kw> +<msg timestamp="20210602 14:11:25.493" level="INFO">${rescode} = 200</msg> +<msg timestamp="20210602 14:11:25.493" level="INFO">${objectIds} = [107871]</msg> +<status status="PASS" starttime="20210602 14:11:25.388" endtime="20210602 14:11:25.493"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:25.494" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:25.494" endtime="20210602 14:11:25.494"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${protocolField}</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${protocolField}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.495" endtime="20210602 14:11:25.496"></status> +</kw> +<msg timestamp="20210602 14:11:25.496" level="INFO">${protocolField} = TSG_FILED_GTP_IMSI</msg> +<status status="PASS" starttime="20210602 14:11:25.495" endtime="20210602 14:11:25.496"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectsList}</var> +</assign> +<msg timestamp="20210602 14:11:25.497" level="INFO">${objectsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:25.496" endtime="20210602 14:11:25.497"></status> +</kw> +<kw name="${obj} IN [ @{objectIds} ]" type="for"> +<kw name="${obj} = 107871" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:25.498" level="INFO">${objectList} = {'objectId': 107871, 'protocolField': 'TSG_FILED_GTP_IMSI'}</msg> +<status status="PASS" starttime="20210602 14:11:25.498" endtime="20210602 14:11:25.499"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.499" endtime="20210602 14:11:25.499"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.497" endtime="20210602 14:11:25.499"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.497" endtime="20210602 14:11:25.500"></status> +</kw> +<msg timestamp="20210602 14:11:25.500" level="INFO">${objectIds} = [107871]</msg> +<msg timestamp="20210602 14:11:25.500" level="INFO">${objectList} = {'objectId': 107871, 'protocolField': 'TSG_FILED_GTP_IMSI'}</msg> +<status status="PASS" starttime="20210602 14:11:25.344" endtime="20210602 14:11:25.500"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>OrangeFilter</arg> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.501" endtime="20210602 14:11:25.502"></status> +</kw> +<msg timestamp="20210602 14:11:25.502" level="INFO">${objectList} = {'objectId': 107871, 'protocolField': 'TSG_FILED_GTP_IMSI'}</msg> +<status status="PASS" starttime="20210602 14:11:25.501" endtime="20210602 14:11:25.502"></status> +</kw> +<msg timestamp="20210602 14:11:25.503" level="INFO">${objectIds} = [107871]</msg> +<msg timestamp="20210602 14:11:25.503" level="INFO">${objectList} = {'objectId': 107871, 'protocolField': 'TSG_FILED_GTP_IMSI'}</msg> +<status status="PASS" starttime="20210602 14:11:25.342" endtime="20210602 14:11:25.503"></status> +</kw> +<kw name="Get Length" library="BuiltIn"> +<doc>Returns and logs the length of the given item as an integer.</doc> +<arguments> +<arg>${objectIdsList}</arg> +</arguments> +<assign> +<var>${len}</var> +</assign> +<msg timestamp="20210602 14:11:25.503" level="INFO">Length is 5</msg> +<msg timestamp="20210602 14:11:25.504" level="INFO">${len} = 5</msg> +<status status="PASS" starttime="20210602 14:11:25.503" endtime="20210602 14:11:25.504"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${len} != 0</arg> +<arg>AppendListToList</arg> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectIds}</arg> +</arguments> +<assign> +<var>${objectIdsList}</var> +</assign> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.515" endtime="20210602 14:11:25.515"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.515" endtime="20210602 14:11:25.515"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = 107871" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.516" endtime="20210602 14:11:25.517"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.516" endtime="20210602 14:11:25.517"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.516" endtime="20210602 14:11:25.517"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.514" endtime="20210602 14:11:25.517"></status> +</kw> +<msg timestamp="20210602 14:11:25.517" level="INFO">${objectIdsList} = [107866, 107867, 107868, 107869, 107870, 107871]</msg> +<status status="PASS" starttime="20210602 14:11:25.504" endtime="20210602 14:11:25.517"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Append To List</arg> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Append To List</arg> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>Append To List</arg> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.519" endtime="20210602 14:11:25.519"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.518" endtime="20210602 14:11:25.519"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.341" endtime="20210602 14:11:25.519"></status> +</kw> +<kw name="${key} = {'protocolField': 'TSG_FILED_GTP_PHONE_NUMBER', 'objectType': 'mobile_identity', 'objectSubType': 'phone_number', 'objList': [{'addItemList': [{'keywordArray': ['123*']}, {'keywordArray': ['$123456789..." type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${key}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:25.520" level="INFO">${protocolField} = TSG_FILED_GTP_PHONE_NUMBER</msg> +<status status="PASS" starttime="20210602 14:11:25.520" endtime="20210602 14:11:25.520"></status> +</kw> +<kw name="CreateObjectList" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${key}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.521" endtime="20210602 14:11:25.521"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:25.522" level="INFO">${protocolField} = TSG_FILED_GTP_PHONE_NUMBER</msg> +<status status="PASS" starttime="20210602 14:11:25.521" endtime="20210602 14:11:25.522"></status> +</kw> +<kw name="CreateObjects" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.523" endtime="20210602 14:11:25.523"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:25.524" level="INFO">${protocolField} = TSG_FILED_GTP_PHONE_NUMBER</msg> +<status status="PASS" starttime="20210602 14:11:25.523" endtime="20210602 14:11:25.524"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objList</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:25.525" level="INFO">${objList} = [{'addItemList': [{'keywordArray': ['123*']}, {'keywordArray': ['$123456789012345']}, {'keywordArray': ['12345']}]}]</msg> +<status status="PASS" starttime="20210602 14:11:25.524" endtime="20210602 14:11:25.525"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${objJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.525" endtime="20210602 14:11:25.526"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objModeJson}</arg> +</arguments> +<assign> +<var>${objJson}</var> +</assign> +<msg timestamp="20210602 14:11:25.526" level="INFO">${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:25.526" endtime="20210602 14:11:25.527"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objListMode}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:25.527" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:25.527" endtime="20210602 14:11:25.527"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.528" endtime="20210602 14:11:25.529"></status> +</kw> +<msg timestamp="20210602 14:11:25.529" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:25.529" level="INFO">${objectType} = mobile_identity</msg> +<status status="PASS" starttime="20210602 14:11:25.528" endtime="20210602 14:11:25.529"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.530" endtime="20210602 14:11:25.530"></status> +</kw> +<msg timestamp="20210602 14:11:25.531" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc...</msg> +<status status="PASS" starttime="20210602 14:11:25.530" endtime="20210602 14:11:25.531"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectSubType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.532" endtime="20210602 14:11:25.532"></status> +</kw> +<msg timestamp="20210602 14:11:25.532" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:25.532" level="INFO">${objectSubType} = phone_number</msg> +<status status="PASS" starttime="20210602 14:11:25.531" endtime="20210602 14:11:25.533"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.533" endtime="20210602 14:11:25.534"></status> +</kw> +<msg timestamp="20210602 14:11:25.534" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectD...</msg> +<status status="PASS" starttime="20210602 14:11:25.533" endtime="20210602 14:11:25.534"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<msg timestamp="20210602 14:11:25.535" level="FAIL">Dictionary does not contain key 'objectId'.</msg> +<status status="FAIL" starttime="20210602 14:11:25.535" endtime="20210602 14:11:25.535"></status> +</kw> +<msg timestamp="20210602 14:11:25.536" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:25.536" level="INFO">${objectId} = Dictionary does not contain key 'objectId'.</msg> +<status status="PASS" starttime="20210602 14:11:25.534" endtime="20210602 14:11:25.536"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectId": null</arg> +<arg>"objectId":${objectId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.537" endtime="20210602 14:11:25.537"></status> +</kw> +<msg timestamp="20210602 14:11:25.537" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectD...</msg> +<status status="PASS" starttime="20210602 14:11:25.536" endtime="20210602 14:11:25.537"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"option": "update"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.538" endtime="20210602 14:11:25.539"></status> +</kw> +<msg timestamp="20210602 14:11:25.539" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectD...</msg> +<status status="PASS" starttime="20210602 14:11:25.538" endtime="20210602 14:11:25.539"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectJsonList}</var> +</assign> +<msg timestamp="20210602 14:11:25.540" level="INFO">${objectJsonList} = []</msg> +<status status="PASS" starttime="20210602 14:11:25.539" endtime="20210602 14:11:25.540"></status> +</kw> +<kw name="Evaluate" library="BuiltIn"> +<doc>Evaluates the given expression in Python and returns the results.</doc> +<arguments> +<arg>type(${objList})</arg> +</arguments> +<assign> +<var>${objListType}</var> +</assign> +<msg timestamp="20210602 14:11:25.541" level="INFO">${objListType} = <class 'list'></msg> +<status status="PASS" starttime="20210602 14:11:25.540" endtime="20210602 14:11:25.541"></status> +</kw> +<kw name="${obj} IN [ @{objList} ]" type="for"> +<kw name="${obj} = {'addItemList': [{'keywordArray': ['123*']}, {'keywordArray': ['$123456789012345']}, {'keywordArray': ['12345']}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.542" endtime="20210602 14:11:25.542"></status> +</kw> +<msg timestamp="20210602 14:11:25.543" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:25.543" level="INFO">${addItemList} = [{'keywordArray': ['123*']}, {'keywordArray': ['$123456789012345']}, {'keywordArray': ['12345']}]</msg> +<status status="PASS" starttime="20210602 14:11:25.542" endtime="20210602 14:11:25.543"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:25.544" level="INFO">${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["$123456789012345"]}, {"keywordArray": ["12345"]}]</msg> +<status status="PASS" starttime="20210602 14:11:25.543" endtime="20210602 14:11:25.544"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.545" endtime="20210602 14:11:25.545"></status> +</kw> +<msg timestamp="20210602 14:11:25.545" level="INFO">${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["$123456789012345"]}, {"keywordArray": ["12345"]}]</msg> +<status status="PASS" starttime="20210602 14:11:25.544" endtime="20210602 14:11:25.545"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.546" endtime="20210602 14:11:25.546"></status> +</kw> +<msg timestamp="20210602 14:11:25.547" level="INFO">${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["$123456789012345"]}, {"keywordArray": ["12345"]}]</msg> +<status status="PASS" starttime="20210602 14:11:25.545" endtime="20210602 14:11:25.547"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.548" endtime="20210602 14:11:25.548"></status> +</kw> +<msg timestamp="20210602 14:11:25.548" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectD...</msg> +<status status="PASS" starttime="20210602 14:11:25.547" endtime="20210602 14:11:25.548"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:25.549" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectD...</msg> +<status status="PASS" starttime="20210602 14:11:25.549" endtime="20210602 14:11:25.549"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:25.550" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'mobile_identity', 'objectSubType': 'phone_number', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjec...</msg> +<status status="PASS" starttime="20210602 14:11:25.549" endtime="20210602 14:11:25.550"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.563" endtime="20210602 14:11:25.563"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.563" endtime="20210602 14:11:25.564"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'mobile_identity', 'objectSubType': 'phone_number', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObject..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.565" endtime="20210602 14:11:25.565"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.564" endtime="20210602 14:11:25.565"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.564" endtime="20210602 14:11:25.565"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.562" endtime="20210602 14:11:25.566"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.541" endtime="20210602 14:11:25.566"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.541" endtime="20210602 14:11:25.566"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>opAction=add</arg> +<arg>returnData=1</arg> +<arg>objectList=${objectJsonList}</arg> +</arguments> +<assign> +<var>${objectData}</var> +</assign> +<msg timestamp="20210602 14:11:25.567" level="INFO">${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'mobile_identity', 'objectSubType': 'phone_number', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectNam...</msg> +<status status="PASS" starttime="20210602 14:11:25.566" endtime="20210602 14:11:25.567"></status> +</kw> +<kw name="createObject" library="object"> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${rescode}</var> +<var>${objectIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${ipList}对象dict</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.568" endtime="20210602 14:11:25.568"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建IP</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.569" endtime="20210602 14:11:25.569"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${ipList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:25.570" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:25.569" endtime="20210602 14:11:25.570"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${ipList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:25.571" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "mobile_identity", "objectSubType": "phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectNam...</msg> +<status status="PASS" starttime="20210602 14:11:25.570" endtime="20210602 14:11:25.571"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${objectUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:25.572" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:25.572" endtime="20210602 14:11:25.572"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:25.573" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v1, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:25.572" endtime="20210602 14:11:25.574"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:25.575" level="INFO">POST Request using : uri=/policy/object, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "mobile_identity", "objectSubType": "phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"keywordArray": ["123*"]}, {"keywordArray": ["$123456789012345"]}, {"keywordArray": ["12345"]}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]} +json=None</msg> +<msg timestamp="20210602 14:11:25.827" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:25.574" endtime="20210602 14:11:25.828"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:25.832" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:25.830" endtime="20210602 14:11:25.833"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:25.837" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:25.836" endtime="20210602 14:11:25.838"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:25.839" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "objectList" : [ { + "addItemList" : [ { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:25", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "123" ], + "itemId" : 10074661, + "objectId" : 107872 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:25", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "123456789012345" ], + "itemId" : 10074662, + "objectId" : 107872 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:25", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "12345" ], + "itemId" : 10074663, + "objectId" : 107872 + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107872, + "objectName" : "auttest单ip指定端口", + "objectSubType" : "phone_number", + "objectType" : "mobile_identity", + "opTime" : "2021-06-02 14:11:25", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:25.840" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:25.840" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:25', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:25.839" endtime="20210602 14:11:25.840"></status> +</kw> +<msg timestamp="20210602 14:11:25.840" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:25', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:25.571" endtime="20210602 14:11:25.840"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>getObjectListIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${objectIds}</var> +</assign> +<kw name="getObjectListIds" library="process_object_body"> +<doc>获取结果中的对象ID</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>Call Get-ObjectIds</arg> +</arguments> +<msg timestamp="20210602 14:11:25.842" level="INFO">Call Get-ObjectIds</msg> +<status status="PASS" starttime="20210602 14:11:25.842" endtime="20210602 14:11:25.842"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIds}</var> +</assign> +<msg timestamp="20210602 14:11:25.843" level="INFO">${objectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:25.842" endtime="20210602 14:11:25.843"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${objectIdsTemp}</var> +</assign> +<msg timestamp="20210602 14:11:25.843" level="INFO">${objectIdsTemp} = </msg> +<status status="PASS" starttime="20210602 14:11:25.843" endtime="20210602 14:11:25.844"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${data}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.844" endtime="20210602 14:11:25.845"></status> +</kw> +<msg timestamp="20210602 14:11:25.845" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:25.845" level="INFO">${data} = {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:25', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['1...</msg> +<status status="PASS" starttime="20210602 14:11:25.844" endtime="20210602 14:11:25.845"></status> +</kw> +<kw name="Return From Keyword If" library="BuiltIn"> +<doc>Returns from the enclosing user keyword if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"=="FAIL"</arg> +<arg>${objectIdsTemp}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.845" endtime="20210602 14:11:25.846"></status> +</kw> +<kw name="${object} IN [ @{value['data']['objectList']} ]" type="for"> +<kw name="${object} = {'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:25', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['123'], 'itemId': ..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.847" endtime="20210602 14:11:25.847"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.846" endtime="20210602 14:11:25.847"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.846" endtime="20210602 14:11:25.847"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.841" endtime="20210602 14:11:25.848"></status> +</kw> +<msg timestamp="20210602 14:11:25.848" level="INFO">${objectIds} = [107872]</msg> +<status status="PASS" starttime="20210602 14:11:25.841" endtime="20210602 14:11:25.848"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:25.849" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:25.848" endtime="20210602 14:11:25.849"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:25.849" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:25.849" endtime="20210602 14:11:25.850"></status> +</kw> +<msg timestamp="20210602 14:11:25.850" level="INFO">${rescode} = 200</msg> +<msg timestamp="20210602 14:11:25.850" level="INFO">${objectIds} = [107872]</msg> +<status status="PASS" starttime="20210602 14:11:25.567" endtime="20210602 14:11:25.850"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:25.851" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:25.850" endtime="20210602 14:11:25.851"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${protocolField}</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${protocolField}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.852" endtime="20210602 14:11:25.852"></status> +</kw> +<msg timestamp="20210602 14:11:25.852" level="INFO">${protocolField} = TSG_FILED_GTP_PHONE_NUMBER</msg> +<status status="PASS" starttime="20210602 14:11:25.851" endtime="20210602 14:11:25.852"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectsList}</var> +</assign> +<msg timestamp="20210602 14:11:25.853" level="INFO">${objectsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:25.853" endtime="20210602 14:11:25.853"></status> +</kw> +<kw name="${obj} IN [ @{objectIds} ]" type="for"> +<kw name="${obj} = 107872" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:25.854" level="INFO">${objectList} = {'objectId': 107872, 'protocolField': 'TSG_FILED_GTP_PHONE_NUMBER'}</msg> +<status status="PASS" starttime="20210602 14:11:25.854" endtime="20210602 14:11:25.854"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.855" endtime="20210602 14:11:25.855"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.853" endtime="20210602 14:11:25.855"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.853" endtime="20210602 14:11:25.855"></status> +</kw> +<msg timestamp="20210602 14:11:25.856" level="INFO">${objectIds} = [107872]</msg> +<msg timestamp="20210602 14:11:25.856" level="INFO">${objectList} = {'objectId': 107872, 'protocolField': 'TSG_FILED_GTP_PHONE_NUMBER'}</msg> +<status status="PASS" starttime="20210602 14:11:25.522" endtime="20210602 14:11:25.856"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>OrangeFilter</arg> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.857" endtime="20210602 14:11:25.857"></status> +</kw> +<msg timestamp="20210602 14:11:25.858" level="INFO">${objectList} = {'objectId': 107872, 'protocolField': 'TSG_FILED_GTP_PHONE_NUMBER'}</msg> +<status status="PASS" starttime="20210602 14:11:25.856" endtime="20210602 14:11:25.858"></status> +</kw> +<msg timestamp="20210602 14:11:25.858" level="INFO">${objectIds} = [107872]</msg> +<msg timestamp="20210602 14:11:25.858" level="INFO">${objectList} = {'objectId': 107872, 'protocolField': 'TSG_FILED_GTP_PHONE_NUMBER'}</msg> +<status status="PASS" starttime="20210602 14:11:25.520" endtime="20210602 14:11:25.858"></status> +</kw> +<kw name="Get Length" library="BuiltIn"> +<doc>Returns and logs the length of the given item as an integer.</doc> +<arguments> +<arg>${objectIdsList}</arg> +</arguments> +<assign> +<var>${len}</var> +</assign> +<msg timestamp="20210602 14:11:25.859" level="INFO">Length is 6</msg> +<msg timestamp="20210602 14:11:25.859" level="INFO">${len} = 6</msg> +<status status="PASS" starttime="20210602 14:11:25.858" endtime="20210602 14:11:25.859"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${len} != 0</arg> +<arg>AppendListToList</arg> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectIds}</arg> +</arguments> +<assign> +<var>${objectIdsList}</var> +</assign> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.875" endtime="20210602 14:11:25.875"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.876" endtime="20210602 14:11:25.876"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = 107872" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.877" endtime="20210602 14:11:25.877"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.876" endtime="20210602 14:11:25.877"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.876" endtime="20210602 14:11:25.877"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.874" endtime="20210602 14:11:25.878"></status> +</kw> +<msg timestamp="20210602 14:11:25.878" level="INFO">${objectIdsList} = [107866, 107867, 107868, 107869, 107870, 107871, 107872]</msg> +<status status="PASS" starttime="20210602 14:11:25.859" endtime="20210602 14:11:25.878"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Append To List</arg> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Append To List</arg> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>Append To List</arg> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.879" endtime="20210602 14:11:25.879"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.878" endtime="20210602 14:11:25.880"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.519" endtime="20210602 14:11:25.880"></status> +</kw> +<kw name="${key} = {'protocolField': 'TSG_FILED_GTP_APN', 'objectType': 'apn', 'objectSubType': '', 'objList': [{'addItemList': [{'keywordArray': ['*uawei.org']}, {'keywordArray': ['$huawei.com']}, {'keywordArray': ['$w..." type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${key}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:25.881" level="INFO">${protocolField} = TSG_FILED_GTP_APN</msg> +<status status="PASS" starttime="20210602 14:11:25.881" endtime="20210602 14:11:25.881"></status> +</kw> +<kw name="CreateObjectList" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${key}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.882" endtime="20210602 14:11:25.882"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:25.883" level="INFO">${protocolField} = TSG_FILED_GTP_APN</msg> +<status status="PASS" starttime="20210602 14:11:25.883" endtime="20210602 14:11:25.883"></status> +</kw> +<kw name="CreateObjects" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.884" endtime="20210602 14:11:25.884"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:25.885" level="INFO">${protocolField} = TSG_FILED_GTP_APN</msg> +<status status="PASS" starttime="20210602 14:11:25.885" endtime="20210602 14:11:25.885"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objList</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:25.886" level="INFO">${objList} = [{'addItemList': [{'keywordArray': ['*uawei.org']}, {'keywordArray': ['$huawei.com']}, {'keywordArray': ['$www.huawei.com']}]}]</msg> +<status status="PASS" starttime="20210602 14:11:25.885" endtime="20210602 14:11:25.886"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${objJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.886" endtime="20210602 14:11:25.886"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objModeJson}</arg> +</arguments> +<assign> +<var>${objJson}</var> +</assign> +<msg timestamp="20210602 14:11:25.887" level="INFO">${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:25.887" endtime="20210602 14:11:25.887"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objListMode}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:25.888" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:25.888" endtime="20210602 14:11:25.888"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.889" endtime="20210602 14:11:25.889"></status> +</kw> +<msg timestamp="20210602 14:11:25.889" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:25.889" level="INFO">${objectType} = apn</msg> +<status status="PASS" starttime="20210602 14:11:25.888" endtime="20210602 14:11:25.890"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.890" endtime="20210602 14:11:25.891"></status> +</kw> +<msg timestamp="20210602 14:11:25.891" level="INFO">${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:25.890" endtime="20210602 14:11:25.891"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectSubType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.892" endtime="20210602 14:11:25.892"></status> +</kw> +<msg timestamp="20210602 14:11:25.892" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:25.892" level="INFO">${objectSubType} = </msg> +<status status="PASS" starttime="20210602 14:11:25.891" endtime="20210602 14:11:25.893"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.893" endtime="20210602 14:11:25.894"></status> +</kw> +<msg timestamp="20210602 14:11:25.894" level="INFO">${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...</msg> +<status status="PASS" starttime="20210602 14:11:25.893" endtime="20210602 14:11:25.894"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<msg timestamp="20210602 14:11:25.895" level="FAIL">Dictionary does not contain key 'objectId'.</msg> +<status status="FAIL" starttime="20210602 14:11:25.895" endtime="20210602 14:11:25.895"></status> +</kw> +<msg timestamp="20210602 14:11:25.896" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:25.896" level="INFO">${objectId} = Dictionary does not contain key 'objectId'.</msg> +<status status="PASS" starttime="20210602 14:11:25.894" endtime="20210602 14:11:25.896"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectId": null</arg> +<arg>"objectId":${objectId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.897" endtime="20210602 14:11:25.898"></status> +</kw> +<msg timestamp="20210602 14:11:25.898" level="INFO">${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...</msg> +<status status="PASS" starttime="20210602 14:11:25.896" endtime="20210602 14:11:25.898"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"option": "update"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.899" endtime="20210602 14:11:25.900"></status> +</kw> +<msg timestamp="20210602 14:11:25.900" level="INFO">${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...</msg> +<status status="PASS" starttime="20210602 14:11:25.899" endtime="20210602 14:11:25.900"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectJsonList}</var> +</assign> +<msg timestamp="20210602 14:11:25.901" level="INFO">${objectJsonList} = []</msg> +<status status="PASS" starttime="20210602 14:11:25.900" endtime="20210602 14:11:25.901"></status> +</kw> +<kw name="Evaluate" library="BuiltIn"> +<doc>Evaluates the given expression in Python and returns the results.</doc> +<arguments> +<arg>type(${objList})</arg> +</arguments> +<assign> +<var>${objListType}</var> +</assign> +<msg timestamp="20210602 14:11:25.901" level="INFO">${objListType} = <class 'list'></msg> +<status status="PASS" starttime="20210602 14:11:25.901" endtime="20210602 14:11:25.902"></status> +</kw> +<kw name="${obj} IN [ @{objList} ]" type="for"> +<kw name="${obj} = {'addItemList': [{'keywordArray': ['*uawei.org']}, {'keywordArray': ['$huawei.com']}, {'keywordArray': ['$www.huawei.com']}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.903" endtime="20210602 14:11:25.903"></status> +</kw> +<msg timestamp="20210602 14:11:25.903" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:25.904" level="INFO">${addItemList} = [{'keywordArray': ['*uawei.org']}, {'keywordArray': ['$huawei.com']}, {'keywordArray': ['$www.huawei.com']}]</msg> +<status status="PASS" starttime="20210602 14:11:25.902" endtime="20210602 14:11:25.904"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:25.904" level="INFO">${addItemList} = [{"keywordArray": ["*uawei.org"]}, {"keywordArray": ["$huawei.com"]}, {"keywordArray": ["$www.huawei.com"]}]</msg> +<status status="PASS" starttime="20210602 14:11:25.904" endtime="20210602 14:11:25.904"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.905" endtime="20210602 14:11:25.906"></status> +</kw> +<msg timestamp="20210602 14:11:25.906" level="INFO">${addItemList} = [{"keywordArray": ["*uawei.org"]}, {"keywordArray": ["$huawei.com"]}, {"keywordArray": ["$www.huawei.com"]}]</msg> +<status status="PASS" starttime="20210602 14:11:25.905" endtime="20210602 14:11:25.906"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.907" endtime="20210602 14:11:25.907"></status> +</kw> +<msg timestamp="20210602 14:11:25.907" level="INFO">${addItemList} = [{"keywordArray": ["*uawei.org"]}, {"keywordArray": ["$huawei.com"]}, {"keywordArray": ["$www.huawei.com"]}]</msg> +<status status="PASS" starttime="20210602 14:11:25.906" endtime="20210602 14:11:25.907"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.908" endtime="20210602 14:11:25.909"></status> +</kw> +<msg timestamp="20210602 14:11:25.909" level="INFO">${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...</msg> +<status status="PASS" starttime="20210602 14:11:25.908" endtime="20210602 14:11:25.909"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:25.910" level="INFO">${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...</msg> +<status status="PASS" starttime="20210602 14:11:25.909" endtime="20210602 14:11:25.910"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:25.910" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'apn', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addItemList'...</msg> +<status status="PASS" starttime="20210602 14:11:25.910" endtime="20210602 14:11:25.911"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.922" endtime="20210602 14:11:25.922"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.922" endtime="20210602 14:11:25.922"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'apn', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addItemList':..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.923" endtime="20210602 14:11:25.923"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.923" endtime="20210602 14:11:25.924"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.923" endtime="20210602 14:11:25.924"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.921" endtime="20210602 14:11:25.924"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.902" endtime="20210602 14:11:25.924"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.902" endtime="20210602 14:11:25.924"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>opAction=add</arg> +<arg>returnData=1</arg> +<arg>objectList=${objectJsonList}</arg> +</arguments> +<assign> +<var>${objectData}</var> +</assign> +<msg timestamp="20210602 14:11:25.925" level="INFO">${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'apn', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'o...</msg> +<status status="PASS" starttime="20210602 14:11:25.925" endtime="20210602 14:11:25.925"></status> +</kw> +<kw name="createObject" library="object"> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${rescode}</var> +<var>${objectIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${ipList}对象dict</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.926" endtime="20210602 14:11:25.926"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建IP</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:25.927" endtime="20210602 14:11:25.927"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${ipList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:25.927" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:25.927" endtime="20210602 14:11:25.928"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${ipList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:25.928" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "apn", "objectSubType": "", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u63...</msg> +<status status="PASS" starttime="20210602 14:11:25.928" endtime="20210602 14:11:25.928"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${objectUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:25.930" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:25.929" endtime="20210602 14:11:25.931"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:25.932" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v1, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:25.931" endtime="20210602 14:11:25.932"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:25.933" level="INFO">POST Request using : uri=/policy/object, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "apn", "objectSubType": "", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"keywordArray": ["*uawei.org"]}, {"keywordArray": ["$huawei.com"]}, {"keywordArray": ["$www.huawei.com"]}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]} +json=None</msg> +<msg timestamp="20210602 14:11:27.268" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:25.932" endtime="20210602 14:11:27.268"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:27.269" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:27.268" endtime="20210602 14:11:27.269"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:27.270" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:27.269" endtime="20210602 14:11:27.270"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:27.271" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "objectList" : [ { + "addItemList" : [ { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:26", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "uawei.org" ], + "itemId" : 10074664, + "objectId" : 107873 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:26", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "huawei.com" ], + "itemId" : 10074665, + "objectId" : 107873 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:26", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "www.huawei.com" ], + "itemId" : 10074666, + "objectId" : 107873 + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107873, + "objectName" : "auttest单ip指定端口", + "objectType" : "apn", + "opTime" : "2021-06-02 14:11:25", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:27.271" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:27.271" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:26', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:27.270" endtime="20210602 14:11:27.271"></status> +</kw> +<msg timestamp="20210602 14:11:27.271" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:26', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:25.929" endtime="20210602 14:11:27.272"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>getObjectListIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${objectIds}</var> +</assign> +<kw name="getObjectListIds" library="process_object_body"> +<doc>获取结果中的对象ID</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>Call Get-ObjectIds</arg> +</arguments> +<msg timestamp="20210602 14:11:27.273" level="INFO">Call Get-ObjectIds</msg> +<status status="PASS" starttime="20210602 14:11:27.273" endtime="20210602 14:11:27.273"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIds}</var> +</assign> +<msg timestamp="20210602 14:11:27.274" level="INFO">${objectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:27.274" endtime="20210602 14:11:27.274"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${objectIdsTemp}</var> +</assign> +<msg timestamp="20210602 14:11:27.274" level="INFO">${objectIdsTemp} = </msg> +<status status="PASS" starttime="20210602 14:11:27.274" endtime="20210602 14:11:27.275"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${data}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.275" endtime="20210602 14:11:27.276"></status> +</kw> +<msg timestamp="20210602 14:11:27.276" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:27.276" level="INFO">${data} = {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:26', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['u...</msg> +<status status="PASS" starttime="20210602 14:11:27.275" endtime="20210602 14:11:27.276"></status> +</kw> +<kw name="Return From Keyword If" library="BuiltIn"> +<doc>Returns from the enclosing user keyword if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"=="FAIL"</arg> +<arg>${objectIdsTemp}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.277" endtime="20210602 14:11:27.277"></status> +</kw> +<kw name="${object} IN [ @{value['data']['objectList']} ]" type="for"> +<kw name="${object} = {'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:26', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['uawei.org'], 'ite..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.278" endtime="20210602 14:11:27.278"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:27.277" endtime="20210602 14:11:27.278"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:27.277" endtime="20210602 14:11:27.278"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:27.272" endtime="20210602 14:11:27.279"></status> +</kw> +<msg timestamp="20210602 14:11:27.279" level="INFO">${objectIds} = [107873]</msg> +<status status="PASS" starttime="20210602 14:11:27.272" endtime="20210602 14:11:27.279"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:27.280" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:27.279" endtime="20210602 14:11:27.280"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:27.280" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:27.280" endtime="20210602 14:11:27.281"></status> +</kw> +<msg timestamp="20210602 14:11:27.281" level="INFO">${rescode} = 200</msg> +<msg timestamp="20210602 14:11:27.281" level="INFO">${objectIds} = [107873]</msg> +<status status="PASS" starttime="20210602 14:11:25.926" endtime="20210602 14:11:27.281"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:27.282" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:27.282" endtime="20210602 14:11:27.282"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${protocolField}</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${protocolField}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.283" endtime="20210602 14:11:27.283"></status> +</kw> +<msg timestamp="20210602 14:11:27.284" level="INFO">${protocolField} = TSG_FILED_GTP_APN</msg> +<status status="PASS" starttime="20210602 14:11:27.282" endtime="20210602 14:11:27.284"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectsList}</var> +</assign> +<msg timestamp="20210602 14:11:27.284" level="INFO">${objectsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:27.284" endtime="20210602 14:11:27.284"></status> +</kw> +<kw name="${obj} IN [ @{objectIds} ]" type="for"> +<kw name="${obj} = 107873" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:27.285" level="INFO">${objectList} = {'objectId': 107873, 'protocolField': 'TSG_FILED_GTP_APN'}</msg> +<status status="PASS" starttime="20210602 14:11:27.285" endtime="20210602 14:11:27.286"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.286" endtime="20210602 14:11:27.286"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:27.285" endtime="20210602 14:11:27.286"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:27.285" endtime="20210602 14:11:27.287"></status> +</kw> +<msg timestamp="20210602 14:11:27.287" level="INFO">${objectIds} = [107873]</msg> +<msg timestamp="20210602 14:11:27.287" level="INFO">${objectList} = {'objectId': 107873, 'protocolField': 'TSG_FILED_GTP_APN'}</msg> +<status status="PASS" starttime="20210602 14:11:25.884" endtime="20210602 14:11:27.287"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>OrangeFilter</arg> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.288" endtime="20210602 14:11:27.288"></status> +</kw> +<msg timestamp="20210602 14:11:27.289" level="INFO">${objectList} = {'objectId': 107873, 'protocolField': 'TSG_FILED_GTP_APN'}</msg> +<status status="PASS" starttime="20210602 14:11:27.287" endtime="20210602 14:11:27.289"></status> +</kw> +<msg timestamp="20210602 14:11:27.289" level="INFO">${objectIds} = [107873]</msg> +<msg timestamp="20210602 14:11:27.289" level="INFO">${objectList} = {'objectId': 107873, 'protocolField': 'TSG_FILED_GTP_APN'}</msg> +<status status="PASS" starttime="20210602 14:11:25.882" endtime="20210602 14:11:27.289"></status> +</kw> +<kw name="Get Length" library="BuiltIn"> +<doc>Returns and logs the length of the given item as an integer.</doc> +<arguments> +<arg>${objectIdsList}</arg> +</arguments> +<assign> +<var>${len}</var> +</assign> +<msg timestamp="20210602 14:11:27.290" level="INFO">Length is 7</msg> +<msg timestamp="20210602 14:11:27.290" level="INFO">${len} = 7</msg> +<status status="PASS" starttime="20210602 14:11:27.290" endtime="20210602 14:11:27.290"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${len} != 0</arg> +<arg>AppendListToList</arg> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectIds}</arg> +</arguments> +<assign> +<var>${objectIdsList}</var> +</assign> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.301" endtime="20210602 14:11:27.302"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.302" endtime="20210602 14:11:27.302"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = 107873" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.303" endtime="20210602 14:11:27.303"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:27.303" endtime="20210602 14:11:27.303"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:27.302" endtime="20210602 14:11:27.304"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:27.301" endtime="20210602 14:11:27.304"></status> +</kw> +<msg timestamp="20210602 14:11:27.305" level="INFO">${objectIdsList} = [107866, 107867, 107868, 107869, 107870, 107871, 107872, 107873]</msg> +<status status="PASS" starttime="20210602 14:11:27.291" endtime="20210602 14:11:27.305"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Append To List</arg> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Append To List</arg> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>Append To List</arg> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.306" endtime="20210602 14:11:27.306"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:27.305" endtime="20210602 14:11:27.307"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:25.880" endtime="20210602 14:11:27.307"></status> +</kw> +<kw name="${key} = {'protocolField': 'TSG_SECURITY_SOURCE_ADDR', 'objectType': 'ip', 'objectSubType': 'ip_learning', 'objList': [{'addItemList': [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', ..." type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${key}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:27.308" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:27.307" endtime="20210602 14:11:27.308"></status> +</kw> +<kw name="CreateObjectList" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${key}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.309" endtime="20210602 14:11:27.309"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:27.309" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:27.309" endtime="20210602 14:11:27.310"></status> +</kw> +<kw name="CreateObjects" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.310" endtime="20210602 14:11:27.311"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:27.311" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:27.311" endtime="20210602 14:11:27.311"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objList</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:27.312" level="INFO">${objList} = [{'addItemList': [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'learningDepth': '2', 'agingTime': '12', 'voteClientNum': '10', 'learnedIpLimit': '1000'}]}]</msg> +<status status="PASS" starttime="20210602 14:11:27.312" endtime="20210602 14:11:27.312"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${objJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.312" endtime="20210602 14:11:27.313"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objModeJson}</arg> +</arguments> +<assign> +<var>${objJson}</var> +</assign> +<msg timestamp="20210602 14:11:27.313" level="INFO">${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:27.313" endtime="20210602 14:11:27.313"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objListMode}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:27.314" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:27.314" endtime="20210602 14:11:27.314"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.315" endtime="20210602 14:11:27.315"></status> +</kw> +<msg timestamp="20210602 14:11:27.315" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:27.315" level="INFO">${objectType} = ip</msg> +<status status="PASS" starttime="20210602 14:11:27.314" endtime="20210602 14:11:27.315"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.316" endtime="20210602 14:11:27.317"></status> +</kw> +<msg timestamp="20210602 14:11:27.317" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "s...</msg> +<status status="PASS" starttime="20210602 14:11:27.316" endtime="20210602 14:11:27.317"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectSubType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.318" endtime="20210602 14:11:27.318"></status> +</kw> +<msg timestamp="20210602 14:11:27.318" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:27.318" level="INFO">${objectSubType} = ip_learning</msg> +<status status="PASS" starttime="20210602 14:11:27.317" endtime="20210602 14:11:27.318"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.319" endtime="20210602 14:11:27.320"></status> +</kw> +<msg timestamp="20210602 14:11:27.320" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", ...</msg> +<status status="PASS" starttime="20210602 14:11:27.319" endtime="20210602 14:11:27.320"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<msg timestamp="20210602 14:11:27.321" level="FAIL">Dictionary does not contain key 'objectId'.</msg> +<status status="FAIL" starttime="20210602 14:11:27.321" endtime="20210602 14:11:27.321"></status> +</kw> +<msg timestamp="20210602 14:11:27.322" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:27.322" level="INFO">${objectId} = Dictionary does not contain key 'objectId'.</msg> +<status status="PASS" starttime="20210602 14:11:27.320" endtime="20210602 14:11:27.322"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectId": null</arg> +<arg>"objectId":${objectId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.323" endtime="20210602 14:11:27.323"></status> +</kw> +<msg timestamp="20210602 14:11:27.323" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", ...</msg> +<status status="PASS" starttime="20210602 14:11:27.322" endtime="20210602 14:11:27.323"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"option": "update"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.324" endtime="20210602 14:11:27.324"></status> +</kw> +<msg timestamp="20210602 14:11:27.325" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", ...</msg> +<status status="PASS" starttime="20210602 14:11:27.324" endtime="20210602 14:11:27.325"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectJsonList}</var> +</assign> +<msg timestamp="20210602 14:11:27.325" level="INFO">${objectJsonList} = []</msg> +<status status="PASS" starttime="20210602 14:11:27.325" endtime="20210602 14:11:27.325"></status> +</kw> +<kw name="Evaluate" library="BuiltIn"> +<doc>Evaluates the given expression in Python and returns the results.</doc> +<arguments> +<arg>type(${objList})</arg> +</arguments> +<assign> +<var>${objListType}</var> +</assign> +<msg timestamp="20210602 14:11:27.327" level="INFO">${objListType} = <class 'list'></msg> +<status status="PASS" starttime="20210602 14:11:27.326" endtime="20210602 14:11:27.327"></status> +</kw> +<kw name="${obj} IN [ @{objList} ]" type="for"> +<kw name="${obj} = {'addItemList': [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'learningDepth': '2', 'agingTime': '12', 'voteClientNum': '10', 'learnedIpLimit': '1000'}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.328" endtime="20210602 14:11:27.329"></status> +</kw> +<msg timestamp="20210602 14:11:27.329" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:27.329" level="INFO">${addItemList} = [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'learningDepth': '2', 'agingTime': '12', 'voteClientNum': '10', 'learnedIpLimit': '1000'}]</msg> +<status status="PASS" starttime="20210602 14:11:27.328" endtime="20210602 14:11:27.329"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:27.330" level="INFO">${addItemList} = [{"fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"}]</msg> +<status status="PASS" starttime="20210602 14:11:27.330" endtime="20210602 14:11:27.330"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.332" endtime="20210602 14:11:27.332"></status> +</kw> +<msg timestamp="20210602 14:11:27.332" level="INFO">${addItemList} = "fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"}]</msg> +<status status="PASS" starttime="20210602 14:11:27.331" endtime="20210602 14:11:27.332"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.333" endtime="20210602 14:11:27.334"></status> +</kw> +<msg timestamp="20210602 14:11:27.334" level="INFO">${addItemList} = "fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"</msg> +<status status="PASS" starttime="20210602 14:11:27.333" endtime="20210602 14:11:27.334"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.335" endtime="20210602 14:11:27.335"></status> +</kw> +<msg timestamp="20210602 14:11:27.335" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", ...</msg> +<status status="PASS" starttime="20210602 14:11:27.334" endtime="20210602 14:11:27.336"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:27.336" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", ...</msg> +<status status="PASS" starttime="20210602 14:11:27.336" endtime="20210602 14:11:27.337"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:27.337" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'ip_learning', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'ad...</msg> +<status status="PASS" starttime="20210602 14:11:27.337" endtime="20210602 14:11:27.337"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.348" endtime="20210602 14:11:27.348"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.348" endtime="20210602 14:11:27.349"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'ip', 'objectSubType': 'ip_learning', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'add..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.349" endtime="20210602 14:11:27.350"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:27.349" endtime="20210602 14:11:27.350"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:27.349" endtime="20210602 14:11:27.351"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:27.347" endtime="20210602 14:11:27.351"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:27.328" endtime="20210602 14:11:27.352"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:27.327" endtime="20210602 14:11:27.352"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>opAction=add</arg> +<arg>returnData=1</arg> +<arg>objectList=${objectJsonList}</arg> +</arguments> +<assign> +<var>${objectData}</var> +</assign> +<msg timestamp="20210602 14:11:27.353" level="INFO">${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'ip_learning', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单i...</msg> +<status status="PASS" starttime="20210602 14:11:27.352" endtime="20210602 14:11:27.353"></status> +</kw> +<kw name="createObject" library="object"> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${rescode}</var> +<var>${objectIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${ipList}对象dict</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.354" endtime="20210602 14:11:27.354"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建IP</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.354" endtime="20210602 14:11:27.355"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${ipList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:27.356" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:27.355" endtime="20210602 14:11:27.356"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${ipList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:27.357" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u...</msg> +<status status="PASS" starttime="20210602 14:11:27.356" endtime="20210602 14:11:27.357"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${objectUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:27.360" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:27.359" endtime="20210602 14:11:27.360"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:27.361" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v1, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:27.360" endtime="20210602 14:11:27.361"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:27.362" level="INFO">POST Request using : uri=/policy/object, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [], "fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000", "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]} +json=None</msg> +<msg timestamp="20210602 14:11:27.704" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:27.362" endtime="20210602 14:11:27.704"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:27.705" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:27.704" endtime="20210602 14:11:27.705"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:27.706" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:27.705" endtime="20210602 14:11:27.706"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:27.707" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "objectList" : [ { + "addItemList" : [ ], + "agingTime" : 12, + "deleteItemIds" : [ ], + "fromFqdns" : [ "$www.baidu.com", "*jd.com" ], + "fromProtocol" : "HTTP,SSL", + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "learnedIpLimit" : 1000, + "learningDepth" : "2", + "memberType" : 3, + "objectDesc" : "test", + "objectId" : 107874, + "objectName" : "auttest单ip指定端口", + "objectSubType" : "ip_learning", + "objectType" : "ip", + "opTime" : "2021-06-02 14:11:26", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ], + "voteClientNum" : 10 + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:27.707" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:27.707" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '...</msg> +<status status="PASS" starttime="20210602 14:11:27.706" endtime="20210602 14:11:27.707"></status> +</kw> +<msg timestamp="20210602 14:11:27.708" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '...</msg> +<status status="PASS" starttime="20210602 14:11:27.358" endtime="20210602 14:11:27.708"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>getObjectListIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${objectIds}</var> +</assign> +<kw name="getObjectListIds" library="process_object_body"> +<doc>获取结果中的对象ID</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>Call Get-ObjectIds</arg> +</arguments> +<msg timestamp="20210602 14:11:27.710" level="INFO">Call Get-ObjectIds</msg> +<status status="PASS" starttime="20210602 14:11:27.709" endtime="20210602 14:11:27.710"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIds}</var> +</assign> +<msg timestamp="20210602 14:11:27.710" level="INFO">${objectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:27.710" endtime="20210602 14:11:27.711"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${objectIdsTemp}</var> +</assign> +<msg timestamp="20210602 14:11:27.711" level="INFO">${objectIdsTemp} = </msg> +<status status="PASS" starttime="20210602 14:11:27.711" endtime="20210602 14:11:27.712"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${data}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.712" endtime="20210602 14:11:27.713"></status> +</kw> +<msg timestamp="20210602 14:11:27.713" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:27.713" level="INFO">${data} = {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '#31739C', 'isDisplay': None, 'isExclusio...</msg> +<status status="PASS" starttime="20210602 14:11:27.712" endtime="20210602 14:11:27.714"></status> +</kw> +<kw name="Return From Keyword If" library="BuiltIn"> +<doc>Returns from the enclosing user keyword if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"=="FAIL"</arg> +<arg>${objectIdsTemp}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.714" endtime="20210602 14:11:27.714"></status> +</kw> +<kw name="${object} IN [ @{value['data']['objectList']} ]" type="for"> +<kw name="${object} = {'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '#31739C', 'isDisplay': None, 'isExclusion': 0, 'isInitia..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.716" endtime="20210602 14:11:27.717"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:27.715" endtime="20210602 14:11:27.717"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:27.715" endtime="20210602 14:11:27.717"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:27.709" endtime="20210602 14:11:27.718"></status> +</kw> +<msg timestamp="20210602 14:11:27.718" level="INFO">${objectIds} = [107874]</msg> +<status status="PASS" starttime="20210602 14:11:27.708" endtime="20210602 14:11:27.718"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:27.719" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:27.719" endtime="20210602 14:11:27.720"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:27.721" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:27.720" endtime="20210602 14:11:27.721"></status> +</kw> +<msg timestamp="20210602 14:11:27.722" level="INFO">${rescode} = 200</msg> +<msg timestamp="20210602 14:11:27.722" level="INFO">${objectIds} = [107874]</msg> +<status status="PASS" starttime="20210602 14:11:27.353" endtime="20210602 14:11:27.722"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:27.723" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:27.723" endtime="20210602 14:11:27.723"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${protocolField}</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${protocolField}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.725" endtime="20210602 14:11:27.726"></status> +</kw> +<msg timestamp="20210602 14:11:27.726" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:27.724" endtime="20210602 14:11:27.727"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectsList}</var> +</assign> +<msg timestamp="20210602 14:11:27.728" level="INFO">${objectsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:27.727" endtime="20210602 14:11:27.728"></status> +</kw> +<kw name="${obj} IN [ @{objectIds} ]" type="for"> +<kw name="${obj} = 107874" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:27.730" level="INFO">${objectList} = {'objectId': 107874, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:27.729" endtime="20210602 14:11:27.730"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.731" endtime="20210602 14:11:27.731"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:27.729" endtime="20210602 14:11:27.732"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:27.728" endtime="20210602 14:11:27.732"></status> +</kw> +<msg timestamp="20210602 14:11:27.733" level="INFO">${objectIds} = [107874]</msg> +<msg timestamp="20210602 14:11:27.733" level="INFO">${objectList} = {'objectId': 107874, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:27.310" endtime="20210602 14:11:27.733"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>OrangeFilter</arg> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.735" endtime="20210602 14:11:27.735"></status> +</kw> +<msg timestamp="20210602 14:11:27.736" level="INFO">${objectList} = {'objectId': 107874, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:27.734" endtime="20210602 14:11:27.736"></status> +</kw> +<msg timestamp="20210602 14:11:27.736" level="INFO">${objectIds} = [107874]</msg> +<msg timestamp="20210602 14:11:27.736" level="INFO">${objectList} = {'objectId': 107874, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:27.308" endtime="20210602 14:11:27.737"></status> +</kw> +<kw name="Get Length" library="BuiltIn"> +<doc>Returns and logs the length of the given item as an integer.</doc> +<arguments> +<arg>${objectIdsList}</arg> +</arguments> +<assign> +<var>${len}</var> +</assign> +<msg timestamp="20210602 14:11:27.737" level="INFO">Length is 8</msg> +<msg timestamp="20210602 14:11:27.737" level="INFO">${len} = 8</msg> +<status status="PASS" starttime="20210602 14:11:27.737" endtime="20210602 14:11:27.737"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${len} != 0</arg> +<arg>AppendListToList</arg> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectIds}</arg> +</arguments> +<assign> +<var>${objectIdsList}</var> +</assign> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.748" endtime="20210602 14:11:27.748"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.749" endtime="20210602 14:11:27.749"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = 107874" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.750" endtime="20210602 14:11:27.750"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:27.749" endtime="20210602 14:11:27.750"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:27.749" endtime="20210602 14:11:27.750"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:27.747" endtime="20210602 14:11:27.751"></status> +</kw> +<msg timestamp="20210602 14:11:27.751" level="INFO">${objectIdsList} = [107866, 107867, 107868, 107869, 107870, 107871, 107872, 107873, 107874]</msg> +<status status="PASS" starttime="20210602 14:11:27.738" endtime="20210602 14:11:27.751"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Append To List</arg> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Append To List</arg> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>Append To List</arg> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.752" endtime="20210602 14:11:27.752"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:27.751" endtime="20210602 14:11:27.753"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:27.307" endtime="20210602 14:11:27.753"></status> +</kw> +<kw name="${key} = {'protocolField': 'TSG_SECURITY_DESTINATION_ADDR', 'objList': [{'addItemList': [{'ip': '255.255.255.254', 'port': '65535'}, {'ip': '255.255.255.254', 'port': '1'}]}]}" type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${key}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:27.754" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:27.753" endtime="20210602 14:11:27.754"></status> +</kw> +<kw name="CreateObjectList" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${key}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.754" endtime="20210602 14:11:27.755"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:27.755" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:27.755" endtime="20210602 14:11:27.755"></status> +</kw> +<kw name="CreateObjects" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.756" endtime="20210602 14:11:27.756"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:27.757" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:27.757" endtime="20210602 14:11:27.757"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objList</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:27.758" level="INFO">${objList} = [{'addItemList': [{'ip': '255.255.255.254', 'port': '65535'}, {'ip': '255.255.255.254', 'port': '1'}]}]</msg> +<status status="PASS" starttime="20210602 14:11:27.757" endtime="20210602 14:11:27.758"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${objJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.759" endtime="20210602 14:11:27.759"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objModeJson}</arg> +</arguments> +<assign> +<var>${objJson}</var> +</assign> +<msg timestamp="20210602 14:11:27.759" level="INFO">${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:27.759" endtime="20210602 14:11:27.760"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objListMode}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:27.760" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:27.760" endtime="20210602 14:11:27.760"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<msg timestamp="20210602 14:11:27.762" level="FAIL">Dictionary does not contain key 'objectType'.</msg> +<status status="FAIL" starttime="20210602 14:11:27.761" endtime="20210602 14:11:27.762"></status> +</kw> +<msg timestamp="20210602 14:11:27.762" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:27.762" level="INFO">${objectType} = Dictionary does not contain key 'objectType'.</msg> +<status status="PASS" starttime="20210602 14:11:27.761" endtime="20210602 14:11:27.762"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.763" endtime="20210602 14:11:27.763"></status> +</kw> +<msg timestamp="20210602 14:11:27.764" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:27.763" endtime="20210602 14:11:27.764"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectSubType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<msg timestamp="20210602 14:11:27.765" level="FAIL">Dictionary does not contain key 'objectSubType'.</msg> +<status status="FAIL" starttime="20210602 14:11:27.764" endtime="20210602 14:11:27.765"></status> +</kw> +<msg timestamp="20210602 14:11:27.765" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:27.766" level="INFO">${objectSubType} = Dictionary does not contain key 'objectSubType'.</msg> +<status status="PASS" starttime="20210602 14:11:27.764" endtime="20210602 14:11:27.766"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.767" endtime="20210602 14:11:27.767"></status> +</kw> +<msg timestamp="20210602 14:11:27.767" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:27.766" endtime="20210602 14:11:27.767"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<msg timestamp="20210602 14:11:27.768" level="FAIL">Dictionary does not contain key 'objectId'.</msg> +<status status="FAIL" starttime="20210602 14:11:27.768" endtime="20210602 14:11:27.769"></status> +</kw> +<msg timestamp="20210602 14:11:27.769" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:27.769" level="INFO">${objectId} = Dictionary does not contain key 'objectId'.</msg> +<status status="PASS" starttime="20210602 14:11:27.768" endtime="20210602 14:11:27.769"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectId": null</arg> +<arg>"objectId":${objectId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.770" endtime="20210602 14:11:27.770"></status> +</kw> +<msg timestamp="20210602 14:11:27.770" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:27.769" endtime="20210602 14:11:27.771"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"option": "update"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.771" endtime="20210602 14:11:27.772"></status> +</kw> +<msg timestamp="20210602 14:11:27.772" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:27.771" endtime="20210602 14:11:27.772"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectJsonList}</var> +</assign> +<msg timestamp="20210602 14:11:27.773" level="INFO">${objectJsonList} = []</msg> +<status status="PASS" starttime="20210602 14:11:27.772" endtime="20210602 14:11:27.773"></status> +</kw> +<kw name="Evaluate" library="BuiltIn"> +<doc>Evaluates the given expression in Python and returns the results.</doc> +<arguments> +<arg>type(${objList})</arg> +</arguments> +<assign> +<var>${objListType}</var> +</assign> +<msg timestamp="20210602 14:11:27.774" level="INFO">${objListType} = <class 'list'></msg> +<status status="PASS" starttime="20210602 14:11:27.773" endtime="20210602 14:11:27.774"></status> +</kw> +<kw name="${obj} IN [ @{objList} ]" type="for"> +<kw name="${obj} = {'addItemList': [{'ip': '255.255.255.254', 'port': '65535'}, {'ip': '255.255.255.254', 'port': '1'}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.775" endtime="20210602 14:11:27.775"></status> +</kw> +<msg timestamp="20210602 14:11:27.776" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:27.776" level="INFO">${addItemList} = [{'ip': '255.255.255.254', 'port': '65535'}, {'ip': '255.255.255.254', 'port': '1'}]</msg> +<status status="PASS" starttime="20210602 14:11:27.775" endtime="20210602 14:11:27.776"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:27.777" level="INFO">${addItemList} = [{"ip": "255.255.255.254", "port": "65535"}, {"ip": "255.255.255.254", "port": "1"}]</msg> +<status status="PASS" starttime="20210602 14:11:27.776" endtime="20210602 14:11:27.777"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.777" endtime="20210602 14:11:27.778"></status> +</kw> +<msg timestamp="20210602 14:11:27.778" level="INFO">${addItemList} = [{"ip": "255.255.255.254", "port": "65535"}, {"ip": "255.255.255.254", "port": "1"}]</msg> +<status status="PASS" starttime="20210602 14:11:27.777" endtime="20210602 14:11:27.778"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.779" endtime="20210602 14:11:27.779"></status> +</kw> +<msg timestamp="20210602 14:11:27.779" level="INFO">${addItemList} = [{"ip": "255.255.255.254", "port": "65535"}, {"ip": "255.255.255.254", "port": "1"}]</msg> +<status status="PASS" starttime="20210602 14:11:27.778" endtime="20210602 14:11:27.780"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.780" endtime="20210602 14:11:27.781"></status> +</kw> +<msg timestamp="20210602 14:11:27.781" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:27.780" endtime="20210602 14:11:27.781"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:27.782" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:27.782" endtime="20210602 14:11:27.782"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:27.783" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addIt...</msg> +<status status="PASS" starttime="20210602 14:11:27.782" endtime="20210602 14:11:27.783"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.794" endtime="20210602 14:11:27.795"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.795" endtime="20210602 14:11:27.795"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addIte..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.796" endtime="20210602 14:11:27.796"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:27.796" endtime="20210602 14:11:27.797"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:27.795" endtime="20210602 14:11:27.797"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:27.794" endtime="20210602 14:11:27.797"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:27.774" endtime="20210602 14:11:27.797"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:27.774" endtime="20210602 14:11:27.797"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>opAction=add</arg> +<arg>returnData=1</arg> +<arg>objectList=${objectJsonList}</arg> +</arguments> +<assign> +<var>${objectData}</var> +</assign> +<msg timestamp="20210602 14:11:27.798" level="INFO">${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定...</msg> +<status status="PASS" starttime="20210602 14:11:27.798" endtime="20210602 14:11:27.798"></status> +</kw> +<kw name="createObject" library="object"> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${rescode}</var> +<var>${objectIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${ipList}对象dict</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.799" endtime="20210602 14:11:27.799"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建IP</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:27.800" endtime="20210602 14:11:27.800"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${ipList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:27.801" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:27.800" endtime="20210602 14:11:27.801"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${ipList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:27.801" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u535...</msg> +<status status="PASS" starttime="20210602 14:11:27.801" endtime="20210602 14:11:27.801"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${objectUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:27.802" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:27.802" endtime="20210602 14:11:27.803"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:27.803" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v1, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:27.803" endtime="20210602 14:11:27.804"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:27.805" level="INFO">POST Request using : uri=/policy/object, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"ip": "255.255.255.254", "port": "65535"}, {"ip": "255.255.255.254", "port": "1"}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]} +json=None</msg> +<msg timestamp="20210602 14:11:30.110" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:27.804" endtime="20210602 14:11:30.111"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:30.115" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:30.113" endtime="20210602 14:11:30.116"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:30.118" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:30.117" endtime="20210602 14:11:30.119"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:30.121" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "objectList" : [ { + "addItemList" : [ { + "addrType" : 4, + "clientIp1" : "255.255.255.254", + "clientIp2" : "32", + "clientIpFormat" : "CIDR", + "clientPort1" : "65535", + "clientPort2" : "65535", + "clientPortFormat" : "range", + "direction" : 0, + "ip" : "255.255.255.254", + "isInitialize" : 0, + "isSession" : "endpoint", + "isValid" : 1, + "itemDesc" : "{ \"ip\":\"255.255.255.254\" ,\"port\":\"65535\"}", + "itemId" : 10074667, + "itemName" : null, + "itemType" : "ip", + "objectId" : 107875, + "opTime" : "2021-06-02 14:11:29", + "opUser" : 425, + "port" : "65535", + "protocol" : 0, + "serverIp1" : "0.0.0.0", + "serverIp2" : "255.255.255.255", + "serverIpFormat" : "mask", + "serverPort1" : "0", + "serverPort2" : "65535", + "serverPortFormat" : "mask" + }, { + "addrType" : 4, + "clientIp1" : "255.255.255.254", + "clientIp2" : "32", + "clientIpFormat" : "CIDR", + "clientPort1" : "1", + "clientPort2" : "1", + "clientPortFormat" : "range", + "direction" : 0, + "ip" : "255.255.255.254", + "isInitialize" : 0, + "isSession" : "endpoint", + "isValid" : 1, + "itemDesc" : "{ \"ip\":\"255.255.255.254\" ,\"port\":\"1\"}", + "itemId" : 10074668, + "itemName" : null, + "itemType" : "ip", + "objectId" : 107875, + "opTime" : "2021-06-02 14:11:29", + "opUser" : 425, + "port" : "1", + "protocol" : 0, + "serverIp1" : "0.0.0.0", + "serverIp2" : "255.255.255.255", + "serverIpFormat" : "mask", + "serverPort1" : "0", + "serverPort2" : "65535", + "serverPortFormat" : "mask" + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107875, + "objectName" : "auttest单ip指定端口", + "objectSubType" : "endpoint", + "objectType" : "ip", + "opTime" : "2021-06-02 14:11:27", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:30.122" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:30.122" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.254', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '65535', 'clientPor...</msg> +<status status="PASS" starttime="20210602 14:11:30.120" endtime="20210602 14:11:30.123"></status> +</kw> +<msg timestamp="20210602 14:11:30.124" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.254', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '65535', 'clientPor...</msg> +<status status="PASS" starttime="20210602 14:11:27.802" endtime="20210602 14:11:30.124"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>getObjectListIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${objectIds}</var> +</assign> +<kw name="getObjectListIds" library="process_object_body"> +<doc>获取结果中的对象ID</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>Call Get-ObjectIds</arg> +</arguments> +<msg timestamp="20210602 14:11:30.127" level="INFO">Call Get-ObjectIds</msg> +<status status="PASS" starttime="20210602 14:11:30.127" endtime="20210602 14:11:30.128"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIds}</var> +</assign> +<msg timestamp="20210602 14:11:30.129" level="INFO">${objectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:30.128" endtime="20210602 14:11:30.129"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${objectIdsTemp}</var> +</assign> +<msg timestamp="20210602 14:11:30.130" level="INFO">${objectIdsTemp} = </msg> +<status status="PASS" starttime="20210602 14:11:30.130" endtime="20210602 14:11:30.130"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${data}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.132" endtime="20210602 14:11:30.133"></status> +</kw> +<msg timestamp="20210602 14:11:30.133" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:30.133" level="INFO">${data} = {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.254', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '65535', 'clientPort2': '65535', 'clientPortFormat': 'range...</msg> +<status status="PASS" starttime="20210602 14:11:30.131" endtime="20210602 14:11:30.133"></status> +</kw> +<kw name="Return From Keyword If" library="BuiltIn"> +<doc>Returns from the enclosing user keyword if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"=="FAIL"</arg> +<arg>${objectIdsTemp}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.133" endtime="20210602 14:11:30.133"></status> +</kw> +<kw name="${object} IN [ @{value['data']['objectList']} ]" type="for"> +<kw name="${object} = {'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.254', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '65535', 'clientPort2': '65535', 'clientPortFormat': 'range', 'direction': ..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.136" endtime="20210602 14:11:30.136"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.135" endtime="20210602 14:11:30.136"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.135" endtime="20210602 14:11:30.137"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.126" endtime="20210602 14:11:30.137"></status> +</kw> +<msg timestamp="20210602 14:11:30.137" level="INFO">${objectIds} = [107875]</msg> +<status status="PASS" starttime="20210602 14:11:30.125" endtime="20210602 14:11:30.137"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:30.137" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:30.137" endtime="20210602 14:11:30.138"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:30.138" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:30.138" endtime="20210602 14:11:30.139"></status> +</kw> +<msg timestamp="20210602 14:11:30.139" level="INFO">${rescode} = 200</msg> +<msg timestamp="20210602 14:11:30.139" level="INFO">${objectIds} = [107875]</msg> +<status status="PASS" starttime="20210602 14:11:27.799" endtime="20210602 14:11:30.139"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:30.140" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:30.140" endtime="20210602 14:11:30.140"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${protocolField}</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${protocolField}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.141" endtime="20210602 14:11:30.142"></status> +</kw> +<msg timestamp="20210602 14:11:30.142" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:30.141" endtime="20210602 14:11:30.142"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectsList}</var> +</assign> +<msg timestamp="20210602 14:11:30.143" level="INFO">${objectsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:30.143" endtime="20210602 14:11:30.143"></status> +</kw> +<kw name="${obj} IN [ @{objectIds} ]" type="for"> +<kw name="${obj} = 107875" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:30.144" level="INFO">${objectList} = {'objectId': 107875, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:30.144" endtime="20210602 14:11:30.145"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.145" endtime="20210602 14:11:30.145"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.144" endtime="20210602 14:11:30.146"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.143" endtime="20210602 14:11:30.146"></status> +</kw> +<msg timestamp="20210602 14:11:30.146" level="INFO">${objectIds} = [107875]</msg> +<msg timestamp="20210602 14:11:30.146" level="INFO">${objectList} = {'objectId': 107875, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:27.756" endtime="20210602 14:11:30.146"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>OrangeFilter</arg> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.147" endtime="20210602 14:11:30.148"></status> +</kw> +<msg timestamp="20210602 14:11:30.148" level="INFO">${objectList} = {'objectId': 107875, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:30.147" endtime="20210602 14:11:30.148"></status> +</kw> +<msg timestamp="20210602 14:11:30.148" level="INFO">${objectIds} = [107875]</msg> +<msg timestamp="20210602 14:11:30.149" level="INFO">${objectList} = {'objectId': 107875, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:27.754" endtime="20210602 14:11:30.149"></status> +</kw> +<kw name="Get Length" library="BuiltIn"> +<doc>Returns and logs the length of the given item as an integer.</doc> +<arguments> +<arg>${objectIdsList}</arg> +</arguments> +<assign> +<var>${len}</var> +</assign> +<msg timestamp="20210602 14:11:30.149" level="INFO">Length is 9</msg> +<msg timestamp="20210602 14:11:30.150" level="INFO">${len} = 9</msg> +<status status="PASS" starttime="20210602 14:11:30.149" endtime="20210602 14:11:30.150"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${len} != 0</arg> +<arg>AppendListToList</arg> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectIds}</arg> +</arguments> +<assign> +<var>${objectIdsList}</var> +</assign> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.160" endtime="20210602 14:11:30.161"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.161" endtime="20210602 14:11:30.161"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = 107875" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.162" endtime="20210602 14:11:30.162"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.162" endtime="20210602 14:11:30.162"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.161" endtime="20210602 14:11:30.163"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.160" endtime="20210602 14:11:30.163"></status> +</kw> +<msg timestamp="20210602 14:11:30.164" level="INFO">${objectIdsList} = [107866, 107867, 107868, 107869, 107870, 107871, 107872, 107873, 107874, 107875]</msg> +<status status="PASS" starttime="20210602 14:11:30.150" endtime="20210602 14:11:30.164"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Append To List</arg> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Append To List</arg> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>Append To List</arg> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.165" endtime="20210602 14:11:30.165"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.164" endtime="20210602 14:11:30.165"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:27.753" endtime="20210602 14:11:30.166"></status> +</kw> +<kw name="${key} = {'protocolField': 'TSG_SECURITY_DESTINATION_LOCATION', 'objectSubType': 'geo_location', 'objList': [{'addItemList': [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}]}]}" type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${key}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:30.166" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_LOCATION</msg> +<status status="PASS" starttime="20210602 14:11:30.166" endtime="20210602 14:11:30.167"></status> +</kw> +<kw name="CreateObjectList" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${key}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.167" endtime="20210602 14:11:30.168"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:30.168" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_LOCATION</msg> +<status status="PASS" starttime="20210602 14:11:30.168" endtime="20210602 14:11:30.168"></status> +</kw> +<kw name="CreateObjects" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.169" endtime="20210602 14:11:30.170"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:30.170" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_LOCATION</msg> +<status status="PASS" starttime="20210602 14:11:30.170" endtime="20210602 14:11:30.170"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objList</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:30.171" level="INFO">${objList} = [{'addItemList': [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}]}]</msg> +<status status="PASS" starttime="20210602 14:11:30.171" endtime="20210602 14:11:30.171"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${objJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.171" endtime="20210602 14:11:30.172"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objModeJson}</arg> +</arguments> +<assign> +<var>${objJson}</var> +</assign> +<msg timestamp="20210602 14:11:30.172" level="INFO">${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:30.172" endtime="20210602 14:11:30.172"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objListMode}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:30.173" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:30.173" endtime="20210602 14:11:30.173"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<msg timestamp="20210602 14:11:30.174" level="FAIL">Dictionary does not contain key 'objectType'.</msg> +<status status="FAIL" starttime="20210602 14:11:30.174" endtime="20210602 14:11:30.175"></status> +</kw> +<msg timestamp="20210602 14:11:30.175" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:30.175" level="INFO">${objectType} = Dictionary does not contain key 'objectType'.</msg> +<status status="PASS" starttime="20210602 14:11:30.174" endtime="20210602 14:11:30.175"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.176" endtime="20210602 14:11:30.176"></status> +</kw> +<msg timestamp="20210602 14:11:30.176" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:30.175" endtime="20210602 14:11:30.176"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectSubType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.177" endtime="20210602 14:11:30.177"></status> +</kw> +<msg timestamp="20210602 14:11:30.178" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:30.178" level="INFO">${objectSubType} = geo_location</msg> +<status status="PASS" starttime="20210602 14:11:30.177" endtime="20210602 14:11:30.178"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.179" endtime="20210602 14:11:30.179"></status> +</kw> +<msg timestamp="20210602 14:11:30.180" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test"...</msg> +<status status="PASS" starttime="20210602 14:11:30.178" endtime="20210602 14:11:30.180"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<msg timestamp="20210602 14:11:30.181" level="FAIL">Dictionary does not contain key 'objectId'.</msg> +<status status="FAIL" starttime="20210602 14:11:30.180" endtime="20210602 14:11:30.181"></status> +</kw> +<msg timestamp="20210602 14:11:30.181" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:30.181" level="INFO">${objectId} = Dictionary does not contain key 'objectId'.</msg> +<status status="PASS" starttime="20210602 14:11:30.180" endtime="20210602 14:11:30.182"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectId": null</arg> +<arg>"objectId":${objectId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.182" endtime="20210602 14:11:30.183"></status> +</kw> +<msg timestamp="20210602 14:11:30.183" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test"...</msg> +<status status="PASS" starttime="20210602 14:11:30.182" endtime="20210602 14:11:30.183"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"option": "update"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.184" endtime="20210602 14:11:30.184"></status> +</kw> +<msg timestamp="20210602 14:11:30.185" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test"...</msg> +<status status="PASS" starttime="20210602 14:11:30.183" endtime="20210602 14:11:30.185"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectJsonList}</var> +</assign> +<msg timestamp="20210602 14:11:30.185" level="INFO">${objectJsonList} = []</msg> +<status status="PASS" starttime="20210602 14:11:30.185" endtime="20210602 14:11:30.185"></status> +</kw> +<kw name="Evaluate" library="BuiltIn"> +<doc>Evaluates the given expression in Python and returns the results.</doc> +<arguments> +<arg>type(${objList})</arg> +</arguments> +<assign> +<var>${objListType}</var> +</assign> +<msg timestamp="20210602 14:11:30.186" level="INFO">${objListType} = <class 'list'></msg> +<status status="PASS" starttime="20210602 14:11:30.186" endtime="20210602 14:11:30.186"></status> +</kw> +<kw name="${obj} IN [ @{objList} ]" type="for"> +<kw name="${obj} = {'addItemList': [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.187" endtime="20210602 14:11:30.188"></status> +</kw> +<msg timestamp="20210602 14:11:30.188" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:30.188" level="INFO">${addItemList} = [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}]</msg> +<status status="PASS" starttime="20210602 14:11:30.187" endtime="20210602 14:11:30.188"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:30.189" level="INFO">${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}]</msg> +<status status="PASS" starttime="20210602 14:11:30.188" endtime="20210602 14:11:30.189"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.190" endtime="20210602 14:11:30.190"></status> +</kw> +<msg timestamp="20210602 14:11:30.190" level="INFO">${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}]</msg> +<status status="PASS" starttime="20210602 14:11:30.189" endtime="20210602 14:11:30.191"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.191" endtime="20210602 14:11:30.192"></status> +</kw> +<msg timestamp="20210602 14:11:30.192" level="INFO">${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}]</msg> +<status status="PASS" starttime="20210602 14:11:30.191" endtime="20210602 14:11:30.192"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.193" endtime="20210602 14:11:30.194"></status> +</kw> +<msg timestamp="20210602 14:11:30.194" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test"...</msg> +<status status="PASS" starttime="20210602 14:11:30.192" endtime="20210602 14:11:30.194"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:30.195" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test"...</msg> +<status status="PASS" starttime="20210602 14:11:30.194" endtime="20210602 14:11:30.195"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:30.195" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'geo_location', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'a...</msg> +<status status="PASS" starttime="20210602 14:11:30.195" endtime="20210602 14:11:30.196"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.206" endtime="20210602 14:11:30.207"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.207" endtime="20210602 14:11:30.207"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'ip', 'objectSubType': 'geo_location', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'ad..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.208" endtime="20210602 14:11:30.208"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.208" endtime="20210602 14:11:30.209"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.208" endtime="20210602 14:11:30.209"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.206" endtime="20210602 14:11:30.209"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.187" endtime="20210602 14:11:30.209"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.186" endtime="20210602 14:11:30.209"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>opAction=add</arg> +<arg>returnData=1</arg> +<arg>objectList=${objectJsonList}</arg> +</arguments> +<assign> +<var>${objectData}</var> +</assign> +<msg timestamp="20210602 14:11:30.211" level="INFO">${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'geo_location', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单...</msg> +<status status="PASS" starttime="20210602 14:11:30.210" endtime="20210602 14:11:30.211"></status> +</kw> +<kw name="createObject" library="object"> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${rescode}</var> +<var>${objectIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${ipList}对象dict</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.212" endtime="20210602 14:11:30.212"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建IP</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.212" endtime="20210602 14:11:30.213"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${ipList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:30.213" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:30.213" endtime="20210602 14:11:30.214"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${ipList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:30.214" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\...</msg> +<status status="PASS" starttime="20210602 14:11:30.214" endtime="20210602 14:11:30.214"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${objectUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:30.216" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:30.215" endtime="20210602 14:11:30.216"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:30.217" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v1, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:30.216" endtime="20210602 14:11:30.217"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:30.218" level="INFO">POST Request using : uri=/policy/object, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]} +json=None</msg> +<msg timestamp="20210602 14:11:30.382" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:30.217" endtime="20210602 14:11:30.382"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:30.384" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:30.383" endtime="20210602 14:11:30.384"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:30.385" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:30.385" endtime="20210602 14:11:30.385"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:30.386" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "objectList" : [ { + "addItemList" : [ { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:29", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "Algeria." ], + "itemId" : 10074669, + "objectId" : 107876 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:29", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "China.Duyun." ], + "itemId" : 10074670, + "objectId" : 107876 + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107876, + "objectName" : "auttest单ip指定端口", + "objectSubType" : "geo_location", + "objectType" : "ip", + "opTime" : "2021-06-02 14:11:29", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:30.386" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:30.386" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:29', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:30.386" endtime="20210602 14:11:30.387"></status> +</kw> +<msg timestamp="20210602 14:11:30.387" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:29', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:30.215" endtime="20210602 14:11:30.387"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>getObjectListIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${objectIds}</var> +</assign> +<kw name="getObjectListIds" library="process_object_body"> +<doc>获取结果中的对象ID</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>Call Get-ObjectIds</arg> +</arguments> +<msg timestamp="20210602 14:11:30.389" level="INFO">Call Get-ObjectIds</msg> +<status status="PASS" starttime="20210602 14:11:30.389" endtime="20210602 14:11:30.389"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIds}</var> +</assign> +<msg timestamp="20210602 14:11:30.390" level="INFO">${objectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:30.390" endtime="20210602 14:11:30.390"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${objectIdsTemp}</var> +</assign> +<msg timestamp="20210602 14:11:30.391" level="INFO">${objectIdsTemp} = </msg> +<status status="PASS" starttime="20210602 14:11:30.390" endtime="20210602 14:11:30.391"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${data}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.392" endtime="20210602 14:11:30.393"></status> +</kw> +<msg timestamp="20210602 14:11:30.393" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:30.393" level="INFO">${data} = {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:29', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['A...</msg> +<status status="PASS" starttime="20210602 14:11:30.391" endtime="20210602 14:11:30.393"></status> +</kw> +<kw name="Return From Keyword If" library="BuiltIn"> +<doc>Returns from the enclosing user keyword if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"=="FAIL"</arg> +<arg>${objectIdsTemp}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.394" endtime="20210602 14:11:30.394"></status> +</kw> +<kw name="${object} IN [ @{value['data']['objectList']} ]" type="for"> +<kw name="${object} = {'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:29', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['Algeria.'], 'item..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.395" endtime="20210602 14:11:30.395"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.394" endtime="20210602 14:11:30.395"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.394" endtime="20210602 14:11:30.395"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.388" endtime="20210602 14:11:30.396"></status> +</kw> +<msg timestamp="20210602 14:11:30.396" level="INFO">${objectIds} = [107876]</msg> +<status status="PASS" starttime="20210602 14:11:30.388" endtime="20210602 14:11:30.396"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:30.397" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:30.396" endtime="20210602 14:11:30.397"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:30.397" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:30.397" endtime="20210602 14:11:30.398"></status> +</kw> +<msg timestamp="20210602 14:11:30.398" level="INFO">${rescode} = 200</msg> +<msg timestamp="20210602 14:11:30.398" level="INFO">${objectIds} = [107876]</msg> +<status status="PASS" starttime="20210602 14:11:30.211" endtime="20210602 14:11:30.398"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:30.399" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:30.399" endtime="20210602 14:11:30.399"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${protocolField}</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${protocolField}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.400" endtime="20210602 14:11:30.401"></status> +</kw> +<msg timestamp="20210602 14:11:30.401" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_LOCATION</msg> +<status status="PASS" starttime="20210602 14:11:30.400" endtime="20210602 14:11:30.401"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectsList}</var> +</assign> +<msg timestamp="20210602 14:11:30.402" level="INFO">${objectsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:30.401" endtime="20210602 14:11:30.402"></status> +</kw> +<kw name="${obj} IN [ @{objectIds} ]" type="for"> +<kw name="${obj} = 107876" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:30.403" level="INFO">${objectList} = {'objectId': 107876, 'protocolField': 'TSG_SECURITY_DESTINATION_LOCATION'}</msg> +<status status="PASS" starttime="20210602 14:11:30.402" endtime="20210602 14:11:30.403"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.403" endtime="20210602 14:11:30.404"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.402" endtime="20210602 14:11:30.404"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.402" endtime="20210602 14:11:30.404"></status> +</kw> +<msg timestamp="20210602 14:11:30.404" level="INFO">${objectIds} = [107876]</msg> +<msg timestamp="20210602 14:11:30.405" level="INFO">${objectList} = {'objectId': 107876, 'protocolField': 'TSG_SECURITY_DESTINATION_LOCATION'}</msg> +<status status="PASS" starttime="20210602 14:11:30.169" endtime="20210602 14:11:30.405"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>OrangeFilter</arg> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.406" endtime="20210602 14:11:30.406"></status> +</kw> +<msg timestamp="20210602 14:11:30.406" level="INFO">${objectList} = {'objectId': 107876, 'protocolField': 'TSG_SECURITY_DESTINATION_LOCATION'}</msg> +<status status="PASS" starttime="20210602 14:11:30.405" endtime="20210602 14:11:30.406"></status> +</kw> +<msg timestamp="20210602 14:11:30.407" level="INFO">${objectIds} = [107876]</msg> +<msg timestamp="20210602 14:11:30.407" level="INFO">${objectList} = {'objectId': 107876, 'protocolField': 'TSG_SECURITY_DESTINATION_LOCATION'}</msg> +<status status="PASS" starttime="20210602 14:11:30.167" endtime="20210602 14:11:30.407"></status> +</kw> +<kw name="Get Length" library="BuiltIn"> +<doc>Returns and logs the length of the given item as an integer.</doc> +<arguments> +<arg>${objectIdsList}</arg> +</arguments> +<assign> +<var>${len}</var> +</assign> +<msg timestamp="20210602 14:11:30.408" level="INFO">Length is 10</msg> +<msg timestamp="20210602 14:11:30.408" level="INFO">${len} = 10</msg> +<status status="PASS" starttime="20210602 14:11:30.407" endtime="20210602 14:11:30.408"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${len} != 0</arg> +<arg>AppendListToList</arg> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectIds}</arg> +</arguments> +<assign> +<var>${objectIdsList}</var> +</assign> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.420" endtime="20210602 14:11:30.421"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.421" endtime="20210602 14:11:30.421"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = 107876" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.422" endtime="20210602 14:11:30.422"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.422" endtime="20210602 14:11:30.422"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.421" endtime="20210602 14:11:30.422"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.420" endtime="20210602 14:11:30.423"></status> +</kw> +<msg timestamp="20210602 14:11:30.423" level="INFO">${objectIdsList} = [107866, 107867, 107868, 107869, 107870, 107871, 107872, 107873, 107874, 107875, 107876]</msg> +<status status="PASS" starttime="20210602 14:11:30.408" endtime="20210602 14:11:30.423"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Append To List</arg> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Append To List</arg> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>Append To List</arg> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.424" endtime="20210602 14:11:30.425"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.423" endtime="20210602 14:11:30.425"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.166" endtime="20210602 14:11:30.425"></status> +</kw> +<kw name="${key} = {'protocolField': 'TSG_SECURITY_DESTINATION_ADDR', 'objectSubType': 'ip_learning', 'objList': [{'addItemList': [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'learningDepth'..." type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${key}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:30.426" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:30.426" endtime="20210602 14:11:30.426"></status> +</kw> +<kw name="CreateObjectList" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${key}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.427" endtime="20210602 14:11:30.427"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:30.428" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:30.427" endtime="20210602 14:11:30.428"></status> +</kw> +<kw name="CreateObjects" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.429" endtime="20210602 14:11:30.429"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:30.430" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:30.429" endtime="20210602 14:11:30.430"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objList</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:30.430" level="INFO">${objList} = [{'addItemList': [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'learningDepth': '2', 'agingTime': '12', 'voteClientNum': '10', 'learnedIpLimit': '1000'}]}]</msg> +<status status="PASS" starttime="20210602 14:11:30.430" endtime="20210602 14:11:30.431"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${objJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.431" endtime="20210602 14:11:30.431"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objModeJson}</arg> +</arguments> +<assign> +<var>${objJson}</var> +</assign> +<msg timestamp="20210602 14:11:30.432" level="INFO">${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:30.431" endtime="20210602 14:11:30.432"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objListMode}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:30.432" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:30.432" endtime="20210602 14:11:30.433"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<msg timestamp="20210602 14:11:30.434" level="FAIL">Dictionary does not contain key 'objectType'.</msg> +<status status="FAIL" starttime="20210602 14:11:30.433" endtime="20210602 14:11:30.434"></status> +</kw> +<msg timestamp="20210602 14:11:30.434" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:30.434" level="INFO">${objectType} = Dictionary does not contain key 'objectType'.</msg> +<status status="PASS" starttime="20210602 14:11:30.433" endtime="20210602 14:11:30.435"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.435" endtime="20210602 14:11:30.436"></status> +</kw> +<msg timestamp="20210602 14:11:30.436" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:30.435" endtime="20210602 14:11:30.436"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectSubType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.437" endtime="20210602 14:11:30.437"></status> +</kw> +<msg timestamp="20210602 14:11:30.437" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:30.438" level="INFO">${objectSubType} = ip_learning</msg> +<status status="PASS" starttime="20210602 14:11:30.437" endtime="20210602 14:11:30.438"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.439" endtime="20210602 14:11:30.439"></status> +</kw> +<msg timestamp="20210602 14:11:30.439" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...</msg> +<status status="PASS" starttime="20210602 14:11:30.438" endtime="20210602 14:11:30.439"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<msg timestamp="20210602 14:11:30.440" level="FAIL">Dictionary does not contain key 'objectId'.</msg> +<status status="FAIL" starttime="20210602 14:11:30.440" endtime="20210602 14:11:30.440"></status> +</kw> +<msg timestamp="20210602 14:11:30.441" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:30.441" level="INFO">${objectId} = Dictionary does not contain key 'objectId'.</msg> +<status status="PASS" starttime="20210602 14:11:30.440" endtime="20210602 14:11:30.441"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectId": null</arg> +<arg>"objectId":${objectId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.442" endtime="20210602 14:11:30.442"></status> +</kw> +<msg timestamp="20210602 14:11:30.442" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...</msg> +<status status="PASS" starttime="20210602 14:11:30.441" endtime="20210602 14:11:30.442"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"option": "update"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.443" endtime="20210602 14:11:30.444"></status> +</kw> +<msg timestamp="20210602 14:11:30.444" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...</msg> +<status status="PASS" starttime="20210602 14:11:30.443" endtime="20210602 14:11:30.444"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectJsonList}</var> +</assign> +<msg timestamp="20210602 14:11:30.444" level="INFO">${objectJsonList} = []</msg> +<status status="PASS" starttime="20210602 14:11:30.444" endtime="20210602 14:11:30.445"></status> +</kw> +<kw name="Evaluate" library="BuiltIn"> +<doc>Evaluates the given expression in Python and returns the results.</doc> +<arguments> +<arg>type(${objList})</arg> +</arguments> +<assign> +<var>${objListType}</var> +</assign> +<msg timestamp="20210602 14:11:30.445" level="INFO">${objListType} = <class 'list'></msg> +<status status="PASS" starttime="20210602 14:11:30.445" endtime="20210602 14:11:30.446"></status> +</kw> +<kw name="${obj} IN [ @{objList} ]" type="for"> +<kw name="${obj} = {'addItemList': [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'learningDepth': '2', 'agingTime': '12', 'voteClientNum': '10', 'learnedIpLimit': '1000'}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.447" endtime="20210602 14:11:30.447"></status> +</kw> +<msg timestamp="20210602 14:11:30.447" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:30.447" level="INFO">${addItemList} = [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'learningDepth': '2', 'agingTime': '12', 'voteClientNum': '10', 'learnedIpLimit': '1000'}]</msg> +<status status="PASS" starttime="20210602 14:11:30.446" endtime="20210602 14:11:30.448"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:30.448" level="INFO">${addItemList} = [{"fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"}]</msg> +<status status="PASS" starttime="20210602 14:11:30.448" endtime="20210602 14:11:30.448"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.449" endtime="20210602 14:11:30.450"></status> +</kw> +<msg timestamp="20210602 14:11:30.450" level="INFO">${addItemList} = "fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"}]</msg> +<status status="PASS" starttime="20210602 14:11:30.449" endtime="20210602 14:11:30.450"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.451" endtime="20210602 14:11:30.452"></status> +</kw> +<msg timestamp="20210602 14:11:30.452" level="INFO">${addItemList} = "fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"</msg> +<status status="PASS" starttime="20210602 14:11:30.451" endtime="20210602 14:11:30.452"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.453" endtime="20210602 14:11:30.453"></status> +</kw> +<msg timestamp="20210602 14:11:30.453" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...</msg> +<status status="PASS" starttime="20210602 14:11:30.452" endtime="20210602 14:11:30.454"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:30.454" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...</msg> +<status status="PASS" starttime="20210602 14:11:30.454" endtime="20210602 14:11:30.454"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:30.455" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'ip_learning', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'ad...</msg> +<status status="PASS" starttime="20210602 14:11:30.455" endtime="20210602 14:11:30.455"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.466" endtime="20210602 14:11:30.467"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.467" endtime="20210602 14:11:30.467"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'ip', 'objectSubType': 'ip_learning', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'add..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.468" endtime="20210602 14:11:30.468"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.468" endtime="20210602 14:11:30.469"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.467" endtime="20210602 14:11:30.469"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.466" endtime="20210602 14:11:30.469"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.446" endtime="20210602 14:11:30.469"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.446" endtime="20210602 14:11:30.469"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>opAction=add</arg> +<arg>returnData=1</arg> +<arg>objectList=${objectJsonList}</arg> +</arguments> +<assign> +<var>${objectData}</var> +</assign> +<msg timestamp="20210602 14:11:30.470" level="INFO">${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'ip_learning', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单i...</msg> +<status status="PASS" starttime="20210602 14:11:30.470" endtime="20210602 14:11:30.470"></status> +</kw> +<kw name="createObject" library="object"> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${rescode}</var> +<var>${objectIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${ipList}对象dict</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.471" endtime="20210602 14:11:30.471"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建IP</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.472" endtime="20210602 14:11:30.472"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${ipList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:30.473" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:30.472" endtime="20210602 14:11:30.473"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${ipList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:30.473" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u...</msg> +<status status="PASS" starttime="20210602 14:11:30.473" endtime="20210602 14:11:30.473"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${objectUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:30.474" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:30.474" endtime="20210602 14:11:30.475"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:30.475" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v1, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:30.475" endtime="20210602 14:11:30.476"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:30.477" level="INFO">POST Request using : uri=/policy/object, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [], "fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000", "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]} +json=None</msg> +<msg timestamp="20210602 14:11:30.513" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:30.476" endtime="20210602 14:11:30.513"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:30.514" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:30.514" endtime="20210602 14:11:30.514"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:30.515" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:30.514" endtime="20210602 14:11:30.515"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:30.516" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "objectList" : [ { + "addItemList" : [ ], + "agingTime" : 12, + "deleteItemIds" : [ ], + "fromFqdns" : [ "$www.baidu.com", "*jd.com" ], + "fromProtocol" : "HTTP,SSL", + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "learnedIpLimit" : 1000, + "learningDepth" : "2", + "memberType" : 3, + "objectDesc" : "test", + "objectId" : 107877, + "objectName" : "auttest单ip指定端口", + "objectSubType" : "ip_learning", + "objectType" : "ip", + "opTime" : "2021-06-02 14:11:29", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ], + "voteClientNum" : 10 + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:30.516" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:30.516" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '...</msg> +<status status="PASS" starttime="20210602 14:11:30.515" endtime="20210602 14:11:30.516"></status> +</kw> +<msg timestamp="20210602 14:11:30.517" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '...</msg> +<status status="PASS" starttime="20210602 14:11:30.474" endtime="20210602 14:11:30.517"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>getObjectListIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${objectIds}</var> +</assign> +<kw name="getObjectListIds" library="process_object_body"> +<doc>获取结果中的对象ID</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>Call Get-ObjectIds</arg> +</arguments> +<msg timestamp="20210602 14:11:30.518" level="INFO">Call Get-ObjectIds</msg> +<status status="PASS" starttime="20210602 14:11:30.518" endtime="20210602 14:11:30.518"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIds}</var> +</assign> +<msg timestamp="20210602 14:11:30.519" level="INFO">${objectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:30.519" endtime="20210602 14:11:30.519"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${objectIdsTemp}</var> +</assign> +<msg timestamp="20210602 14:11:30.520" level="INFO">${objectIdsTemp} = </msg> +<status status="PASS" starttime="20210602 14:11:30.519" endtime="20210602 14:11:30.520"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${data}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.521" endtime="20210602 14:11:30.521"></status> +</kw> +<msg timestamp="20210602 14:11:30.521" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:30.521" level="INFO">${data} = {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '#31739C', 'isDisplay': None, 'isExclusio...</msg> +<status status="PASS" starttime="20210602 14:11:30.520" endtime="20210602 14:11:30.521"></status> +</kw> +<kw name="Return From Keyword If" library="BuiltIn"> +<doc>Returns from the enclosing user keyword if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"=="FAIL"</arg> +<arg>${objectIdsTemp}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.522" endtime="20210602 14:11:30.522"></status> +</kw> +<kw name="${object} IN [ @{value['data']['objectList']} ]" type="for"> +<kw name="${object} = {'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '#31739C', 'isDisplay': None, 'isExclusion': 0, 'isInitia..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.523" endtime="20210602 14:11:30.523"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.523" endtime="20210602 14:11:30.523"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.522" endtime="20210602 14:11:30.524"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.517" endtime="20210602 14:11:30.524"></status> +</kw> +<msg timestamp="20210602 14:11:30.524" level="INFO">${objectIds} = [107877]</msg> +<status status="PASS" starttime="20210602 14:11:30.517" endtime="20210602 14:11:30.524"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:30.525" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:30.525" endtime="20210602 14:11:30.525"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:30.526" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:30.525" endtime="20210602 14:11:30.526"></status> +</kw> +<msg timestamp="20210602 14:11:30.526" level="INFO">${rescode} = 200</msg> +<msg timestamp="20210602 14:11:30.526" level="INFO">${objectIds} = [107877]</msg> +<status status="PASS" starttime="20210602 14:11:30.471" endtime="20210602 14:11:30.526"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:30.527" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:30.527" endtime="20210602 14:11:30.527"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${protocolField}</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${protocolField}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.528" endtime="20210602 14:11:30.528"></status> +</kw> +<msg timestamp="20210602 14:11:30.528" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:30.528" endtime="20210602 14:11:30.529"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectsList}</var> +</assign> +<msg timestamp="20210602 14:11:30.529" level="INFO">${objectsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:30.529" endtime="20210602 14:11:30.529"></status> +</kw> +<kw name="${obj} IN [ @{objectIds} ]" type="for"> +<kw name="${obj} = 107877" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:30.530" level="INFO">${objectList} = {'objectId': 107877, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:30.530" endtime="20210602 14:11:30.531"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.531" endtime="20210602 14:11:30.531"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.530" endtime="20210602 14:11:30.531"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.529" endtime="20210602 14:11:30.532"></status> +</kw> +<msg timestamp="20210602 14:11:30.532" level="INFO">${objectIds} = [107877]</msg> +<msg timestamp="20210602 14:11:30.532" level="INFO">${objectList} = {'objectId': 107877, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:30.428" endtime="20210602 14:11:30.532"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>OrangeFilter</arg> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.533" endtime="20210602 14:11:30.533"></status> +</kw> +<msg timestamp="20210602 14:11:30.534" level="INFO">${objectList} = {'objectId': 107877, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:30.532" endtime="20210602 14:11:30.534"></status> +</kw> +<msg timestamp="20210602 14:11:30.534" level="INFO">${objectIds} = [107877]</msg> +<msg timestamp="20210602 14:11:30.534" level="INFO">${objectList} = {'objectId': 107877, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:30.426" endtime="20210602 14:11:30.534"></status> +</kw> +<kw name="Get Length" library="BuiltIn"> +<doc>Returns and logs the length of the given item as an integer.</doc> +<arguments> +<arg>${objectIdsList}</arg> +</arguments> +<assign> +<var>${len}</var> +</assign> +<msg timestamp="20210602 14:11:30.535" level="INFO">Length is 11</msg> +<msg timestamp="20210602 14:11:30.535" level="INFO">${len} = 11</msg> +<status status="PASS" starttime="20210602 14:11:30.535" endtime="20210602 14:11:30.535"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${len} != 0</arg> +<arg>AppendListToList</arg> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectIds}</arg> +</arguments> +<assign> +<var>${objectIdsList}</var> +</assign> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.546" endtime="20210602 14:11:30.546"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.547" endtime="20210602 14:11:30.547"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = 107877" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.548" endtime="20210602 14:11:30.548"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.547" endtime="20210602 14:11:30.548"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.547" endtime="20210602 14:11:30.548"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.546" endtime="20210602 14:11:30.549"></status> +</kw> +<msg timestamp="20210602 14:11:30.549" level="INFO">${objectIdsList} = [107866, 107867, 107868, 107869, 107870, 107871, 107872, 107873, 107874, 107875, 107876, 107877]</msg> +<status status="PASS" starttime="20210602 14:11:30.536" endtime="20210602 14:11:30.549"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Append To List</arg> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Append To List</arg> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>Append To List</arg> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.550" endtime="20210602 14:11:30.550"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.549" endtime="20210602 14:11:30.551"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.425" endtime="20210602 14:11:30.551"></status> +</kw> +<kw name="${key} = {'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT', 'objectType': 'keywords', 'objectSubType': '', 'objList': [{'addItemList': [{'keywordArray': ['dongxiaoyan@*']}, {'keywordArray': ['*@163.com']}, {'keyw..." type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${key}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:30.552" level="INFO">${protocolField} = TSG_FIELD_HTTP_RES_CONTENT</msg> +<status status="PASS" starttime="20210602 14:11:30.551" endtime="20210602 14:11:30.552"></status> +</kw> +<kw name="CreateObjectList" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${key}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.553" endtime="20210602 14:11:30.553"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:30.553" level="INFO">${protocolField} = TSG_FIELD_HTTP_RES_CONTENT</msg> +<status status="PASS" starttime="20210602 14:11:30.553" endtime="20210602 14:11:30.554"></status> +</kw> +<kw name="CreateObjects" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.555" endtime="20210602 14:11:30.555"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:30.556" level="INFO">${protocolField} = TSG_FIELD_HTTP_RES_CONTENT</msg> +<status status="PASS" starttime="20210602 14:11:30.555" endtime="20210602 14:11:30.556"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objList</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:30.556" level="INFO">${objList} = [{'addItemList': [{'keywordArray': ['dongxiaoyan@*']}, {'keywordArray': ['*@163.com']}, {'keywordArray': ['@163.']}, {'keywordArray': ['[email protected]']}]}, {'addItemList': [{'keywordArray': ['test@*']...</msg> +<status status="PASS" starttime="20210602 14:11:30.556" endtime="20210602 14:11:30.557"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${objJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.557" endtime="20210602 14:11:30.557"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objModeJson}</arg> +</arguments> +<assign> +<var>${objJson}</var> +</assign> +<msg timestamp="20210602 14:11:30.558" level="INFO">${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:30.557" endtime="20210602 14:11:30.558"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objListMode}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:30.559" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:30.558" endtime="20210602 14:11:30.559"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.559" endtime="20210602 14:11:30.560"></status> +</kw> +<msg timestamp="20210602 14:11:30.560" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:30.560" level="INFO">${objectType} = keywords</msg> +<status status="PASS" starttime="20210602 14:11:30.559" endtime="20210602 14:11:30.560"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.561" endtime="20210602 14:11:30.561"></status> +</kw> +<msg timestamp="20210602 14:11:30.562" level="INFO">${objectJson} = [{"objectId": null, "objectType":"keywords", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "tes...</msg> +<status status="PASS" starttime="20210602 14:11:30.560" endtime="20210602 14:11:30.562"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectSubType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.562" endtime="20210602 14:11:30.563"></status> +</kw> +<msg timestamp="20210602 14:11:30.563" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:30.563" level="INFO">${objectSubType} = </msg> +<status status="PASS" starttime="20210602 14:11:30.562" endtime="20210602 14:11:30.563"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.564" endtime="20210602 14:11:30.564"></status> +</kw> +<msg timestamp="20210602 14:11:30.565" level="INFO">${objectJson} = [{"objectId": null, "objectType":"keywords", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subO...</msg> +<status status="PASS" starttime="20210602 14:11:30.563" endtime="20210602 14:11:30.565"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<msg timestamp="20210602 14:11:30.566" level="FAIL">Dictionary does not contain key 'objectId'.</msg> +<status status="FAIL" starttime="20210602 14:11:30.565" endtime="20210602 14:11:30.566"></status> +</kw> +<msg timestamp="20210602 14:11:30.566" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:30.566" level="INFO">${objectId} = Dictionary does not contain key 'objectId'.</msg> +<status status="PASS" starttime="20210602 14:11:30.565" endtime="20210602 14:11:30.566"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectId": null</arg> +<arg>"objectId":${objectId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.567" endtime="20210602 14:11:30.567"></status> +</kw> +<msg timestamp="20210602 14:11:30.568" level="INFO">${objectJson} = [{"objectId": null, "objectType":"keywords", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subO...</msg> +<status status="PASS" starttime="20210602 14:11:30.567" endtime="20210602 14:11:30.568"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"option": "update"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.569" endtime="20210602 14:11:30.569"></status> +</kw> +<msg timestamp="20210602 14:11:30.569" level="INFO">${objectJson} = [{"objectId": null, "objectType":"keywords", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subO...</msg> +<status status="PASS" starttime="20210602 14:11:30.568" endtime="20210602 14:11:30.569"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectJsonList}</var> +</assign> +<msg timestamp="20210602 14:11:30.570" level="INFO">${objectJsonList} = []</msg> +<status status="PASS" starttime="20210602 14:11:30.570" endtime="20210602 14:11:30.570"></status> +</kw> +<kw name="Evaluate" library="BuiltIn"> +<doc>Evaluates the given expression in Python and returns the results.</doc> +<arguments> +<arg>type(${objList})</arg> +</arguments> +<assign> +<var>${objListType}</var> +</assign> +<msg timestamp="20210602 14:11:30.571" level="INFO">${objListType} = <class 'list'></msg> +<status status="PASS" starttime="20210602 14:11:30.570" endtime="20210602 14:11:30.571"></status> +</kw> +<kw name="${obj} IN [ @{objList} ]" type="for"> +<kw name="${obj} = {'addItemList': [{'keywordArray': ['dongxiaoyan@*']}, {'keywordArray': ['*@163.com']}, {'keywordArray': ['@163.']}, {'keywordArray': ['[email protected]']}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.572" endtime="20210602 14:11:30.573"></status> +</kw> +<msg timestamp="20210602 14:11:30.573" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:30.573" level="INFO">${addItemList} = [{'keywordArray': ['dongxiaoyan@*']}, {'keywordArray': ['*@163.com']}, {'keywordArray': ['@163.']}, {'keywordArray': ['[email protected]']}]</msg> +<status status="PASS" starttime="20210602 14:11:30.572" endtime="20210602 14:11:30.573"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:30.574" level="INFO">${addItemList} = [{"keywordArray": ["dongxiaoyan@*"]}, {"keywordArray": ["*@163.com"]}, {"keywordArray": ["@163."]}, {"keywordArray": ["[email protected]"]}]</msg> +<status status="PASS" starttime="20210602 14:11:30.573" endtime="20210602 14:11:30.574"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.575" endtime="20210602 14:11:30.576"></status> +</kw> +<msg timestamp="20210602 14:11:30.576" level="INFO">${addItemList} = [{"keywordArray": ["dongxiaoyan@*"]}, {"keywordArray": ["*@163.com"]}, {"keywordArray": ["@163."]}, {"keywordArray": ["[email protected]"]}]</msg> +<status status="PASS" starttime="20210602 14:11:30.574" endtime="20210602 14:11:30.576"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.577" endtime="20210602 14:11:30.577"></status> +</kw> +<msg timestamp="20210602 14:11:30.577" level="INFO">${addItemList} = [{"keywordArray": ["dongxiaoyan@*"]}, {"keywordArray": ["*@163.com"]}, {"keywordArray": ["@163."]}, {"keywordArray": ["[email protected]"]}]</msg> +<status status="PASS" starttime="20210602 14:11:30.576" endtime="20210602 14:11:30.578"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.578" endtime="20210602 14:11:30.579"></status> +</kw> +<msg timestamp="20210602 14:11:30.579" level="INFO">${objectJson} = [{"objectId": null, "objectType":"keywords", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subO...</msg> +<status status="PASS" starttime="20210602 14:11:30.578" endtime="20210602 14:11:30.579"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:30.580" level="INFO">${objectJson} = [{"objectId": null, "objectType":"keywords", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subO...</msg> +<status status="PASS" starttime="20210602 14:11:30.579" endtime="20210602 14:11:30.580"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:30.581" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'keywords', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addItem...</msg> +<status status="PASS" starttime="20210602 14:11:30.580" endtime="20210602 14:11:30.581"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.592" endtime="20210602 14:11:30.592"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.592" endtime="20210602 14:11:30.592"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'keywords', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addItemL..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.593" endtime="20210602 14:11:30.594"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.593" endtime="20210602 14:11:30.594"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.593" endtime="20210602 14:11:30.594"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.591" endtime="20210602 14:11:30.594"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.572" endtime="20210602 14:11:30.594"></status> +</kw> +<kw name="${obj} = {'addItemList': [{'keywordArray': ['test@*']}, {'keywordArray': ['*@test.com']}, {'keywordArray': ['@test.']}, {'keywordArray': ['[email protected]']}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.595" endtime="20210602 14:11:30.596"></status> +</kw> +<msg timestamp="20210602 14:11:30.596" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:30.596" level="INFO">${addItemList} = [{'keywordArray': ['test@*']}, {'keywordArray': ['*@test.com']}, {'keywordArray': ['@test.']}, {'keywordArray': ['[email protected]']}]</msg> +<status status="PASS" starttime="20210602 14:11:30.595" endtime="20210602 14:11:30.596"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:30.597" level="INFO">${addItemList} = [{"keywordArray": ["test@*"]}, {"keywordArray": ["*@test.com"]}, {"keywordArray": ["@test."]}, {"keywordArray": ["[email protected]"]}]</msg> +<status status="PASS" starttime="20210602 14:11:30.596" endtime="20210602 14:11:30.597"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.598" endtime="20210602 14:11:30.598"></status> +</kw> +<msg timestamp="20210602 14:11:30.598" level="INFO">${addItemList} = [{"keywordArray": ["test@*"]}, {"keywordArray": ["*@test.com"]}, {"keywordArray": ["@test."]}, {"keywordArray": ["[email protected]"]}]</msg> +<status status="PASS" starttime="20210602 14:11:30.597" endtime="20210602 14:11:30.598"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.599" endtime="20210602 14:11:30.599"></status> +</kw> +<msg timestamp="20210602 14:11:30.600" level="INFO">${addItemList} = [{"keywordArray": ["test@*"]}, {"keywordArray": ["*@test.com"]}, {"keywordArray": ["@test."]}, {"keywordArray": ["[email protected]"]}]</msg> +<status status="PASS" starttime="20210602 14:11:30.599" endtime="20210602 14:11:30.600"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.601" endtime="20210602 14:11:30.602"></status> +</kw> +<msg timestamp="20210602 14:11:30.602" level="INFO">${objectJson} = [{"objectId": null, "objectType":"keywords", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subO...</msg> +<status status="PASS" starttime="20210602 14:11:30.601" endtime="20210602 14:11:30.602"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:30.603" level="INFO">${objectJson} = [{"objectId": null, "objectType":"keywords", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subO...</msg> +<status status="PASS" starttime="20210602 14:11:30.602" endtime="20210602 14:11:30.603"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:30.603" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'keywords', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addItem...</msg> +<status status="PASS" starttime="20210602 14:11:30.603" endtime="20210602 14:11:30.604"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.614" endtime="20210602 14:11:30.615"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.615" endtime="20210602 14:11:30.615"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'keywords', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addItemL..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.616" endtime="20210602 14:11:30.616"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.616" endtime="20210602 14:11:30.617"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.615" endtime="20210602 14:11:30.617"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.614" endtime="20210602 14:11:30.617"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.595" endtime="20210602 14:11:30.617"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.571" endtime="20210602 14:11:30.617"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>opAction=add</arg> +<arg>returnData=1</arg> +<arg>objectList=${objectJsonList}</arg> +</arguments> +<assign> +<var>${objectData}</var> +</assign> +<msg timestamp="20210602 14:11:30.618" level="INFO">${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'keywords', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口...</msg> +<status status="PASS" starttime="20210602 14:11:30.618" endtime="20210602 14:11:30.619"></status> +</kw> +<kw name="createObject" library="object"> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${rescode}</var> +<var>${objectIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${ipList}对象dict</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.619" endtime="20210602 14:11:30.620"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建IP</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.620" endtime="20210602 14:11:30.620"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${ipList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:30.621" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:30.620" endtime="20210602 14:11:30.621"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${ipList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:30.621" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "keywords", "objectSubType": "", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355i...</msg> +<status status="PASS" starttime="20210602 14:11:30.621" endtime="20210602 14:11:30.622"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${objectUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:30.623" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:30.623" endtime="20210602 14:11:30.623"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:30.624" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v1, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:30.623" endtime="20210602 14:11:30.624"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:30.625" level="INFO">POST Request using : uri=/policy/object, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "keywords", "objectSubType": "", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"keywordArray": ["dongxiaoyan@*"]}, {"keywordArray": ["*@163.com"]}, {"keywordArray": ["@163."]}, {"keywordArray": ["[email protected]"]}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}, {"objectId": null, "objectType": "keywords", "objectSubType": "", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"keywordArray": ["dongxiaoyan@*"]}, {"keywordArray": ["*@163.com"]}, {"keywordArray": ["@163."]}, {"keywordArray": ["[email protected]"]}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]} +json=None</msg> +<msg timestamp="20210602 14:11:30.861" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:30.625" endtime="20210602 14:11:30.862"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:30.865" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:30.863" endtime="20210602 14:11:30.865"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:30.869" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:30.867" endtime="20210602 14:11:30.870"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:30.873" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "objectList" : [ { + "addItemList" : [ { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:30", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "dongxiaoyan@" ], + "itemId" : 10074671, + "objectId" : 107878 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:30", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "@163.com" ], + "itemId" : 10074672, + "objectId" : 107878 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:30", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "@163." ], + "itemId" : 10074673, + "objectId" : 107878 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:30", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "[email protected]" ], + "itemId" : 10074674, + "objectId" : 107878 + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107878, + "objectName" : "auttest单ip指定端口", + "objectType" : "keywords", + "opTime" : "2021-06-02 14:11:30", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + }, { + "addItemList" : [ { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:30", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "dongxiaoyan@" ], + "itemId" : 10074675, + "objectId" : 107879 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:30", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "@163.com" ], + "itemId" : 10074676, + "objectId" : 107879 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:30", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "@163." ], + "itemId" : 10074677, + "objectId" : 107879 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:30", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "[email protected]" ], + "itemId" : 10074678, + "objectId" : 107879 + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107879, + "objectName" : "auttest单ip指定端口", + "objectType" : "keywords", + "opTime" : "2021-06-02 14:11:30", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:30.874" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:30.875" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:30', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:30.871" endtime="20210602 14:11:30.875"></status> +</kw> +<msg timestamp="20210602 14:11:30.876" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:30', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:30.622" endtime="20210602 14:11:30.877"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>getObjectListIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${objectIds}</var> +</assign> +<kw name="getObjectListIds" library="process_object_body"> +<doc>获取结果中的对象ID</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>Call Get-ObjectIds</arg> +</arguments> +<msg timestamp="20210602 14:11:30.880" level="INFO">Call Get-ObjectIds</msg> +<status status="PASS" starttime="20210602 14:11:30.880" endtime="20210602 14:11:30.881"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIds}</var> +</assign> +<msg timestamp="20210602 14:11:30.882" level="INFO">${objectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:30.881" endtime="20210602 14:11:30.882"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${objectIdsTemp}</var> +</assign> +<msg timestamp="20210602 14:11:30.883" level="INFO">${objectIdsTemp} = </msg> +<status status="PASS" starttime="20210602 14:11:30.882" endtime="20210602 14:11:30.883"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${data}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.885" endtime="20210602 14:11:30.886"></status> +</kw> +<msg timestamp="20210602 14:11:30.886" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:30.886" level="INFO">${data} = {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:30', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['d...</msg> +<status status="PASS" starttime="20210602 14:11:30.883" endtime="20210602 14:11:30.887"></status> +</kw> +<kw name="Return From Keyword If" library="BuiltIn"> +<doc>Returns from the enclosing user keyword if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"=="FAIL"</arg> +<arg>${objectIdsTemp}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.887" endtime="20210602 14:11:30.887"></status> +</kw> +<kw name="${object} IN [ @{value['data']['objectList']} ]" type="for"> +<kw name="${object} = {'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:30', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['dongxiaoyan@'], '..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.888" endtime="20210602 14:11:30.889"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.888" endtime="20210602 14:11:30.889"></status> +</kw> +<kw name="${object} = {'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:30', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['dongxiaoyan@'], '..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.890" endtime="20210602 14:11:30.890"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.889" endtime="20210602 14:11:30.891"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.887" endtime="20210602 14:11:30.891"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.879" endtime="20210602 14:11:30.891"></status> +</kw> +<msg timestamp="20210602 14:11:30.892" level="INFO">${objectIds} = [107878, 107879]</msg> +<status status="PASS" starttime="20210602 14:11:30.877" endtime="20210602 14:11:30.892"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:30.893" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:30.892" endtime="20210602 14:11:30.893"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:30.894" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:30.893" endtime="20210602 14:11:30.894"></status> +</kw> +<msg timestamp="20210602 14:11:30.894" level="INFO">${rescode} = 200</msg> +<msg timestamp="20210602 14:11:30.894" level="INFO">${objectIds} = [107878, 107879]</msg> +<status status="PASS" starttime="20210602 14:11:30.619" endtime="20210602 14:11:30.895"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:30.895" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:30.895" endtime="20210602 14:11:30.896"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${protocolField}</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${protocolField}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.897" endtime="20210602 14:11:30.897"></status> +</kw> +<msg timestamp="20210602 14:11:30.897" level="INFO">${protocolField} = TSG_FIELD_HTTP_RES_CONTENT</msg> +<status status="PASS" starttime="20210602 14:11:30.896" endtime="20210602 14:11:30.897"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectsList}</var> +</assign> +<msg timestamp="20210602 14:11:30.898" level="INFO">${objectsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:30.898" endtime="20210602 14:11:30.898"></status> +</kw> +<kw name="${obj} IN [ @{objectIds} ]" type="for"> +<kw name="${obj} = 107878" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:30.900" level="INFO">${objectList} = {'objectId': 107878, 'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT'}</msg> +<status status="PASS" starttime="20210602 14:11:30.899" endtime="20210602 14:11:30.900"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.900" endtime="20210602 14:11:30.900"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.899" endtime="20210602 14:11:30.901"></status> +</kw> +<kw name="${obj} = 107879" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:30.902" level="INFO">${objectList} = {'objectId': 107878, 'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT'}</msg> +<status status="PASS" starttime="20210602 14:11:30.901" endtime="20210602 14:11:30.902"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.902" endtime="20210602 14:11:30.902"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.901" endtime="20210602 14:11:30.902"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.899" endtime="20210602 14:11:30.903"></status> +</kw> +<msg timestamp="20210602 14:11:30.903" level="INFO">${objectIds} = [107878, 107879]</msg> +<msg timestamp="20210602 14:11:30.903" level="INFO">${objectList} = {'objectId': 107878, 'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT'}</msg> +<status status="PASS" starttime="20210602 14:11:30.554" endtime="20210602 14:11:30.903"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>OrangeFilter</arg> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<kw name="OrangeFilter" library="object"> +<doc>filer对象处理,把一个filter的list处理为一个filter</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${list}</var> +</assign> +<msg timestamp="20210602 14:11:30.905" level="INFO">${list} = [{'objectId': 107878, 'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT'}]</msg> +<status status="PASS" starttime="20210602 14:11:30.905" endtime="20210602 14:11:30.905"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>filter=${list}</arg> +</arguments> +<assign> +<var>${filter}</var> +</assign> +<msg timestamp="20210602 14:11:30.906" level="INFO">${filter} = {'filter': [{'objectId': 107878, 'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT'}]}</msg> +<status status="PASS" starttime="20210602 14:11:30.906" endtime="20210602 14:11:30.906"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.904" endtime="20210602 14:11:30.906"></status> +</kw> +<msg timestamp="20210602 14:11:30.907" level="INFO">${objectList} = {'filter': [{'objectId': 107878, 'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT'}]}</msg> +<status status="PASS" starttime="20210602 14:11:30.903" endtime="20210602 14:11:30.907"></status> +</kw> +<msg timestamp="20210602 14:11:30.907" level="INFO">${objectIds} = [107878, 107879]</msg> +<msg timestamp="20210602 14:11:30.907" level="INFO">${objectList} = {'filter': [{'objectId': 107878, 'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT'}]}</msg> +<status status="PASS" starttime="20210602 14:11:30.552" endtime="20210602 14:11:30.907"></status> +</kw> +<kw name="Get Length" library="BuiltIn"> +<doc>Returns and logs the length of the given item as an integer.</doc> +<arguments> +<arg>${objectIdsList}</arg> +</arguments> +<assign> +<var>${len}</var> +</assign> +<msg timestamp="20210602 14:11:30.908" level="INFO">Length is 12</msg> +<msg timestamp="20210602 14:11:30.908" level="INFO">${len} = 12</msg> +<status status="PASS" starttime="20210602 14:11:30.908" endtime="20210602 14:11:30.908"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${len} != 0</arg> +<arg>AppendListToList</arg> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectIds}</arg> +</arguments> +<assign> +<var>${objectIdsList}</var> +</assign> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.921" endtime="20210602 14:11:30.922"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.922" endtime="20210602 14:11:30.922"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = 107878" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.923" endtime="20210602 14:11:30.923"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.923" endtime="20210602 14:11:30.923"></status> +</kw> +<kw name="${objdict} = 107879" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.924" endtime="20210602 14:11:30.924"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.924" endtime="20210602 14:11:30.924"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.922" endtime="20210602 14:11:30.925"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.921" endtime="20210602 14:11:30.925"></status> +</kw> +<msg timestamp="20210602 14:11:30.925" level="INFO">${objectIdsList} = [107866, 107867, 107868, 107869, 107870, 107871, 107872, 107873, 107874, 107875, 107876, 107877, 107878, 107879]</msg> +<status status="PASS" starttime="20210602 14:11:30.909" endtime="20210602 14:11:30.925"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Append To List</arg> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Append To List</arg> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>Append To List</arg> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.926" endtime="20210602 14:11:30.927"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.926" endtime="20210602 14:11:30.927"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.551" endtime="20210602 14:11:30.927"></status> +</kw> +<kw name="${key} = {'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT', 'objectType': 'keywords', 'objectSubType': '', 'objList': [{'addItemList': [{'keywordArray': ['xiaoyan@*']}, {'keywordArray': ['*@163.com']}, {'keywordA..." type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${key}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:30.928" level="INFO">${protocolField} = TSG_FIELD_HTTP_RES_CONTENT</msg> +<status status="PASS" starttime="20210602 14:11:30.927" endtime="20210602 14:11:30.928"></status> +</kw> +<kw name="CreateObjectList" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${key}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.929" endtime="20210602 14:11:30.930"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:30.930" level="INFO">${protocolField} = TSG_FIELD_HTTP_RES_CONTENT</msg> +<status status="PASS" starttime="20210602 14:11:30.930" endtime="20210602 14:11:30.931"></status> +</kw> +<kw name="CreateObjects" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.931" endtime="20210602 14:11:30.931"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:30.932" level="INFO">${protocolField} = TSG_FIELD_HTTP_RES_CONTENT</msg> +<status status="PASS" starttime="20210602 14:11:30.932" endtime="20210602 14:11:30.932"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objList</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:30.933" level="INFO">${objList} = [{'addItemList': [{'keywordArray': ['xiaoyan@*']}, {'keywordArray': ['*@163.com']}, {'keywordArray': ['@163.']}, {'keywordArray': ['[email protected]']}]}, {'addItemList': [{'keywordArray': ['test@*']}, {...</msg> +<status status="PASS" starttime="20210602 14:11:30.932" endtime="20210602 14:11:30.933"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${objJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.933" endtime="20210602 14:11:30.934"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objModeJson}</arg> +</arguments> +<assign> +<var>${objJson}</var> +</assign> +<msg timestamp="20210602 14:11:30.934" level="INFO">${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:30.934" endtime="20210602 14:11:30.934"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objListMode}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:30.935" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:30.935" endtime="20210602 14:11:30.935"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.936" endtime="20210602 14:11:30.936"></status> +</kw> +<msg timestamp="20210602 14:11:30.936" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:30.937" level="INFO">${objectType} = keywords</msg> +<status status="PASS" starttime="20210602 14:11:30.935" endtime="20210602 14:11:30.937"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.937" endtime="20210602 14:11:30.938"></status> +</kw> +<msg timestamp="20210602 14:11:30.938" level="INFO">${objectJson} = [{"objectId": null, "objectType":"keywords", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "tes...</msg> +<status status="PASS" starttime="20210602 14:11:30.937" endtime="20210602 14:11:30.938"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectSubType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.939" endtime="20210602 14:11:30.939"></status> +</kw> +<msg timestamp="20210602 14:11:30.939" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:30.939" level="INFO">${objectSubType} = </msg> +<status status="PASS" starttime="20210602 14:11:30.938" endtime="20210602 14:11:30.940"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.940" endtime="20210602 14:11:30.941"></status> +</kw> +<msg timestamp="20210602 14:11:30.941" level="INFO">${objectJson} = [{"objectId": null, "objectType":"keywords", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subO...</msg> +<status status="PASS" starttime="20210602 14:11:30.940" endtime="20210602 14:11:30.941"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<msg timestamp="20210602 14:11:30.942" level="FAIL">Dictionary does not contain key 'objectId'.</msg> +<status status="FAIL" starttime="20210602 14:11:30.942" endtime="20210602 14:11:30.942"></status> +</kw> +<msg timestamp="20210602 14:11:30.943" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:30.943" level="INFO">${objectId} = Dictionary does not contain key 'objectId'.</msg> +<status status="PASS" starttime="20210602 14:11:30.941" endtime="20210602 14:11:30.943"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectId": null</arg> +<arg>"objectId":${objectId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.944" endtime="20210602 14:11:30.944"></status> +</kw> +<msg timestamp="20210602 14:11:30.944" level="INFO">${objectJson} = [{"objectId": null, "objectType":"keywords", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subO...</msg> +<status status="PASS" starttime="20210602 14:11:30.943" endtime="20210602 14:11:30.944"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"option": "update"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.945" endtime="20210602 14:11:30.945"></status> +</kw> +<msg timestamp="20210602 14:11:30.946" level="INFO">${objectJson} = [{"objectId": null, "objectType":"keywords", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subO...</msg> +<status status="PASS" starttime="20210602 14:11:30.945" endtime="20210602 14:11:30.946"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectJsonList}</var> +</assign> +<msg timestamp="20210602 14:11:30.946" level="INFO">${objectJsonList} = []</msg> +<status status="PASS" starttime="20210602 14:11:30.946" endtime="20210602 14:11:30.946"></status> +</kw> +<kw name="Evaluate" library="BuiltIn"> +<doc>Evaluates the given expression in Python and returns the results.</doc> +<arguments> +<arg>type(${objList})</arg> +</arguments> +<assign> +<var>${objListType}</var> +</assign> +<msg timestamp="20210602 14:11:30.947" level="INFO">${objListType} = <class 'list'></msg> +<status status="PASS" starttime="20210602 14:11:30.947" endtime="20210602 14:11:30.948"></status> +</kw> +<kw name="${obj} IN [ @{objList} ]" type="for"> +<kw name="${obj} = {'addItemList': [{'keywordArray': ['xiaoyan@*']}, {'keywordArray': ['*@163.com']}, {'keywordArray': ['@163.']}, {'keywordArray': ['[email protected]']}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.949" endtime="20210602 14:11:30.949"></status> +</kw> +<msg timestamp="20210602 14:11:30.949" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:30.949" level="INFO">${addItemList} = [{'keywordArray': ['xiaoyan@*']}, {'keywordArray': ['*@163.com']}, {'keywordArray': ['@163.']}, {'keywordArray': ['[email protected]']}]</msg> +<status status="PASS" starttime="20210602 14:11:30.948" endtime="20210602 14:11:30.949"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:30.950" level="INFO">${addItemList} = [{"keywordArray": ["xiaoyan@*"]}, {"keywordArray": ["*@163.com"]}, {"keywordArray": ["@163."]}, {"keywordArray": ["[email protected]"]}]</msg> +<status status="PASS" starttime="20210602 14:11:30.950" endtime="20210602 14:11:30.950"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.951" endtime="20210602 14:11:30.952"></status> +</kw> +<msg timestamp="20210602 14:11:30.952" level="INFO">${addItemList} = [{"keywordArray": ["xiaoyan@*"]}, {"keywordArray": ["*@163.com"]}, {"keywordArray": ["@163."]}, {"keywordArray": ["[email protected]"]}]</msg> +<status status="PASS" starttime="20210602 14:11:30.951" endtime="20210602 14:11:30.952"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.953" endtime="20210602 14:11:30.953"></status> +</kw> +<msg timestamp="20210602 14:11:30.954" level="INFO">${addItemList} = [{"keywordArray": ["xiaoyan@*"]}, {"keywordArray": ["*@163.com"]}, {"keywordArray": ["@163."]}, {"keywordArray": ["[email protected]"]}]</msg> +<status status="PASS" starttime="20210602 14:11:30.953" endtime="20210602 14:11:30.954"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.955" endtime="20210602 14:11:30.955"></status> +</kw> +<msg timestamp="20210602 14:11:30.955" level="INFO">${objectJson} = [{"objectId": null, "objectType":"keywords", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subO...</msg> +<status status="PASS" starttime="20210602 14:11:30.954" endtime="20210602 14:11:30.955"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:30.956" level="INFO">${objectJson} = [{"objectId": null, "objectType":"keywords", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subO...</msg> +<status status="PASS" starttime="20210602 14:11:30.956" endtime="20210602 14:11:30.956"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:30.957" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'keywords', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addItem...</msg> +<status status="PASS" starttime="20210602 14:11:30.957" endtime="20210602 14:11:30.957"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.969" endtime="20210602 14:11:30.969"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.970" endtime="20210602 14:11:30.970"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'keywords', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addItemL..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.971" endtime="20210602 14:11:30.971"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.971" endtime="20210602 14:11:30.971"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.970" endtime="20210602 14:11:30.971"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.969" endtime="20210602 14:11:30.972"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.948" endtime="20210602 14:11:30.972"></status> +</kw> +<kw name="${obj} = {'addItemList': [{'keywordArray': ['test@*']}, {'keywordArray': ['*@test.com']}, {'keywordArray': ['@test.']}, {'keywordArray': ['[email protected]']}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.973" endtime="20210602 14:11:30.973"></status> +</kw> +<msg timestamp="20210602 14:11:30.974" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:30.974" level="INFO">${addItemList} = [{'keywordArray': ['test@*']}, {'keywordArray': ['*@test.com']}, {'keywordArray': ['@test.']}, {'keywordArray': ['[email protected]']}]</msg> +<status status="PASS" starttime="20210602 14:11:30.973" endtime="20210602 14:11:30.974"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:30.975" level="INFO">${addItemList} = [{"keywordArray": ["test@*"]}, {"keywordArray": ["*@test.com"]}, {"keywordArray": ["@test."]}, {"keywordArray": ["[email protected]"]}]</msg> +<status status="PASS" starttime="20210602 14:11:30.974" endtime="20210602 14:11:30.975"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.976" endtime="20210602 14:11:30.976"></status> +</kw> +<msg timestamp="20210602 14:11:30.977" level="INFO">${addItemList} = [{"keywordArray": ["test@*"]}, {"keywordArray": ["*@test.com"]}, {"keywordArray": ["@test."]}, {"keywordArray": ["[email protected]"]}]</msg> +<status status="PASS" starttime="20210602 14:11:30.975" endtime="20210602 14:11:30.977"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.978" endtime="20210602 14:11:30.978"></status> +</kw> +<msg timestamp="20210602 14:11:30.978" level="INFO">${addItemList} = [{"keywordArray": ["test@*"]}, {"keywordArray": ["*@test.com"]}, {"keywordArray": ["@test."]}, {"keywordArray": ["[email protected]"]}]</msg> +<status status="PASS" starttime="20210602 14:11:30.977" endtime="20210602 14:11:30.979"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.980" endtime="20210602 14:11:30.980"></status> +</kw> +<msg timestamp="20210602 14:11:30.980" level="INFO">${objectJson} = [{"objectId": null, "objectType":"keywords", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subO...</msg> +<status status="PASS" starttime="20210602 14:11:30.979" endtime="20210602 14:11:30.980"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:30.981" level="INFO">${objectJson} = [{"objectId": null, "objectType":"keywords", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subO...</msg> +<status status="PASS" starttime="20210602 14:11:30.981" endtime="20210602 14:11:30.981"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:30.982" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'keywords', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addItem...</msg> +<status status="PASS" starttime="20210602 14:11:30.982" endtime="20210602 14:11:30.982"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.993" endtime="20210602 14:11:30.993"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.994" endtime="20210602 14:11:30.994"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'keywords', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addItemL..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.995" endtime="20210602 14:11:30.995"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.994" endtime="20210602 14:11:30.995"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.994" endtime="20210602 14:11:30.995"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.992" endtime="20210602 14:11:30.996"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.972" endtime="20210602 14:11:30.996"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.948" endtime="20210602 14:11:30.996"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>opAction=add</arg> +<arg>returnData=1</arg> +<arg>objectList=${objectJsonList}</arg> +</arguments> +<assign> +<var>${objectData}</var> +</assign> +<msg timestamp="20210602 14:11:30.997" level="INFO">${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'keywords', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口...</msg> +<status status="PASS" starttime="20210602 14:11:30.996" endtime="20210602 14:11:30.997"></status> +</kw> +<kw name="createObject" library="object"> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${rescode}</var> +<var>${objectIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${ipList}对象dict</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.999" endtime="20210602 14:11:30.999"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建IP</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:30.999" endtime="20210602 14:11:31.000"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${ipList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:31.001" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:31.000" endtime="20210602 14:11:31.001"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${ipList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:31.002" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "keywords", "objectSubType": "", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355i...</msg> +<status status="PASS" starttime="20210602 14:11:31.001" endtime="20210602 14:11:31.002"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${objectUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:31.003" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:31.003" endtime="20210602 14:11:31.003"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:31.004" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v1, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:31.004" endtime="20210602 14:11:31.004"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:31.005" level="INFO">POST Request using : uri=/policy/object, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "keywords", "objectSubType": "", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"keywordArray": ["xiaoyan@*"]}, {"keywordArray": ["*@163.com"]}, {"keywordArray": ["@163."]}, {"keywordArray": ["[email protected]"]}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}, {"objectId": null, "objectType": "keywords", "objectSubType": "", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"keywordArray": ["xiaoyan@*"]}, {"keywordArray": ["*@163.com"]}, {"keywordArray": ["@163."]}, {"keywordArray": ["[email protected]"]}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]} +json=None</msg> +<msg timestamp="20210602 14:11:31.083" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:31.005" endtime="20210602 14:11:31.083"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:31.084" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:31.084" endtime="20210602 14:11:31.085"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:31.086" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:31.085" endtime="20210602 14:11:31.086"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:31.088" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "objectList" : [ { + "addItemList" : [ { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:30", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "xiaoyan@" ], + "itemId" : 10074679, + "objectId" : 107880 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:30", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "@163.com" ], + "itemId" : 10074680, + "objectId" : 107880 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:30", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "@163." ], + "itemId" : 10074681, + "objectId" : 107880 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:30", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "[email protected]" ], + "itemId" : 10074682, + "objectId" : 107880 + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107880, + "objectName" : "auttest单ip指定端口", + "objectType" : "keywords", + "opTime" : "2021-06-02 14:11:30", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + }, { + "addItemList" : [ { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:30", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "xiaoyan@" ], + "itemId" : 10074683, + "objectId" : 107881 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:30", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "@163.com" ], + "itemId" : 10074684, + "objectId" : 107881 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:30", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "@163." ], + "itemId" : 10074685, + "objectId" : 107881 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:30", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "[email protected]" ], + "itemId" : 10074686, + "objectId" : 107881 + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107881, + "objectName" : "auttest单ip指定端口", + "objectType" : "keywords", + "opTime" : "2021-06-02 14:11:30", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:31.088" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:31.088" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:30', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:31.087" endtime="20210602 14:11:31.089"></status> +</kw> +<msg timestamp="20210602 14:11:31.089" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:30', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:31.002" endtime="20210602 14:11:31.090"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>getObjectListIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${objectIds}</var> +</assign> +<kw name="getObjectListIds" library="process_object_body"> +<doc>获取结果中的对象ID</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>Call Get-ObjectIds</arg> +</arguments> +<msg timestamp="20210602 14:11:31.092" level="INFO">Call Get-ObjectIds</msg> +<status status="PASS" starttime="20210602 14:11:31.092" endtime="20210602 14:11:31.093"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIds}</var> +</assign> +<msg timestamp="20210602 14:11:31.094" level="INFO">${objectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:31.093" endtime="20210602 14:11:31.094"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${objectIdsTemp}</var> +</assign> +<msg timestamp="20210602 14:11:31.095" level="INFO">${objectIdsTemp} = </msg> +<status status="PASS" starttime="20210602 14:11:31.095" endtime="20210602 14:11:31.095"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${data}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.097" endtime="20210602 14:11:31.097"></status> +</kw> +<msg timestamp="20210602 14:11:31.098" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:31.098" level="INFO">${data} = {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:30', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['x...</msg> +<status status="PASS" starttime="20210602 14:11:31.096" endtime="20210602 14:11:31.098"></status> +</kw> +<kw name="Return From Keyword If" library="BuiltIn"> +<doc>Returns from the enclosing user keyword if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"=="FAIL"</arg> +<arg>${objectIdsTemp}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.099" endtime="20210602 14:11:31.099"></status> +</kw> +<kw name="${object} IN [ @{value['data']['objectList']} ]" type="for"> +<kw name="${object} = {'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:30', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['xiaoyan@'], 'item..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.101" endtime="20210602 14:11:31.102"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.100" endtime="20210602 14:11:31.102"></status> +</kw> +<kw name="${object} = {'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:30', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['xiaoyan@'], 'item..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.103" endtime="20210602 14:11:31.104"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.103" endtime="20210602 14:11:31.104"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.100" endtime="20210602 14:11:31.104"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.091" endtime="20210602 14:11:31.104"></status> +</kw> +<msg timestamp="20210602 14:11:31.105" level="INFO">${objectIds} = [107880, 107881]</msg> +<status status="PASS" starttime="20210602 14:11:31.090" endtime="20210602 14:11:31.105"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:31.106" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:31.105" endtime="20210602 14:11:31.106"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:31.107" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:31.107" endtime="20210602 14:11:31.108"></status> +</kw> +<msg timestamp="20210602 14:11:31.108" level="INFO">${rescode} = 200</msg> +<msg timestamp="20210602 14:11:31.108" level="INFO">${objectIds} = [107880, 107881]</msg> +<status status="PASS" starttime="20210602 14:11:30.998" endtime="20210602 14:11:31.108"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:31.109" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:31.109" endtime="20210602 14:11:31.109"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${protocolField}</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${protocolField}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.110" endtime="20210602 14:11:31.111"></status> +</kw> +<msg timestamp="20210602 14:11:31.111" level="INFO">${protocolField} = TSG_FIELD_HTTP_RES_CONTENT</msg> +<status status="PASS" starttime="20210602 14:11:31.110" endtime="20210602 14:11:31.111"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectsList}</var> +</assign> +<msg timestamp="20210602 14:11:31.112" level="INFO">${objectsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:31.112" endtime="20210602 14:11:31.112"></status> +</kw> +<kw name="${obj} IN [ @{objectIds} ]" type="for"> +<kw name="${obj} = 107880" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:31.114" level="INFO">${objectList} = {'objectId': 107880, 'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT'}</msg> +<status status="PASS" starttime="20210602 14:11:31.113" endtime="20210602 14:11:31.114"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.114" endtime="20210602 14:11:31.114"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.113" endtime="20210602 14:11:31.115"></status> +</kw> +<kw name="${obj} = 107881" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:31.116" level="INFO">${objectList} = {'objectId': 107880, 'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT'}</msg> +<status status="PASS" starttime="20210602 14:11:31.115" endtime="20210602 14:11:31.116"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.116" endtime="20210602 14:11:31.117"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.115" endtime="20210602 14:11:31.117"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.112" endtime="20210602 14:11:31.117"></status> +</kw> +<msg timestamp="20210602 14:11:31.117" level="INFO">${objectIds} = [107880, 107881]</msg> +<msg timestamp="20210602 14:11:31.117" level="INFO">${objectList} = {'objectId': 107880, 'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT'}</msg> +<status status="PASS" starttime="20210602 14:11:30.931" endtime="20210602 14:11:31.118"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>OrangeFilter</arg> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<kw name="OrangeFilter" library="object"> +<doc>filer对象处理,把一个filter的list处理为一个filter</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${list}</var> +</assign> +<msg timestamp="20210602 14:11:31.120" level="INFO">${list} = [{'objectId': 107880, 'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT'}]</msg> +<status status="PASS" starttime="20210602 14:11:31.119" endtime="20210602 14:11:31.120"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>filter=${list}</arg> +</arguments> +<assign> +<var>${filter}</var> +</assign> +<msg timestamp="20210602 14:11:31.120" level="INFO">${filter} = {'filter': [{'objectId': 107880, 'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT'}]}</msg> +<status status="PASS" starttime="20210602 14:11:31.120" endtime="20210602 14:11:31.120"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.119" endtime="20210602 14:11:31.121"></status> +</kw> +<msg timestamp="20210602 14:11:31.121" level="INFO">${objectList} = {'filter': [{'objectId': 107880, 'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT'}]}</msg> +<status status="PASS" starttime="20210602 14:11:31.118" endtime="20210602 14:11:31.121"></status> +</kw> +<msg timestamp="20210602 14:11:31.121" level="INFO">${objectIds} = [107880, 107881]</msg> +<msg timestamp="20210602 14:11:31.122" level="INFO">${objectList} = {'filter': [{'objectId': 107880, 'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT'}]}</msg> +<status status="PASS" starttime="20210602 14:11:30.928" endtime="20210602 14:11:31.122"></status> +</kw> +<kw name="Get Length" library="BuiltIn"> +<doc>Returns and logs the length of the given item as an integer.</doc> +<arguments> +<arg>${objectIdsList}</arg> +</arguments> +<assign> +<var>${len}</var> +</assign> +<msg timestamp="20210602 14:11:31.122" level="INFO">Length is 14</msg> +<msg timestamp="20210602 14:11:31.122" level="INFO">${len} = 14</msg> +<status status="PASS" starttime="20210602 14:11:31.122" endtime="20210602 14:11:31.123"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${len} != 0</arg> +<arg>AppendListToList</arg> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectIds}</arg> +</arguments> +<assign> +<var>${objectIdsList}</var> +</assign> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.133" endtime="20210602 14:11:31.133"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.134" endtime="20210602 14:11:31.134"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = 107880" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.135" endtime="20210602 14:11:31.135"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.134" endtime="20210602 14:11:31.135"></status> +</kw> +<kw name="${objdict} = 107881" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.135" endtime="20210602 14:11:31.136"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.135" endtime="20210602 14:11:31.136"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.134" endtime="20210602 14:11:31.136"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.133" endtime="20210602 14:11:31.136"></status> +</kw> +<msg timestamp="20210602 14:11:31.137" level="INFO">${objectIdsList} = [107866, 107867, 107868, 107869, 107870, 107871, 107872, 107873, 107874, 107875, 107876, 107877, 107878, 107879, 107880, 107881]</msg> +<status status="PASS" starttime="20210602 14:11:31.123" endtime="20210602 14:11:31.137"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Append To List</arg> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Append To List</arg> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>Append To List</arg> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.138" endtime="20210602 14:11:31.138"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.137" endtime="20210602 14:11:31.138"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:30.927" endtime="20210602 14:11:31.139"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:21.783" endtime="20210602 14:11:31.139"></status> +</kw> +<msg timestamp="20210602 14:11:31.139" level="INFO">${objectIds} = [107866, 107867, 107868, 107869, 107870, 107871, 107872, 107873, 107874, 107875, 107876, 107877, 107878, 107879, 107880, 107881]</msg> +<msg timestamp="20210602 14:11:31.139" level="INFO">${sourceList} = [{'objectId': 107866, 'protocolField': None}, {'objectId': 107868, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}, {'objectId': 107870, 'protocolField': 'TSG_SECURITY_SOURCE_LOCATION'}, {'objectId': 107...</msg> +<msg timestamp="20210602 14:11:31.140" level="INFO">${destinationList} = [{'objectId': 107875, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}, {'objectId': 107876, 'protocolField': 'TSG_SECURITY_DESTINATION_LOCATION'}, {'objectId': 107877, 'protocolField': 'TSG_SECURITY...</msg> +<msg timestamp="20210602 14:11:31.140" level="INFO">${filterList} = [{'filter': [{'objectId': 107878, 'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT'}]}, {'filter': [{'objectId': 107880, 'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT'}]}]</msg> +<status status="PASS" starttime="20210602 14:11:21.779" endtime="20210602 14:11:31.140"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${sourceList}</arg> +</arguments> +<assign> +<var>${sourceList}</var> +</assign> +<msg timestamp="20210602 14:11:31.140" level="INFO">${sourceList} = [{"objectId": 107866, "protocolField": null}, {"objectId": 107868, "protocolField": "TSG_SECURITY_SOURCE_ADDR"}, {"objectId": 107870, "protocolField": "TSG_SECURITY_SOURCE_LOCATION"}, {"objectId": 107...</msg> +<status status="PASS" starttime="20210602 14:11:31.140" endtime="20210602 14:11:31.141"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${destinationList}</arg> +</arguments> +<assign> +<var>${destinationList}</var> +</assign> +<msg timestamp="20210602 14:11:31.141" level="INFO">${destinationList} = [{"objectId": 107875, "protocolField": "TSG_SECURITY_DESTINATION_ADDR"}, {"objectId": 107876, "protocolField": "TSG_SECURITY_DESTINATION_LOCATION"}, {"objectId": 107877, "protocolField": "TSG_SECURITY...</msg> +<status status="PASS" starttime="20210602 14:11:31.141" endtime="20210602 14:11:31.141"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${filterList}</arg> +</arguments> +<assign> +<var>${filterList}</var> +</assign> +<msg timestamp="20210602 14:11:31.142" level="INFO">${filterList} = [{"filter": [{"objectId": 107878, "protocolField": "TSG_FIELD_HTTP_RES_CONTENT"}]}, {"filter": [{"objectId": 107880, "protocolField": "TSG_FIELD_HTTP_RES_CONTENT"}]}]</msg> +<status status="PASS" starttime="20210602 14:11:31.142" endtime="20210602 14:11:31.142"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"source": null</arg> +<arg>"source":${sourceList}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<msg timestamp="20210602 14:11:31.143" level="INFO">${policyJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...</msg> +<status status="PASS" starttime="20210602 14:11:31.143" endtime="20210602 14:11:31.143"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"destination": null</arg> +<arg>"destination":${destinationList}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<msg timestamp="20210602 14:11:31.144" level="INFO">${policyJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...</msg> +<status status="PASS" starttime="20210602 14:11:31.143" endtime="20210602 14:11:31.144"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"filterList": null</arg> +<arg>"filterList":${filterList}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<msg timestamp="20210602 14:11:31.145" level="INFO">${policyJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...</msg> +<status status="PASS" starttime="20210602 14:11:31.144" endtime="20210602 14:11:31.145"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>处理策略数据:</arg> +<arg>"opAction": "add"</arg> +<arg>"returnData": 1</arg> +<arg>"policyName": "autotest"</arg> +<arg>"policyType": "tsg_security"</arg> +<arg>"action": "allow"</arg> +<arg>"userTags": ""</arg> +<arg>"doBlacklist": 0</arg> +<arg>"doLog": 1</arg> +<arg>"policyDesc": "autotest"</arg> +<arg>"effectiveRange":</arg> +<arg>"userRegion":</arg> +<arg>"appIdObjects":</arg> +<arg>"appSelectorObjects":</arg> +<arg>"isValid": 1</arg> +<arg>"scheduleId":</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.145" endtime="20210602 14:11:31.145"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>opAction</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${opAction}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>opAction</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.146" endtime="20210602 14:11:31.146"></status> +</kw> +<msg timestamp="20210602 14:11:31.147" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:31.147" level="INFO">${opAction} = add</msg> +<status status="PASS" starttime="20210602 14:11:31.146" endtime="20210602 14:11:31.147"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${opAction}" != "${EMPTY}"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"opAction": "${opAction}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"opAction": "${opAction}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.148" endtime="20210602 14:11:31.148"></status> +</kw> +<msg timestamp="20210602 14:11:31.148" level="INFO">${policyJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...</msg> +<status status="PASS" starttime="20210602 14:11:31.147" endtime="20210602 14:11:31.148"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${returnData}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>returnData</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.150" endtime="20210602 14:11:31.150"></status> +</kw> +<msg timestamp="20210602 14:11:31.150" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:31.150" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:31.149" endtime="20210602 14:11:31.151"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${returnData}" != "${EMPTY}"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"returnData": 1</arg> +<arg>"returnData": "${returnData}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"returnData": 1</arg> +<arg>"returnData": "${returnData}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.152" endtime="20210602 14:11:31.152"></status> +</kw> +<msg timestamp="20210602 14:11:31.152" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest",...</msg> +<status status="PASS" starttime="20210602 14:11:31.151" endtime="20210602 14:11:31.152"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>policyName</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${policyName}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>policyName</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.153" endtime="20210602 14:11:31.153"></status> +</kw> +<msg timestamp="20210602 14:11:31.154" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:31.154" level="INFO">${policyName} = autotestmonitor</msg> +<status status="PASS" starttime="20210602 14:11:31.153" endtime="20210602 14:11:31.154"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${policyName}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"policyName": "autotest"</arg> +<arg>"policyName": "${policyName}"</arg> +<arg>ELSE</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"policyName": "autotest"</arg> +<arg>"policyName": "${testName}"</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"policyName": "autotest"</arg> +<arg>"policyName": "${policyName}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.155" endtime="20210602 14:11:31.155"></status> +</kw> +<msg timestamp="20210602 14:11:31.155" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestmonitor", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "aut...</msg> +<status status="PASS" starttime="20210602 14:11:31.154" endtime="20210602 14:11:31.155"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>policyType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${policyType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>policyType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.156" endtime="20210602 14:11:31.156"></status> +</kw> +<msg timestamp="20210602 14:11:31.157" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:31.157" level="INFO">${policyType} = tsg_security</msg> +<status status="PASS" starttime="20210602 14:11:31.156" endtime="20210602 14:11:31.157"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${policyType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"policyType": "tsg_security"</arg> +<arg>"policyType": "${policyType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"policyType": "tsg_security"</arg> +<arg>"policyType": "${policyType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.158" endtime="20210602 14:11:31.158"></status> +</kw> +<msg timestamp="20210602 14:11:31.158" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestmonitor", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "aut...</msg> +<status status="PASS" starttime="20210602 14:11:31.157" endtime="20210602 14:11:31.158"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>action</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${action}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>action</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.159" endtime="20210602 14:11:31.160"></status> +</kw> +<msg timestamp="20210602 14:11:31.160" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:31.160" level="INFO">${action} = monitor</msg> +<status status="PASS" starttime="20210602 14:11:31.159" endtime="20210602 14:11:31.160"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${action}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"action": "allow"</arg> +<arg>"action": "${action}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"action": "allow"</arg> +<arg>"action": "${action}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.161" endtime="20210602 14:11:31.161"></status> +</kw> +<msg timestamp="20210602 14:11:31.162" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestmonitor", "policyType": "tsg_security", "action": "monitor", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "a...</msg> +<status status="PASS" starttime="20210602 14:11:31.160" endtime="20210602 14:11:31.162"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>method</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${method}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>method</arg> +</arguments> +<msg timestamp="20210602 14:11:31.163" level="FAIL">Dictionary does not contain key 'method'.</msg> +<status status="FAIL" starttime="20210602 14:11:31.162" endtime="20210602 14:11:31.163"></status> +</kw> +<msg timestamp="20210602 14:11:31.163" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:31.163" level="INFO">${method} = Dictionary does not contain key 'method'.</msg> +<status status="PASS" starttime="20210602 14:11:31.162" endtime="20210602 14:11:31.163"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>userTags</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${userTags}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>userTags</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.164" endtime="20210602 14:11:31.164"></status> +</kw> +<msg timestamp="20210602 14:11:31.165" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:31.165" level="INFO">${userTags} = </msg> +<status status="PASS" starttime="20210602 14:11:31.164" endtime="20210602 14:11:31.165"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${userTags}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"userTags": null</arg> +<arg>"userTags": ${userTags}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"userTags": null</arg> +<arg>"userTags": ${userTags}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.166" endtime="20210602 14:11:31.166"></status> +</kw> +<msg timestamp="20210602 14:11:31.166" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestmonitor", "policyType": "tsg_security", "action": "monitor", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "a...</msg> +<status status="PASS" starttime="20210602 14:11:31.165" endtime="20210602 14:11:31.167"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>doBlacklist</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${doBlacklist}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>doBlacklist</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.167" endtime="20210602 14:11:31.168"></status> +</kw> +<msg timestamp="20210602 14:11:31.168" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:31.168" level="INFO">${doBlacklist} = 0</msg> +<status status="PASS" starttime="20210602 14:11:31.167" endtime="20210602 14:11:31.168"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${doBlacklist}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"doBlacklist": 0</arg> +<arg>"doBlacklist": ${doBlacklist}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"doBlacklist": 0</arg> +<arg>"doBlacklist": ${doBlacklist}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.169" endtime="20210602 14:11:31.170"></status> +</kw> +<msg timestamp="20210602 14:11:31.170" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestmonitor", "policyType": "tsg_security", "action": "monitor", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "a...</msg> +<status status="PASS" starttime="20210602 14:11:31.169" endtime="20210602 14:11:31.170"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>doLog</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${doLog}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>doLog</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.171" endtime="20210602 14:11:31.171"></status> +</kw> +<msg timestamp="20210602 14:11:31.171" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:31.171" level="INFO">${doLog} = 1</msg> +<status status="PASS" starttime="20210602 14:11:31.170" endtime="20210602 14:11:31.172"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${doLog}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"doLog": 1</arg> +<arg>"doLog": ${doLog}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"doLog": 1</arg> +<arg>"doLog": ${doLog}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.172" endtime="20210602 14:11:31.173"></status> +</kw> +<msg timestamp="20210602 14:11:31.173" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestmonitor", "policyType": "tsg_security", "action": "monitor", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "a...</msg> +<status status="PASS" starttime="20210602 14:11:31.172" endtime="20210602 14:11:31.173"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>policyDesc</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${policyDesc}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>policyDesc</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.174" endtime="20210602 14:11:31.174"></status> +</kw> +<msg timestamp="20210602 14:11:31.174" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:31.174" level="INFO">${policyDesc} = autotest</msg> +<status status="PASS" starttime="20210602 14:11:31.173" endtime="20210602 14:11:31.175"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${policyDesc}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"policyDesc": "autotest"</arg> +<arg>"policyDesc": "${policyDesc}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"policyDesc": "autotest"</arg> +<arg>"policyDesc": "${policyDesc}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.175" endtime="20210602 14:11:31.176"></status> +</kw> +<msg timestamp="20210602 14:11:31.176" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestmonitor", "policyType": "tsg_security", "action": "monitor", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "a...</msg> +<status status="PASS" starttime="20210602 14:11:31.175" endtime="20210602 14:11:31.176"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>effectiveRange</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${effectiveRange}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>effectiveRange</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.177" endtime="20210602 14:11:31.177"></status> +</kw> +<msg timestamp="20210602 14:11:31.177" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:31.177" level="INFO">${effectiveRange} = None</msg> +<status status="PASS" starttime="20210602 14:11:31.176" endtime="20210602 14:11:31.178"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${effectiveRange}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"effectiveRange": null</arg> +<arg>"effectiveRange": ${effectiveRange}</arg> +<arg>ELSE</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"effectiveRange": null</arg> +<arg>"effectiveRange": {}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"effectiveRange": null</arg> +<arg>"effectiveRange": {}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.178" endtime="20210602 14:11:31.179"></status> +</kw> +<msg timestamp="20210602 14:11:31.179" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestmonitor", "policyType": "tsg_security", "action": "monitor", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "a...</msg> +<status status="PASS" starttime="20210602 14:11:31.178" endtime="20210602 14:11:31.179"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>userRegion</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${userRegion}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>userRegion</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.180" endtime="20210602 14:11:31.181"></status> +</kw> +<msg timestamp="20210602 14:11:31.181" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:31.181" level="INFO">${userRegion} = None</msg> +<status status="PASS" starttime="20210602 14:11:31.180" endtime="20210602 14:11:31.181"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>code</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${code}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>code</arg> +</arguments> +<msg timestamp="20210602 14:11:31.182" level="FAIL">Dictionary does not contain key 'code'.</msg> +<status status="FAIL" starttime="20210602 14:11:31.182" endtime="20210602 14:11:31.182"></status> +</kw> +<msg timestamp="20210602 14:11:31.183" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:31.183" level="INFO">${code} = Dictionary does not contain key 'code'.</msg> +<status status="PASS" starttime="20210602 14:11:31.182" endtime="20210602 14:11:31.183"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>message</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${message}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>message</arg> +</arguments> +<msg timestamp="20210602 14:11:31.184" level="FAIL">Dictionary does not contain key 'message'.</msg> +<status status="FAIL" starttime="20210602 14:11:31.184" endtime="20210602 14:11:31.184"></status> +</kw> +<msg timestamp="20210602 14:11:31.185" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:31.185" level="INFO">${message} = Dictionary does not contain key 'message'.</msg> +<status status="PASS" starttime="20210602 14:11:31.183" endtime="20210602 14:11:31.185"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>html_profile</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${html_profile}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>html_profile</arg> +</arguments> +<msg timestamp="20210602 14:11:31.186" level="FAIL">Dictionary does not contain key 'html_profile'.</msg> +<status status="FAIL" starttime="20210602 14:11:31.186" endtime="20210602 14:11:31.186"></status> +</kw> +<msg timestamp="20210602 14:11:31.186" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:31.186" level="INFO">${html_profile} = Dictionary does not contain key 'html_profile'.</msg> +<status status="PASS" starttime="20210602 14:11:31.185" endtime="20210602 14:11:31.187"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${html_profile}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${html_profile}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${message}</arg> +</arguments> +<assign> +<var>${message}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${message}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.187" endtime="20210602 14:11:31.188"></status> +</kw> +<msg timestamp="20210602 14:11:31.188" level="INFO">${message} = Dictionary does not contain key 'message'.</msg> +<status status="PASS" starttime="20210602 14:11:31.187" endtime="20210602 14:11:31.188"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${html_profile}" != "None"</arg> +<arg>Set Variable</arg> +<arg>html_profile</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>message</arg> +</arguments> +<assign> +<var>${messageKey}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>message</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.189" endtime="20210602 14:11:31.189"></status> +</kw> +<msg timestamp="20210602 14:11:31.189" level="INFO">${messageKey} = message</msg> +<status status="PASS" starttime="20210602 14:11:31.188" endtime="20210602 14:11:31.189"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>keyring</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${keyring}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>keyring</arg> +</arguments> +<msg timestamp="20210602 14:11:31.191" level="FAIL">Dictionary does not contain key 'keyring'.</msg> +<status status="FAIL" starttime="20210602 14:11:31.190" endtime="20210602 14:11:31.191"></status> +</kw> +<msg timestamp="20210602 14:11:31.191" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:31.191" level="INFO">${keyring} = Dictionary does not contain key 'keyring'.</msg> +<status status="PASS" starttime="20210602 14:11:31.190" endtime="20210602 14:11:31.191"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${keyring}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${keyring}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>""</arg> +</arguments> +<assign> +<var>${keyring}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>""</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.192" endtime="20210602 14:11:31.193"></status> +</kw> +<msg timestamp="20210602 14:11:31.193" level="INFO">${keyring} = ""</msg> +<status status="PASS" starttime="20210602 14:11:31.192" endtime="20210602 14:11:31.193"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>decryption</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${decryption}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>decryption</arg> +</arguments> +<msg timestamp="20210602 14:11:31.194" level="FAIL">Dictionary does not contain key 'decryption'.</msg> +<status status="FAIL" starttime="20210602 14:11:31.194" endtime="20210602 14:11:31.194"></status> +</kw> +<msg timestamp="20210602 14:11:31.194" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:31.194" level="INFO">${decryption} = Dictionary does not contain key 'decryption'.</msg> +<status status="PASS" starttime="20210602 14:11:31.193" endtime="20210602 14:11:31.195"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${decryption}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${decryption}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>""</arg> +</arguments> +<assign> +<var>${decryption}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>""</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.195" endtime="20210602 14:11:31.196"></status> +</kw> +<msg timestamp="20210602 14:11:31.196" level="INFO">${decryption} = ""</msg> +<status status="PASS" starttime="20210602 14:11:31.195" endtime="20210602 14:11:31.196"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>decrypt_mirror</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${decrypt_mirror}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>decrypt_mirror</arg> +</arguments> +<msg timestamp="20210602 14:11:31.197" level="FAIL">Dictionary does not contain key 'decrypt_mirror'.</msg> +<status status="FAIL" starttime="20210602 14:11:31.197" endtime="20210602 14:11:31.197"></status> +</kw> +<msg timestamp="20210602 14:11:31.198" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:31.198" level="INFO">${decrypt_mirror} = Dictionary does not contain key 'decrypt_mirror'.</msg> +<status status="PASS" starttime="20210602 14:11:31.196" endtime="20210602 14:11:31.198"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${decrypt_mirror}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${decrypt_mirror}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>""</arg> +</arguments> +<assign> +<var>${decrypt_mirror}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>""</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.199" endtime="20210602 14:11:31.199"></status> +</kw> +<msg timestamp="20210602 14:11:31.199" level="INFO">${decrypt_mirror} = ""</msg> +<status status="PASS" starttime="20210602 14:11:31.198" endtime="20210602 14:11:31.199"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${decrypt_mirror}</arg> +</arguments> +<assign> +<var>${decrypt_mirror}</var> +</assign> +<msg timestamp="20210602 14:11:31.200" level="INFO">${decrypt_mirror} = "\"\""</msg> +<status status="PASS" starttime="20210602 14:11:31.200" endtime="20210602 14:11:31.200"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>appIdObjects</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${appIdObjects}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>appIdObjects</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.201" endtime="20210602 14:11:31.201"></status> +</kw> +<msg timestamp="20210602 14:11:31.202" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:31.202" level="INFO">${appIdObjects} = ['http']</msg> +<status status="PASS" starttime="20210602 14:11:31.200" endtime="20210602 14:11:31.202"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${appIdObjectIds}</var> +</assign> +<msg timestamp="20210602 14:11:31.202" level="INFO">${appIdObjectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:31.202" endtime="20210602 14:11:31.202"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>userRegionStr由:动作,协议,动作参数等决定,待完成;userregion在allow,monitor动作时多个协议为空;deny,多个协议时为子动作;Intercept,多个协议为空;http为,ssl为,判断appid对象的个数。</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.203" endtime="20210602 14:11:31.203"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<assign> +<var>${userRegionStr}</var> +</assign> +<msg timestamp="20210602 14:11:31.204" level="INFO">${userRegionStr} = </msg> +<status status="PASS" starttime="20210602 14:11:31.203" endtime="20210602 14:11:31.204"></status> +</kw> +<kw name="${key} IN [ @{appIdObjects} ]" type="for"> +<kw name="${key} = http" type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objprotol}</arg> +<arg>${key}</arg> +</arguments> +<assign> +<var>${appObjId}</var> +</assign> +<msg timestamp="20210602 14:11:31.205" level="INFO">${appObjId} = 75744</msg> +<status status="PASS" starttime="20210602 14:11:31.204" endtime="20210602 14:11:31.205"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${appIdObjectIds}</arg> +<arg>${appObjId}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.205" endtime="20210602 14:11:31.206"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${method}" == "block" or "${method}" == "alert"</arg> +<arg>Set Variable</arg> +<arg>{"protocol":"${key}","method": "${method}","code":${code},"${messageKey}":${message}}</arg> +<arg>ELSE IF</arg> +<arg>"${action}" == "deny"</arg> +<arg>Set Variable</arg> +<arg>{"protocol":"${key}","method": "${method}"}</arg> +<arg>ELSE IF</arg> +<arg>"${action}" == "intercept" and "${key}" == "ssl"</arg> +<arg>Set Variable</arg> +<arg>{"protocol":"SSL","keyring": ${keyring},"decryption":${decryption},"decrypt_mirror":${decrypt_mirror}}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>{"protocol":"HTTP"}</arg> +</arguments> +<assign> +<var>${userRegionStr}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"protocol":"HTTP"}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.206" endtime="20210602 14:11:31.207"></status> +</kw> +<msg timestamp="20210602 14:11:31.207" level="INFO">${userRegionStr} = {"protocol":"HTTP"}</msg> +<status status="PASS" starttime="20210602 14:11:31.206" endtime="20210602 14:11:31.207"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.204" endtime="20210602 14:11:31.207"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.204" endtime="20210602 14:11:31.207"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${appIdObjects}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"appIdObjects": [null]</arg> +<arg>"appIdObjects": ${appIdObjectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"appIdObjects": [null]</arg> +<arg>"appIdObjects": ${appIdObjectIds}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.208" endtime="20210602 14:11:31.209"></status> +</kw> +<msg timestamp="20210602 14:11:31.209" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestmonitor", "policyType": "tsg_security", "action": "monitor", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "a...</msg> +<status status="PASS" starttime="20210602 14:11:31.208" endtime="20210602 14:11:31.209"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"userRegion": null</arg> +<arg>"userRegion": ${userRegionStr}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<msg timestamp="20210602 14:11:31.210" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestmonitor", "policyType": "tsg_security", "action": "monitor", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "a...</msg> +<status status="PASS" starttime="20210602 14:11:31.209" endtime="20210602 14:11:31.210"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"userRegion": null</arg> +<arg>"userRegion": {}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<msg timestamp="20210602 14:11:31.210" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestmonitor", "policyType": "tsg_security", "action": "monitor", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "a...</msg> +<status status="PASS" starttime="20210602 14:11:31.210" endtime="20210602 14:11:31.211"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>appSelectorObjects</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${appSelectorObjects}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>appSelectorObjects</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.211" endtime="20210602 14:11:31.212"></status> +</kw> +<msg timestamp="20210602 14:11:31.212" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:31.212" level="INFO">${appSelectorObjects} = None</msg> +<status status="PASS" starttime="20210602 14:11:31.211" endtime="20210602 14:11:31.213"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL"</arg> +<arg>Set Variable</arg> +<arg>${appSelectorObjects}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${appSelectorObjects}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${appSelectorObjects}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.213" endtime="20210602 14:11:31.214"></status> +</kw> +<msg timestamp="20210602 14:11:31.214" level="INFO">${appSelectorObjects} = None</msg> +<status status="PASS" starttime="20210602 14:11:31.213" endtime="20210602 14:11:31.215"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${appSelectorObjects}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"appSelectorObjects": "add"</arg> +<arg>"appSelectorObjects": ${appSelectorObjects}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${policyJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.215" endtime="20210602 14:11:31.216"></status> +</kw> +<msg timestamp="20210602 14:11:31.216" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestmonitor", "policyType": "tsg_security", "action": "monitor", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "a...</msg> +<status status="PASS" starttime="20210602 14:11:31.215" endtime="20210602 14:11:31.216"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>isValid</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${isValid}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>isValid</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.217" endtime="20210602 14:11:31.217"></status> +</kw> +<msg timestamp="20210602 14:11:31.218" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:31.218" level="INFO">${isValid} = 1</msg> +<status status="PASS" starttime="20210602 14:11:31.217" endtime="20210602 14:11:31.218"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL"</arg> +<arg>Set Variable</arg> +<arg>${isValid}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${appSelectorObjects}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${isValid}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.219" endtime="20210602 14:11:31.219"></status> +</kw> +<msg timestamp="20210602 14:11:31.220" level="INFO">${appSelectorObjects} = 1</msg> +<status status="PASS" starttime="20210602 14:11:31.218" endtime="20210602 14:11:31.220"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${isValid}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"isValid": 1</arg> +<arg>"isValid": ${isValid}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"isValid": 1</arg> +<arg>"isValid": ${isValid}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.221" endtime="20210602 14:11:31.221"></status> +</kw> +<msg timestamp="20210602 14:11:31.221" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestmonitor", "policyType": "tsg_security", "action": "monitor", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "a...</msg> +<status status="PASS" starttime="20210602 14:11:31.220" endtime="20210602 14:11:31.221"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>scheduleId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${scheduleId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>scheduleId</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.222" endtime="20210602 14:11:31.223"></status> +</kw> +<msg timestamp="20210602 14:11:31.223" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:31.223" level="INFO">${scheduleId} = None</msg> +<status status="PASS" starttime="20210602 14:11:31.222" endtime="20210602 14:11:31.223"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL"</arg> +<arg>Set Variable</arg> +<arg>${scheduleId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${scheduleId}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${scheduleId}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.224" endtime="20210602 14:11:31.224"></status> +</kw> +<msg timestamp="20210602 14:11:31.225" level="INFO">${scheduleId} = None</msg> +<status status="PASS" starttime="20210602 14:11:31.223" endtime="20210602 14:11:31.225"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${scheduleId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"scheduleId": [null]</arg> +<arg>"scheduleId": ${scheduleId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${policyJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.226" endtime="20210602 14:11:31.226"></status> +</kw> +<msg timestamp="20210602 14:11:31.226" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestmonitor", "policyType": "tsg_security", "action": "monitor", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "a...</msg> +<status status="PASS" starttime="20210602 14:11:31.225" endtime="20210602 14:11:31.227"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<msg timestamp="20210602 14:11:31.228" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestmonitor", "policyType": "tsg_security", "action": "monitor", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "a...</msg> +<status status="PASS" starttime="20210602 14:11:31.227" endtime="20210602 14:11:31.228"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<msg timestamp="20210602 14:11:31.229" level="INFO">${policyJson} = {'opAction': 'add', 'returnData': '1', 'policyList': {'policyName': 'autotestmonitor', 'policyType': 'tsg_security', 'action': 'monitor', 'userTags': '', 'doBlacklist': 0, 'doLog': 1, 'policyDesc': 'a...</msg> +<status status="PASS" starttime="20210602 14:11:31.228" endtime="20210602 14:11:31.229"></status> +</kw> +<kw name="CreatePolilcy" library="policy"> +<doc>场景策略:secuiryt、proxy策略 +数据分离,测试数据来自对应的yaml文件 +参数 ${policyList}</doc> +<arguments> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数</arg> +<arg>${filepath}读取文件路径</arg> +<arg>${filename}读取文件名</arg> +<arg>${keywords}获取数据关键字</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.232" endtime="20210602 14:11:31.232"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建策略</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.233" endtime="20210602 14:11:31.233"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:31.234" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:31.233" endtime="20210602 14:11:31.234"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${policyList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:31.234" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestmonitor", "policyType": "tsg_security", "action": "monitor", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "a...</msg> +<status status="PASS" starttime="20210602 14:11:31.234" endtime="20210602 14:11:31.235"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${policyUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version2}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:31.236" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:31.235" endtime="20210602 14:11:31.236"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:31.236" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v2, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:31.236" endtime="20210602 14:11:31.237"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:31.238" level="INFO">POST Request using : uri=/policy/compile, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestmonitor", "policyType": "tsg_security", "action": "monitor", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "effectiveRange": {}, "userRegion": {"protocol": "HTTP"}, "source": [{"objectId": 107866, "protocolField": null}, {"objectId": 107868, "protocolField": "TSG_SECURITY_SOURCE_ADDR"}, {"objectId": 107870, "protocolField": "TSG_SECURITY_SOURCE_LOCATION"}, {"objectId": 107871, "protocolField": "TSG_FILED_GTP_IMSI"}, {"objectId": 107872, "protocolField": "TSG_FILED_GTP_PHONE_NUMBER"}, {"objectId": 107873, "protocolField": "TSG_FILED_GTP_APN"}, {"objectId": 107874, "protocolField": "TSG_SECURITY_SOURCE_ADDR"}], "destination": [{"objectId": 107875, "protocolField": "TSG_SECURITY_DESTINATION_ADDR"}, {"objectId": 107876, "protocolField": "TSG_SECURITY_DESTINATION_LOCATION"}, {"objectId": 107877, "protocolField": "TSG_SECURITY_DESTINATION_ADDR"}], "filterList": [{"filter": [{"objectId": 107878, "protocolField": "TSG_FIELD_HTTP_RES_CONTENT"}]}, {"filter": [{"objectId": 107880, "protocolField": "TSG_FIELD_HTTP_RES_CONTENT"}]}], "appIdObjects": [75744], "appSelectorObjects": [], "isValid": 1, "scheduleId": []}} +json=None</msg> +<msg timestamp="20210602 14:11:31.444" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:31.237" endtime="20210602 14:11:31.445"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:31.446" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:31.445" endtime="20210602 14:11:31.447"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:31.449" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:31.448" endtime="20210602 14:11:31.449"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:31.451" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "policyList" : [ { + "action" : "monitor", + "appIdObjects" : [ 75744 ], + "appSelectorObjects" : [ ], + "destination" : [ { + "objectId" : 107875, + "protocolField" : "TSG_SECURITY_DESTINATION_ADDR" + }, { + "objectId" : 107876, + "protocolField" : "TSG_SECURITY_DESTINATION_LOCATION" + }, { + "objectId" : 107877, + "protocolField" : "TSG_SECURITY_DESTINATION_ADDR" + } ], + "doLog" : 1, + "effectiveRange" : { }, + "evaluationLayer" : "any_layer", + "evaluationOrder" : 0.0, + "evaluationStage" : 0, + "filterList" : [ { + "filter" : [ { + "objectId" : 107878, + "protocolField" : "TSG_FIELD_HTTP_RES_CONTENT" + } ] + }, { + "filter" : [ { + "objectId" : 107880, + "protocolField" : "TSG_FIELD_HTTP_RES_CONTENT" + } ] + } ], + "isInitialize" : 0, + "isValid" : 1, + "opTime" : "2021-06-02 14:11:30", + "opUser" : 425, + "policyDesc" : "autotest", + "policyId" : 52340, + "policyName" : "autotestmonitor", + "policyType" : "tsg_security", + "scheduleId" : [ ], + "source" : [ { + "objectId" : 107866, + "protocolField" : null + }, { + "objectId" : 107868, + "protocolField" : "TSG_SECURITY_SOURCE_ADDR" + }, { + "objectId" : 107870, + "protocolField" : "TSG_SECURITY_SOURCE_LOCATION" + }, { + "objectId" : 107871, + "protocolField" : "TSG_FILED_GTP_IMSI" + }, { + "objectId" : 107872, + "protocolField" : "TSG_FILED_GTP_PHONE_NUMBER" + }, { + "objectId" : 107873, + "protocolField" : "TSG_FILED_GTP_APN" + }, { + "objectId" : 107874, + "protocolField" : "TSG_SECURITY_SOURCE_ADDR" + } ], + "userRegion" : { + "protocol" : "HTTP" + }, + "userTags" : "" + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:31.452" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:31.453" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'policyList': [{'action': 'monitor', 'appIdObjects': [75744], 'appSelectorObjects': [], 'destination': [{'objectId': 107875, 'protocolField': 'TSG_SECURITY_DES...</msg> +<status status="PASS" starttime="20210602 14:11:31.450" endtime="20210602 14:11:31.453"></status> +</kw> +<msg timestamp="20210602 14:11:31.454" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'policyList': [{'action': 'monitor', 'appIdObjects': [75744], 'appSelectorObjects': [], 'destination': [{'objectId': 107875, 'protocolField': 'TSG_SECURITY_DES...</msg> +<status status="PASS" starttime="20210602 14:11:31.235" endtime="20210602 14:11:31.454"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>GetPolicyIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${policyIds}</var> +</assign> +<kw name="GetPolicyIds" library="process_policy_body"> +<doc>获取结果中的策略类型及ID +策略接口返回json串 +返回结果格式:[{'policyType': 'tsg_security', 'policyIds': [108480]}, {'policyType': 'tsg_security', 'policyIds': [108481]}, {'policyType': 'tsg_security', 'policyIds': [108482]}, {'policyType': 'tsg_security', 'policyIds': [108483]}, {'policyType': 'tsg_security', 'policyIds': [108484]}]</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${policyIds}</var> +</assign> +<msg timestamp="20210602 14:11:31.459" level="INFO">${policyIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:31.458" endtime="20210602 14:11:31.459"></status> +</kw> +<kw name="${policy} IN [ @{value['data']['policyList']} ]" type="for"> +<kw name="${policy} = {'action': 'monitor', 'appIdObjects': [75744], 'appSelectorObjects': [], 'destination': [{'objectId': 107875, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}, {'objectId': 107876, 'protocolField': '..." type="foritem"> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<arguments> +<arg>${policy['policyId']}</arg> +</arguments> +<assign> +<var>${policyIdList}</var> +</assign> +<msg timestamp="20210602 14:11:31.462" level="INFO">${policyIdList} = [52340]</msg> +<status status="PASS" starttime="20210602 14:11:31.461" endtime="20210602 14:11:31.463"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>policyType=${policy['policyType']}</arg> +<arg>policyIds=${policyIdList}</arg> +</arguments> +<assign> +<var>${policyObj}</var> +</assign> +<msg timestamp="20210602 14:11:31.464" level="INFO">${policyObj} = {'policyType': 'tsg_security', 'policyIds': [52340]}</msg> +<status status="PASS" starttime="20210602 14:11:31.463" endtime="20210602 14:11:31.465"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${policyIds}</arg> +<arg>${policyObj}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.465" endtime="20210602 14:11:31.466"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.461" endtime="20210602 14:11:31.467"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.460" endtime="20210602 14:11:31.467"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>${policyIds}</arg> +</arguments> +<msg timestamp="20210602 14:11:31.468" level="INFO">[{'policyType': 'tsg_security', 'policyIds': [52340]}]</msg> +<status status="PASS" starttime="20210602 14:11:31.467" endtime="20210602 14:11:31.468"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.457" endtime="20210602 14:11:31.469"></status> +</kw> +<msg timestamp="20210602 14:11:31.469" level="INFO">${policyIds} = [{'policyType': 'tsg_security', 'policyIds': [52340]}]</msg> +<status status="PASS" starttime="20210602 14:11:31.455" endtime="20210602 14:11:31.469"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:31.471" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:31.470" endtime="20210602 14:11:31.471"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:31.472" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:31.471" endtime="20210602 14:11:31.472"></status> +</kw> +<msg timestamp="20210602 14:11:31.473" level="INFO">${policyIds} = [{'policyType': 'tsg_security', 'policyIds': [52340]}]</msg> +<status status="PASS" starttime="20210602 14:11:31.232" endtime="20210602 14:11:31.473"></status> +</kw> +<msg timestamp="20210602 14:11:31.473" level="INFO">${objectId} = [107866, 107867, 107868, 107869, 107870, 107871, 107872, 107873, 107874, 107875, 107876, 107877, 107878, 107879, 107880, 107881]</msg> +<msg timestamp="20210602 14:11:31.473" level="INFO">${policyId} = [{'policyType': 'tsg_security', 'policyIds': [52340]}]</msg> +<status status="PASS" starttime="20210602 14:11:21.774" endtime="20210602 14:11:31.474"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${objectId}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.486" endtime="20210602 14:11:31.487"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.487" endtime="20210602 14:11:31.487"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = 107866" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.488" endtime="20210602 14:11:31.488"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.488" endtime="20210602 14:11:31.488"></status> +</kw> +<kw name="${objdict} = 107867" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.489" endtime="20210602 14:11:31.489"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.489" endtime="20210602 14:11:31.489"></status> +</kw> +<kw name="${objdict} = 107868" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.490" endtime="20210602 14:11:31.490"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.490" endtime="20210602 14:11:31.490"></status> +</kw> +<kw name="${objdict} = 107869" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.491" endtime="20210602 14:11:31.491"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.491" endtime="20210602 14:11:31.491"></status> +</kw> +<kw name="${objdict} = 107870" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.492" endtime="20210602 14:11:31.492"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.491" endtime="20210602 14:11:31.492"></status> +</kw> +<kw name="${objdict} = 107871" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.493" endtime="20210602 14:11:31.493"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.492" endtime="20210602 14:11:31.493"></status> +</kw> +<kw name="${objdict} = 107872" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.494" endtime="20210602 14:11:31.494"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.493" endtime="20210602 14:11:31.494"></status> +</kw> +<kw name="${objdict} = 107873" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.495" endtime="20210602 14:11:31.495"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.494" endtime="20210602 14:11:31.495"></status> +</kw> +<kw name="${objdict} = 107874" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.496" endtime="20210602 14:11:31.496"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.495" endtime="20210602 14:11:31.496"></status> +</kw> +<kw name="${objdict} = 107875" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.497" endtime="20210602 14:11:31.498"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.496" endtime="20210602 14:11:31.498"></status> +</kw> +<kw name="${objdict} = 107876" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.498" endtime="20210602 14:11:31.499"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.498" endtime="20210602 14:11:31.499"></status> +</kw> +<kw name="${objdict} = 107877" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.499" endtime="20210602 14:11:31.500"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.499" endtime="20210602 14:11:31.500"></status> +</kw> +<kw name="${objdict} = 107878" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.501" endtime="20210602 14:11:31.501"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.500" endtime="20210602 14:11:31.501"></status> +</kw> +<kw name="${objdict} = 107879" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.501" endtime="20210602 14:11:31.502"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.501" endtime="20210602 14:11:31.502"></status> +</kw> +<kw name="${objdict} = 107880" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.502" endtime="20210602 14:11:31.503"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.502" endtime="20210602 14:11:31.503"></status> +</kw> +<kw name="${objdict} = 107881" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.503" endtime="20210602 14:11:31.504"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.503" endtime="20210602 14:11:31.504"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.487" endtime="20210602 14:11:31.504"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.486" endtime="20210602 14:11:31.504"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${policyIds}</arg> +<arg>${policyId}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.519" endtime="20210602 14:11:31.519"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.520" endtime="20210602 14:11:31.520"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'policyType': 'tsg_security', 'policyIds': [52340]}" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.521" endtime="20210602 14:11:31.521"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.520" endtime="20210602 14:11:31.521"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.520" endtime="20210602 14:11:31.521"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.518" endtime="20210602 14:11:31.521"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:21.768" endtime="20210602 14:11:31.522"></status> +</kw> +<kw name="${key} = {'opAction': 'add', 'returnData': 1, 'policyName': 'autotestdeny', 'policyType': 'tsg_security', 'action': 'deny', 'method': 'block', 'code': 403, 'html_profile': 2551, 'userTags': '', 'doBlacklist': ..." type="foritem"> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>passssssssss</arg> +</arguments> +<msg timestamp="20210602 14:11:31.523" level="INFO">passssssssss</msg> +<status status="PASS" starttime="20210602 14:11:31.522" endtime="20210602 14:11:31.523"></status> +</kw> +<kw name="CreatePolicysAndObjects" library="policy"> +<doc>组织单个策略数据${modleFilePath}策略模板文件路径 ${policyData}从数据文件中获取的单个策略数据</doc> +<arguments> +<arg>${key}</arg> +<arg>${keyword}</arg> +</arguments> +<assign> +<var>${objectId}</var> +<var>${policyId}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>获取模板</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.529" endtime="20210602 14:11:31.529"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${policyModeJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.530" endtime="20210602 14:11:31.530"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${policyModeJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<msg timestamp="20210602 14:11:31.531" level="INFO">${policyJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...</msg> +<status status="PASS" starttime="20210602 14:11:31.530" endtime="20210602 14:11:31.531"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>用data数据替换模板内容生成策略新增数据</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.531" endtime="20210602 14:11:31.531"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>condation</arg> +</arguments> +<assign> +<var>${condation}</var> +</assign> +<msg timestamp="20210602 14:11:31.532" level="INFO">${condation} = [{'protocolField': 'TSG_SECURITY_SOURCE_ADDR', 'objectType': 'ip', 'objectSubType': 'endpoint', 'objList': [{'addItemList': [{'ip': '255.255.255.255', 'port': '0-65535'}, {'ip': '255.255.255.255', 'po...</msg> +<status status="PASS" starttime="20210602 14:11:31.532" endtime="20210602 14:11:31.532"></status> +</kw> +<kw name="CreateCondation" library="policy"> +<doc>解析策略条件,根据key值判断其在source、destation、filter中</doc> +<arguments> +<arg>${condation}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${sourceList}</var> +<var>${destinationList}</var> +<var>${filterList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>循环读取对象list</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.533" endtime="20210602 14:11:31.533"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${sourceList}</var> +</assign> +<msg timestamp="20210602 14:11:31.534" level="INFO">${sourceList} = []</msg> +<status status="PASS" starttime="20210602 14:11:31.533" endtime="20210602 14:11:31.534"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${destinationList}</var> +</assign> +<msg timestamp="20210602 14:11:31.534" level="INFO">${destinationList} = []</msg> +<status status="PASS" starttime="20210602 14:11:31.534" endtime="20210602 14:11:31.534"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${filterList}</var> +</assign> +<msg timestamp="20210602 14:11:31.535" level="INFO">${filterList} = []</msg> +<status status="PASS" starttime="20210602 14:11:31.535" endtime="20210602 14:11:31.535"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIdsList}</var> +</assign> +<msg timestamp="20210602 14:11:31.536" level="INFO">${objectIdsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:31.536" endtime="20210602 14:11:31.536"></status> +</kw> +<kw name="${key} IN [ @{objectListData} ]" type="for"> +<kw name="${key} = {'protocolField': 'TSG_SECURITY_SOURCE_ADDR', 'objectType': 'ip', 'objectSubType': 'endpoint', 'objList': [{'addItemList': [{'ip': '255.255.255.255', 'port': '0-65535'}, {'ip': '255.255.255.255', 'por..." type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${key}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:31.537" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:31.537" endtime="20210602 14:11:31.537"></status> +</kw> +<kw name="CreateObjectList" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${key}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.538" endtime="20210602 14:11:31.538"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:31.539" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:31.539" endtime="20210602 14:11:31.539"></status> +</kw> +<kw name="CreateObjects" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.540" endtime="20210602 14:11:31.540"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:31.541" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:31.541" endtime="20210602 14:11:31.541"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objList</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:31.542" level="INFO">${objList} = [{'addItemList': [{'ip': '255.255.255.255', 'port': '0-65535'}, {'ip': '255.255.255.255', 'port': '1-65535'}]}, {'addItemList': [{'ip': '255.255.255.1-255.255.255.255', 'port': '0-65535'}, {'ip': '255...</msg> +<status status="PASS" starttime="20210602 14:11:31.541" endtime="20210602 14:11:31.542"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${objJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.542" endtime="20210602 14:11:31.542"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objModeJson}</arg> +</arguments> +<assign> +<var>${objJson}</var> +</assign> +<msg timestamp="20210602 14:11:31.543" level="INFO">${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:31.543" endtime="20210602 14:11:31.543"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objListMode}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:31.544" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:31.543" endtime="20210602 14:11:31.544"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.545" endtime="20210602 14:11:31.545"></status> +</kw> +<msg timestamp="20210602 14:11:31.545" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:31.545" level="INFO">${objectType} = ip</msg> +<status status="PASS" starttime="20210602 14:11:31.544" endtime="20210602 14:11:31.545"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.546" endtime="20210602 14:11:31.547"></status> +</kw> +<msg timestamp="20210602 14:11:31.547" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "s...</msg> +<status status="PASS" starttime="20210602 14:11:31.546" endtime="20210602 14:11:31.547"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectSubType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.548" endtime="20210602 14:11:31.548"></status> +</kw> +<msg timestamp="20210602 14:11:31.548" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:31.548" level="INFO">${objectSubType} = endpoint</msg> +<status status="PASS" starttime="20210602 14:11:31.547" endtime="20210602 14:11:31.548"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.549" endtime="20210602 14:11:31.550"></status> +</kw> +<msg timestamp="20210602 14:11:31.550" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...</msg> +<status status="PASS" starttime="20210602 14:11:31.549" endtime="20210602 14:11:31.550"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<msg timestamp="20210602 14:11:31.551" level="FAIL">Dictionary does not contain key 'objectId'.</msg> +<status status="FAIL" starttime="20210602 14:11:31.551" endtime="20210602 14:11:31.551"></status> +</kw> +<msg timestamp="20210602 14:11:31.551" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:31.551" level="INFO">${objectId} = Dictionary does not contain key 'objectId'.</msg> +<status status="PASS" starttime="20210602 14:11:31.550" endtime="20210602 14:11:31.552"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectId": null</arg> +<arg>"objectId":${objectId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.552" endtime="20210602 14:11:31.553"></status> +</kw> +<msg timestamp="20210602 14:11:31.553" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...</msg> +<status status="PASS" starttime="20210602 14:11:31.552" endtime="20210602 14:11:31.553"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"option": "update"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.554" endtime="20210602 14:11:31.554"></status> +</kw> +<msg timestamp="20210602 14:11:31.555" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...</msg> +<status status="PASS" starttime="20210602 14:11:31.553" endtime="20210602 14:11:31.555"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectJsonList}</var> +</assign> +<msg timestamp="20210602 14:11:31.556" level="INFO">${objectJsonList} = []</msg> +<status status="PASS" starttime="20210602 14:11:31.556" endtime="20210602 14:11:31.556"></status> +</kw> +<kw name="Evaluate" library="BuiltIn"> +<doc>Evaluates the given expression in Python and returns the results.</doc> +<arguments> +<arg>type(${objList})</arg> +</arguments> +<assign> +<var>${objListType}</var> +</assign> +<msg timestamp="20210602 14:11:31.557" level="INFO">${objListType} = <class 'list'></msg> +<status status="PASS" starttime="20210602 14:11:31.557" endtime="20210602 14:11:31.557"></status> +</kw> +<kw name="${obj} IN [ @{objList} ]" type="for"> +<kw name="${obj} = {'addItemList': [{'ip': '255.255.255.255', 'port': '0-65535'}, {'ip': '255.255.255.255', 'port': '1-65535'}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.559" endtime="20210602 14:11:31.559"></status> +</kw> +<msg timestamp="20210602 14:11:31.559" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:31.559" level="INFO">${addItemList} = [{'ip': '255.255.255.255', 'port': '0-65535'}, {'ip': '255.255.255.255', 'port': '1-65535'}]</msg> +<status status="PASS" starttime="20210602 14:11:31.558" endtime="20210602 14:11:31.560"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:31.560" level="INFO">${addItemList} = [{"ip": "255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.255", "port": "1-65535"}]</msg> +<status status="PASS" starttime="20210602 14:11:31.560" endtime="20210602 14:11:31.560"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.561" endtime="20210602 14:11:31.562"></status> +</kw> +<msg timestamp="20210602 14:11:31.562" level="INFO">${addItemList} = [{"ip": "255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.255", "port": "1-65535"}]</msg> +<status status="PASS" starttime="20210602 14:11:31.561" endtime="20210602 14:11:31.562"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.563" endtime="20210602 14:11:31.564"></status> +</kw> +<msg timestamp="20210602 14:11:31.564" level="INFO">${addItemList} = [{"ip": "255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.255", "port": "1-65535"}]</msg> +<status status="PASS" starttime="20210602 14:11:31.563" endtime="20210602 14:11:31.564"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.565" endtime="20210602 14:11:31.565"></status> +</kw> +<msg timestamp="20210602 14:11:31.566" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...</msg> +<status status="PASS" starttime="20210602 14:11:31.564" endtime="20210602 14:11:31.566"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:31.567" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...</msg> +<status status="PASS" starttime="20210602 14:11:31.566" endtime="20210602 14:11:31.567"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:31.568" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addIt...</msg> +<status status="PASS" starttime="20210602 14:11:31.567" endtime="20210602 14:11:31.568"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.584" endtime="20210602 14:11:31.584"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.585" endtime="20210602 14:11:31.586"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addIte..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.587" endtime="20210602 14:11:31.587"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.586" endtime="20210602 14:11:31.587"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.586" endtime="20210602 14:11:31.588"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.583" endtime="20210602 14:11:31.588"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.558" endtime="20210602 14:11:31.588"></status> +</kw> +<kw name="${obj} = {'addItemList': [{'ip': '255.255.255.1-255.255.255.255', 'port': '0-65535'}, {'ip': '255.255.255.2/24', 'port': '1-65535'}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.589" endtime="20210602 14:11:31.590"></status> +</kw> +<msg timestamp="20210602 14:11:31.590" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:31.590" level="INFO">${addItemList} = [{'ip': '255.255.255.1-255.255.255.255', 'port': '0-65535'}, {'ip': '255.255.255.2/24', 'port': '1-65535'}]</msg> +<status status="PASS" starttime="20210602 14:11:31.589" endtime="20210602 14:11:31.590"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:31.591" level="INFO">${addItemList} = [{"ip": "255.255.255.1-255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.2/24", "port": "1-65535"}]</msg> +<status status="PASS" starttime="20210602 14:11:31.591" endtime="20210602 14:11:31.591"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.592" endtime="20210602 14:11:31.593"></status> +</kw> +<msg timestamp="20210602 14:11:31.593" level="INFO">${addItemList} = [{"ip": "255.255.255.1-255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.2/24", "port": "1-65535"}]</msg> +<status status="PASS" starttime="20210602 14:11:31.592" endtime="20210602 14:11:31.593"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.594" endtime="20210602 14:11:31.594"></status> +</kw> +<msg timestamp="20210602 14:11:31.594" level="INFO">${addItemList} = [{"ip": "255.255.255.1-255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.2/24", "port": "1-65535"}]</msg> +<status status="PASS" starttime="20210602 14:11:31.593" endtime="20210602 14:11:31.594"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.595" endtime="20210602 14:11:31.596"></status> +</kw> +<msg timestamp="20210602 14:11:31.596" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...</msg> +<status status="PASS" starttime="20210602 14:11:31.595" endtime="20210602 14:11:31.596"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:31.597" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...</msg> +<status status="PASS" starttime="20210602 14:11:31.596" endtime="20210602 14:11:31.597"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:31.597" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addIt...</msg> +<status status="PASS" starttime="20210602 14:11:31.597" endtime="20210602 14:11:31.598"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.609" endtime="20210602 14:11:31.609"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.610" endtime="20210602 14:11:31.610"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addIte..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.610" endtime="20210602 14:11:31.611"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.610" endtime="20210602 14:11:31.611"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.610" endtime="20210602 14:11:31.611"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.608" endtime="20210602 14:11:31.611"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.588" endtime="20210602 14:11:31.612"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.557" endtime="20210602 14:11:31.612"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>opAction=add</arg> +<arg>returnData=1</arg> +<arg>objectList=${objectJsonList}</arg> +</arguments> +<assign> +<var>${objectData}</var> +</assign> +<msg timestamp="20210602 14:11:31.613" level="INFO">${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定...</msg> +<status status="PASS" starttime="20210602 14:11:31.612" endtime="20210602 14:11:31.613"></status> +</kw> +<kw name="createObject" library="object"> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${rescode}</var> +<var>${objectIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${ipList}对象dict</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.614" endtime="20210602 14:11:31.614"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建IP</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.614" endtime="20210602 14:11:31.615"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${ipList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:31.615" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:31.615" endtime="20210602 14:11:31.615"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${ipList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:31.616" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u535...</msg> +<status status="PASS" starttime="20210602 14:11:31.616" endtime="20210602 14:11:31.616"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${objectUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:31.617" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:31.617" endtime="20210602 14:11:31.617"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:31.618" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v1, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:31.618" endtime="20210602 14:11:31.619"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:31.621" level="INFO">POST Request using : uri=/policy/object, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"ip": "255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.255", "port": "1-65535"}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}, {"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"ip": "255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.255", "port": "1-65535"}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]} +json=None</msg> +<msg timestamp="20210602 14:11:31.716" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:31.620" endtime="20210602 14:11:31.717"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:31.719" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:31.718" endtime="20210602 14:11:31.719"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:31.720" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:31.719" endtime="20210602 14:11:31.720"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:31.721" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "objectList" : [ { + "addItemList" : [ { + "addrType" : 4, + "clientIp1" : "255.255.255.255", + "clientIp2" : "32", + "clientIpFormat" : "CIDR", + "clientPort1" : "0", + "clientPort2" : "65535", + "clientPortFormat" : "range", + "direction" : 0, + "ip" : "255.255.255.255", + "isInitialize" : 0, + "isSession" : "endpoint", + "isValid" : 1, + "itemDesc" : "{ \"ip\":\"255.255.255.255\" ,\"port\":\"0-65535\"}", + "itemId" : 10074687, + "itemName" : null, + "itemType" : "ip", + "objectId" : 107882, + "opTime" : "2021-06-02 14:11:31", + "opUser" : 425, + "port" : "0-65535", + "protocol" : 0, + "serverIp1" : "0.0.0.0", + "serverIp2" : "255.255.255.255", + "serverIpFormat" : "mask", + "serverPort1" : "0", + "serverPort2" : "65535", + "serverPortFormat" : "mask" + }, { + "addrType" : 4, + "clientIp1" : "255.255.255.255", + "clientIp2" : "32", + "clientIpFormat" : "CIDR", + "clientPort1" : "1", + "clientPort2" : "65535", + "clientPortFormat" : "range", + "direction" : 0, + "ip" : "255.255.255.255", + "isInitialize" : 0, + "isSession" : "endpoint", + "isValid" : 1, + "itemDesc" : "{ \"ip\":\"255.255.255.255\" ,\"port\":\"1-65535\"}", + "itemId" : 10074688, + "itemName" : null, + "itemType" : "ip", + "objectId" : 107882, + "opTime" : "2021-06-02 14:11:31", + "opUser" : 425, + "port" : "1-65535", + "protocol" : 0, + "serverIp1" : "0.0.0.0", + "serverIp2" : "255.255.255.255", + "serverIpFormat" : "mask", + "serverPort1" : "0", + "serverPort2" : "65535", + "serverPortFormat" : "mask" + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107882, + "objectName" : "auttest单ip指定端口", + "objectSubType" : "endpoint", + "objectType" : "ip", + "opTime" : "2021-06-02 14:11:31", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + }, { + "addItemList" : [ { + "addrType" : 4, + "clientIp1" : "255.255.255.255", + "clientIp2" : "32", + "clientIpFormat" : "CIDR", + "clientPort1" : "0", + "clientPort2" : "65535", + "clientPortFormat" : "range", + "direction" : 0, + "ip" : "255.255.255.255", + "isInitialize" : 0, + "isSession" : "endpoint", + "isValid" : 1, + "itemDesc" : "{ \"ip\":\"255.255.255.255\" ,\"port\":\"0-65535\"}", + "itemId" : 10074689, + "itemName" : null, + "itemType" : "ip", + "objectId" : 107883, + "opTime" : "2021-06-02 14:11:31", + "opUser" : 425, + "port" : "0-65535", + "protocol" : 0, + "serverIp1" : "0.0.0.0", + "serverIp2" : "255.255.255.255", + "serverIpFormat" : "mask", + "serverPort1" : "0", + "serverPort2" : "65535", + "serverPortFormat" : "mask" + }, { + "addrType" : 4, + "clientIp1" : "255.255.255.255", + "clientIp2" : "32", + "clientIpFormat" : "CIDR", + "clientPort1" : "1", + "clientPort2" : "65535", + "clientPortFormat" : "range", + "direction" : 0, + "ip" : "255.255.255.255", + "isInitialize" : 0, + "isSession" : "endpoint", + "isValid" : 1, + "itemDesc" : "{ \"ip\":\"255.255.255.255\" ,\"port\":\"1-65535\"}", + "itemId" : 10074690, + "itemName" : null, + "itemType" : "ip", + "objectId" : 107883, + "opTime" : "2021-06-02 14:11:31", + "opUser" : 425, + "port" : "1-65535", + "protocol" : 0, + "serverIp1" : "0.0.0.0", + "serverIp2" : "255.255.255.255", + "serverIpFormat" : "mask", + "serverPort1" : "0", + "serverPort2" : "65535", + "serverPortFormat" : "mask" + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107883, + "objectName" : "auttest单ip指定端口", + "objectSubType" : "endpoint", + "objectType" : "ip", + "opTime" : "2021-06-02 14:11:31", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:31.721" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:31.721" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.255', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '0', 'clientPort2':...</msg> +<status status="PASS" starttime="20210602 14:11:31.720" endtime="20210602 14:11:31.721"></status> +</kw> +<msg timestamp="20210602 14:11:31.722" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.255', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '0', 'clientPort2':...</msg> +<status status="PASS" starttime="20210602 14:11:31.616" endtime="20210602 14:11:31.722"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>getObjectListIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${objectIds}</var> +</assign> +<kw name="getObjectListIds" library="process_object_body"> +<doc>获取结果中的对象ID</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>Call Get-ObjectIds</arg> +</arguments> +<msg timestamp="20210602 14:11:31.723" level="INFO">Call Get-ObjectIds</msg> +<status status="PASS" starttime="20210602 14:11:31.723" endtime="20210602 14:11:31.723"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIds}</var> +</assign> +<msg timestamp="20210602 14:11:31.724" level="INFO">${objectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:31.724" endtime="20210602 14:11:31.724"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${objectIdsTemp}</var> +</assign> +<msg timestamp="20210602 14:11:31.725" level="INFO">${objectIdsTemp} = </msg> +<status status="PASS" starttime="20210602 14:11:31.724" endtime="20210602 14:11:31.725"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${data}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.726" endtime="20210602 14:11:31.726"></status> +</kw> +<msg timestamp="20210602 14:11:31.726" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:31.727" level="INFO">${data} = {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.255', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '0', 'clientPort2': '65535', 'clientPortFormat': 'range', '...</msg> +<status status="PASS" starttime="20210602 14:11:31.725" endtime="20210602 14:11:31.727"></status> +</kw> +<kw name="Return From Keyword If" library="BuiltIn"> +<doc>Returns from the enclosing user keyword if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"=="FAIL"</arg> +<arg>${objectIdsTemp}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.727" endtime="20210602 14:11:31.727"></status> +</kw> +<kw name="${object} IN [ @{value['data']['objectList']} ]" type="for"> +<kw name="${object} = {'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.255', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '0', 'clientPort2': '65535', 'clientPortFormat': 'range', 'direction': 0, '..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.728" endtime="20210602 14:11:31.729"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.728" endtime="20210602 14:11:31.729"></status> +</kw> +<kw name="${object} = {'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.255', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '0', 'clientPort2': '65535', 'clientPortFormat': 'range', 'direction': 0, '..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.729" endtime="20210602 14:11:31.730"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.729" endtime="20210602 14:11:31.730"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.728" endtime="20210602 14:11:31.730"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.723" endtime="20210602 14:11:31.730"></status> +</kw> +<msg timestamp="20210602 14:11:31.731" level="INFO">${objectIds} = [107882, 107883]</msg> +<status status="PASS" starttime="20210602 14:11:31.722" endtime="20210602 14:11:31.731"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:31.731" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:31.731" endtime="20210602 14:11:31.731"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:31.732" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:31.732" endtime="20210602 14:11:31.732"></status> +</kw> +<msg timestamp="20210602 14:11:31.732" level="INFO">${rescode} = 200</msg> +<msg timestamp="20210602 14:11:31.733" level="INFO">${objectIds} = [107882, 107883]</msg> +<status status="PASS" starttime="20210602 14:11:31.613" endtime="20210602 14:11:31.733"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:31.733" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:31.733" endtime="20210602 14:11:31.734"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${protocolField}</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${protocolField}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.734" endtime="20210602 14:11:31.735"></status> +</kw> +<msg timestamp="20210602 14:11:31.735" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:31.734" endtime="20210602 14:11:31.735"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectsList}</var> +</assign> +<msg timestamp="20210602 14:11:31.735" level="INFO">${objectsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:31.735" endtime="20210602 14:11:31.736"></status> +</kw> +<kw name="${obj} IN [ @{objectIds} ]" type="for"> +<kw name="${obj} = 107882" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:31.737" level="INFO">${objectList} = {'objectId': 107882, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:31.736" endtime="20210602 14:11:31.737"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.737" endtime="20210602 14:11:31.738"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.736" endtime="20210602 14:11:31.738"></status> +</kw> +<kw name="${obj} = 107883" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:31.739" level="INFO">${objectList} = {'objectId': 107882, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:31.738" endtime="20210602 14:11:31.739"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.739" endtime="20210602 14:11:31.739"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.738" endtime="20210602 14:11:31.740"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.736" endtime="20210602 14:11:31.740"></status> +</kw> +<msg timestamp="20210602 14:11:31.740" level="INFO">${objectIds} = [107882, 107883]</msg> +<msg timestamp="20210602 14:11:31.740" level="INFO">${objectList} = {'objectId': 107882, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:31.540" endtime="20210602 14:11:31.740"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>OrangeFilter</arg> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.741" endtime="20210602 14:11:31.742"></status> +</kw> +<msg timestamp="20210602 14:11:31.742" level="INFO">${objectList} = {'objectId': 107882, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:31.741" endtime="20210602 14:11:31.742"></status> +</kw> +<msg timestamp="20210602 14:11:31.742" level="INFO">${objectIds} = [107882, 107883]</msg> +<msg timestamp="20210602 14:11:31.742" level="INFO">${objectList} = {'objectId': 107882, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:31.537" endtime="20210602 14:11:31.742"></status> +</kw> +<kw name="Get Length" library="BuiltIn"> +<doc>Returns and logs the length of the given item as an integer.</doc> +<arguments> +<arg>${objectIdsList}</arg> +</arguments> +<assign> +<var>${len}</var> +</assign> +<msg timestamp="20210602 14:11:31.743" level="INFO">Length is 0</msg> +<msg timestamp="20210602 14:11:31.743" level="INFO">${len} = 0</msg> +<status status="PASS" starttime="20210602 14:11:31.743" endtime="20210602 14:11:31.743"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${len} != 0</arg> +<arg>AppendListToList</arg> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectIds}</arg> +</arguments> +<assign> +<var>${objectIdsList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectIds}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.744" endtime="20210602 14:11:31.744"></status> +</kw> +<msg timestamp="20210602 14:11:31.745" level="INFO">${objectIdsList} = [107882, 107883]</msg> +<status status="PASS" starttime="20210602 14:11:31.744" endtime="20210602 14:11:31.745"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Append To List</arg> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Append To List</arg> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>Append To List</arg> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.746" endtime="20210602 14:11:31.746"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.745" endtime="20210602 14:11:31.746"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.536" endtime="20210602 14:11:31.746"></status> +</kw> +<kw name="${key} = {'protocolField': 'TSG_SECURITY_SOURCE_LOCATION', 'objectType': 'ip', 'objectSubType': 'geo_location', 'objList': [{'addItemList': [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}..." type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${key}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:31.747" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_LOCATION</msg> +<status status="PASS" starttime="20210602 14:11:31.747" endtime="20210602 14:11:31.748"></status> +</kw> +<kw name="CreateObjectList" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${key}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.748" endtime="20210602 14:11:31.749"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:31.749" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_LOCATION</msg> +<status status="PASS" starttime="20210602 14:11:31.749" endtime="20210602 14:11:31.749"></status> +</kw> +<kw name="CreateObjects" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.750" endtime="20210602 14:11:31.750"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:31.751" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_LOCATION</msg> +<status status="PASS" starttime="20210602 14:11:31.751" endtime="20210602 14:11:31.751"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objList</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:31.752" level="INFO">${objList} = [{'addItemList': [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}, {'keywordArray': ['China.Duyun.*']}]}]</msg> +<status status="PASS" starttime="20210602 14:11:31.752" endtime="20210602 14:11:31.752"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${objJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.752" endtime="20210602 14:11:31.753"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objModeJson}</arg> +</arguments> +<assign> +<var>${objJson}</var> +</assign> +<msg timestamp="20210602 14:11:31.753" level="INFO">${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:31.753" endtime="20210602 14:11:31.753"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objListMode}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:31.754" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:31.754" endtime="20210602 14:11:31.754"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.755" endtime="20210602 14:11:31.755"></status> +</kw> +<msg timestamp="20210602 14:11:31.756" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:31.756" level="INFO">${objectType} = ip</msg> +<status status="PASS" starttime="20210602 14:11:31.755" endtime="20210602 14:11:31.756"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.757" endtime="20210602 14:11:31.757"></status> +</kw> +<msg timestamp="20210602 14:11:31.757" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "s...</msg> +<status status="PASS" starttime="20210602 14:11:31.756" endtime="20210602 14:11:31.757"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectSubType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.758" endtime="20210602 14:11:31.758"></status> +</kw> +<msg timestamp="20210602 14:11:31.759" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:31.759" level="INFO">${objectSubType} = geo_location</msg> +<status status="PASS" starttime="20210602 14:11:31.758" endtime="20210602 14:11:31.759"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.760" endtime="20210602 14:11:31.760"></status> +</kw> +<msg timestamp="20210602 14:11:31.760" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...</msg> +<status status="PASS" starttime="20210602 14:11:31.759" endtime="20210602 14:11:31.760"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<msg timestamp="20210602 14:11:31.762" level="FAIL">Dictionary does not contain key 'objectId'.</msg> +<status status="FAIL" starttime="20210602 14:11:31.761" endtime="20210602 14:11:31.762"></status> +</kw> +<msg timestamp="20210602 14:11:31.762" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:31.762" level="INFO">${objectId} = Dictionary does not contain key 'objectId'.</msg> +<status status="PASS" starttime="20210602 14:11:31.761" endtime="20210602 14:11:31.762"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectId": null</arg> +<arg>"objectId":${objectId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.763" endtime="20210602 14:11:31.763"></status> +</kw> +<msg timestamp="20210602 14:11:31.764" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...</msg> +<status status="PASS" starttime="20210602 14:11:31.763" endtime="20210602 14:11:31.764"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"option": "update"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.764" endtime="20210602 14:11:31.765"></status> +</kw> +<msg timestamp="20210602 14:11:31.765" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...</msg> +<status status="PASS" starttime="20210602 14:11:31.764" endtime="20210602 14:11:31.765"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectJsonList}</var> +</assign> +<msg timestamp="20210602 14:11:31.766" level="INFO">${objectJsonList} = []</msg> +<status status="PASS" starttime="20210602 14:11:31.765" endtime="20210602 14:11:31.766"></status> +</kw> +<kw name="Evaluate" library="BuiltIn"> +<doc>Evaluates the given expression in Python and returns the results.</doc> +<arguments> +<arg>type(${objList})</arg> +</arguments> +<assign> +<var>${objListType}</var> +</assign> +<msg timestamp="20210602 14:11:31.767" level="INFO">${objListType} = <class 'list'></msg> +<status status="PASS" starttime="20210602 14:11:31.766" endtime="20210602 14:11:31.767"></status> +</kw> +<kw name="${obj} IN [ @{objList} ]" type="for"> +<kw name="${obj} = {'addItemList': [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}, {'keywordArray': ['China.Duyun.*']}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.768" endtime="20210602 14:11:31.768"></status> +</kw> +<msg timestamp="20210602 14:11:31.768" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:31.768" level="INFO">${addItemList} = [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}, {'keywordArray': ['China.Duyun.*']}]</msg> +<status status="PASS" starttime="20210602 14:11:31.767" endtime="20210602 14:11:31.769"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:31.769" level="INFO">${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}, {"keywordArray": ["China.Duyun.*"]}]</msg> +<status status="PASS" starttime="20210602 14:11:31.769" endtime="20210602 14:11:31.769"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.770" endtime="20210602 14:11:31.770"></status> +</kw> +<msg timestamp="20210602 14:11:31.771" level="INFO">${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}, {"keywordArray": ["China.Duyun.*"]}]</msg> +<status status="PASS" starttime="20210602 14:11:31.770" endtime="20210602 14:11:31.771"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.771" endtime="20210602 14:11:31.772"></status> +</kw> +<msg timestamp="20210602 14:11:31.773" level="INFO">${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}, {"keywordArray": ["China.Duyun.*"]}]</msg> +<status status="PASS" starttime="20210602 14:11:31.771" endtime="20210602 14:11:31.773"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.774" endtime="20210602 14:11:31.774"></status> +</kw> +<msg timestamp="20210602 14:11:31.774" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...</msg> +<status status="PASS" starttime="20210602 14:11:31.773" endtime="20210602 14:11:31.775"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:31.775" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...</msg> +<status status="PASS" starttime="20210602 14:11:31.775" endtime="20210602 14:11:31.776"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:31.776" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'geo_location', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'a...</msg> +<status status="PASS" starttime="20210602 14:11:31.776" endtime="20210602 14:11:31.776"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.787" endtime="20210602 14:11:31.787"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.787" endtime="20210602 14:11:31.788"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'ip', 'objectSubType': 'geo_location', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'ad..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.789" endtime="20210602 14:11:31.789"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.789" endtime="20210602 14:11:31.789"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.788" endtime="20210602 14:11:31.790"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.786" endtime="20210602 14:11:31.790"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.767" endtime="20210602 14:11:31.790"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.767" endtime="20210602 14:11:31.790"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>opAction=add</arg> +<arg>returnData=1</arg> +<arg>objectList=${objectJsonList}</arg> +</arguments> +<assign> +<var>${objectData}</var> +</assign> +<msg timestamp="20210602 14:11:31.791" level="INFO">${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'geo_location', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单...</msg> +<status status="PASS" starttime="20210602 14:11:31.790" endtime="20210602 14:11:31.791"></status> +</kw> +<kw name="createObject" library="object"> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${rescode}</var> +<var>${objectIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${ipList}对象dict</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.792" endtime="20210602 14:11:31.792"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建IP</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:31.792" endtime="20210602 14:11:31.793"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${ipList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:31.793" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:31.793" endtime="20210602 14:11:31.793"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${ipList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:31.794" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\...</msg> +<status status="PASS" starttime="20210602 14:11:31.794" endtime="20210602 14:11:31.794"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${objectUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:31.795" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:31.795" endtime="20210602 14:11:31.795"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:31.796" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v1, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:31.796" endtime="20210602 14:11:31.797"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:31.797" level="INFO">POST Request using : uri=/policy/object, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}, {"keywordArray": ["China.Duyun.*"]}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]} +json=None</msg> +<msg timestamp="20210602 14:11:32.667" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:31.797" endtime="20210602 14:11:32.667"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:32.669" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:32.668" endtime="20210602 14:11:32.669"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:32.669" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:32.669" endtime="20210602 14:11:32.670"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:32.670" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "objectList" : [ { + "addItemList" : [ { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:31", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "Algeria." ], + "itemId" : 10074691, + "objectId" : 107884 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:31", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "China.Duyun." ], + "itemId" : 10074692, + "objectId" : 107884 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:31", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "China.Duyun." ], + "itemId" : 10074693, + "objectId" : 107884 + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107884, + "objectName" : "auttest单ip指定端口", + "objectSubType" : "geo_location", + "objectType" : "ip", + "opTime" : "2021-06-02 14:11:31", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:32.670" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:32.671" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:31', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:32.670" endtime="20210602 14:11:32.671"></status> +</kw> +<msg timestamp="20210602 14:11:32.671" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:31', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:31.794" endtime="20210602 14:11:32.671"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>getObjectListIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${objectIds}</var> +</assign> +<kw name="getObjectListIds" library="process_object_body"> +<doc>获取结果中的对象ID</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>Call Get-ObjectIds</arg> +</arguments> +<msg timestamp="20210602 14:11:32.673" level="INFO">Call Get-ObjectIds</msg> +<status status="PASS" starttime="20210602 14:11:32.672" endtime="20210602 14:11:32.673"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIds}</var> +</assign> +<msg timestamp="20210602 14:11:32.673" level="INFO">${objectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:32.673" endtime="20210602 14:11:32.674"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${objectIdsTemp}</var> +</assign> +<msg timestamp="20210602 14:11:32.674" level="INFO">${objectIdsTemp} = </msg> +<status status="PASS" starttime="20210602 14:11:32.674" endtime="20210602 14:11:32.674"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${data}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.675" endtime="20210602 14:11:32.676"></status> +</kw> +<msg timestamp="20210602 14:11:32.676" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:32.676" level="INFO">${data} = {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:31', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['A...</msg> +<status status="PASS" starttime="20210602 14:11:32.675" endtime="20210602 14:11:32.676"></status> +</kw> +<kw name="Return From Keyword If" library="BuiltIn"> +<doc>Returns from the enclosing user keyword if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"=="FAIL"</arg> +<arg>${objectIdsTemp}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.676" endtime="20210602 14:11:32.677"></status> +</kw> +<kw name="${object} IN [ @{value['data']['objectList']} ]" type="for"> +<kw name="${object} = {'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:31', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['Algeria.'], 'item..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.678" endtime="20210602 14:11:32.678"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:32.677" endtime="20210602 14:11:32.678"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:32.677" endtime="20210602 14:11:32.678"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:32.672" endtime="20210602 14:11:32.679"></status> +</kw> +<msg timestamp="20210602 14:11:32.679" level="INFO">${objectIds} = [107884]</msg> +<status status="PASS" starttime="20210602 14:11:32.672" endtime="20210602 14:11:32.679"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:32.680" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:32.679" endtime="20210602 14:11:32.680"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:32.680" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:32.680" endtime="20210602 14:11:32.681"></status> +</kw> +<msg timestamp="20210602 14:11:32.681" level="INFO">${rescode} = 200</msg> +<msg timestamp="20210602 14:11:32.681" level="INFO">${objectIds} = [107884]</msg> +<status status="PASS" starttime="20210602 14:11:31.791" endtime="20210602 14:11:32.681"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:32.682" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:32.681" endtime="20210602 14:11:32.682"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${protocolField}</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${protocolField}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.683" endtime="20210602 14:11:32.683"></status> +</kw> +<msg timestamp="20210602 14:11:32.683" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_LOCATION</msg> +<status status="PASS" starttime="20210602 14:11:32.682" endtime="20210602 14:11:32.683"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectsList}</var> +</assign> +<msg timestamp="20210602 14:11:32.684" level="INFO">${objectsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:32.684" endtime="20210602 14:11:32.684"></status> +</kw> +<kw name="${obj} IN [ @{objectIds} ]" type="for"> +<kw name="${obj} = 107884" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:32.685" level="INFO">${objectList} = {'objectId': 107884, 'protocolField': 'TSG_SECURITY_SOURCE_LOCATION'}</msg> +<status status="PASS" starttime="20210602 14:11:32.685" endtime="20210602 14:11:32.685"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.686" endtime="20210602 14:11:32.686"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:32.684" endtime="20210602 14:11:32.686"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:32.684" endtime="20210602 14:11:32.686"></status> +</kw> +<msg timestamp="20210602 14:11:32.687" level="INFO">${objectIds} = [107884]</msg> +<msg timestamp="20210602 14:11:32.687" level="INFO">${objectList} = {'objectId': 107884, 'protocolField': 'TSG_SECURITY_SOURCE_LOCATION'}</msg> +<status status="PASS" starttime="20210602 14:11:31.750" endtime="20210602 14:11:32.687"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>OrangeFilter</arg> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.688" endtime="20210602 14:11:32.688"></status> +</kw> +<msg timestamp="20210602 14:11:32.689" level="INFO">${objectList} = {'objectId': 107884, 'protocolField': 'TSG_SECURITY_SOURCE_LOCATION'}</msg> +<status status="PASS" starttime="20210602 14:11:32.687" endtime="20210602 14:11:32.689"></status> +</kw> +<msg timestamp="20210602 14:11:32.689" level="INFO">${objectIds} = [107884]</msg> +<msg timestamp="20210602 14:11:32.689" level="INFO">${objectList} = {'objectId': 107884, 'protocolField': 'TSG_SECURITY_SOURCE_LOCATION'}</msg> +<status status="PASS" starttime="20210602 14:11:31.748" endtime="20210602 14:11:32.689"></status> +</kw> +<kw name="Get Length" library="BuiltIn"> +<doc>Returns and logs the length of the given item as an integer.</doc> +<arguments> +<arg>${objectIdsList}</arg> +</arguments> +<assign> +<var>${len}</var> +</assign> +<msg timestamp="20210602 14:11:32.690" level="INFO">Length is 2</msg> +<msg timestamp="20210602 14:11:32.690" level="INFO">${len} = 2</msg> +<status status="PASS" starttime="20210602 14:11:32.690" endtime="20210602 14:11:32.690"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${len} != 0</arg> +<arg>AppendListToList</arg> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectIds}</arg> +</arguments> +<assign> +<var>${objectIdsList}</var> +</assign> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.701" endtime="20210602 14:11:32.701"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.702" endtime="20210602 14:11:32.702"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = 107884" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.703" endtime="20210602 14:11:32.703"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:32.702" endtime="20210602 14:11:32.703"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:32.702" endtime="20210602 14:11:32.703"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:32.700" endtime="20210602 14:11:32.704"></status> +</kw> +<msg timestamp="20210602 14:11:32.704" level="INFO">${objectIdsList} = [107882, 107883, 107884]</msg> +<status status="PASS" starttime="20210602 14:11:32.691" endtime="20210602 14:11:32.704"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Append To List</arg> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Append To List</arg> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>Append To List</arg> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.705" endtime="20210602 14:11:32.705"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:32.704" endtime="20210602 14:11:32.706"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.747" endtime="20210602 14:11:32.706"></status> +</kw> +<kw name="${key} = {'protocolField': 'TSG_FILED_GTP_IMSI', 'objectType': 'mobile_identity', 'objectSubType': 'imsi', 'objList': [{'addItemList': [{'keywordArray': ['123*']}, {'keywordArray': ['456*']}, {'keywordArray': ..." type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${key}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:32.707" level="INFO">${protocolField} = TSG_FILED_GTP_IMSI</msg> +<status status="PASS" starttime="20210602 14:11:32.706" endtime="20210602 14:11:32.707"></status> +</kw> +<kw name="CreateObjectList" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${key}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.708" endtime="20210602 14:11:32.708"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:32.708" level="INFO">${protocolField} = TSG_FILED_GTP_IMSI</msg> +<status status="PASS" starttime="20210602 14:11:32.708" endtime="20210602 14:11:32.709"></status> +</kw> +<kw name="CreateObjects" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.709" endtime="20210602 14:11:32.710"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:32.710" level="INFO">${protocolField} = TSG_FILED_GTP_IMSI</msg> +<status status="PASS" starttime="20210602 14:11:32.710" endtime="20210602 14:11:32.711"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objList</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:32.711" level="INFO">${objList} = [{'addItemList': [{'keywordArray': ['123*']}, {'keywordArray': ['456*']}, {'keywordArray': ['12345678912345*']}]}]</msg> +<status status="PASS" starttime="20210602 14:11:32.711" endtime="20210602 14:11:32.711"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${objJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.712" endtime="20210602 14:11:32.712"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objModeJson}</arg> +</arguments> +<assign> +<var>${objJson}</var> +</assign> +<msg timestamp="20210602 14:11:32.712" level="INFO">${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:32.712" endtime="20210602 14:11:32.713"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objListMode}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:32.714" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:32.713" endtime="20210602 14:11:32.714"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.715" endtime="20210602 14:11:32.715"></status> +</kw> +<msg timestamp="20210602 14:11:32.715" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:32.716" level="INFO">${objectType} = mobile_identity</msg> +<status status="PASS" starttime="20210602 14:11:32.714" endtime="20210602 14:11:32.716"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.716" endtime="20210602 14:11:32.717"></status> +</kw> +<msg timestamp="20210602 14:11:32.717" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc...</msg> +<status status="PASS" starttime="20210602 14:11:32.716" endtime="20210602 14:11:32.717"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectSubType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.718" endtime="20210602 14:11:32.718"></status> +</kw> +<msg timestamp="20210602 14:11:32.719" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:32.719" level="INFO">${objectSubType} = imsi</msg> +<status status="PASS" starttime="20210602 14:11:32.718" endtime="20210602 14:11:32.719"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.720" endtime="20210602 14:11:32.720"></status> +</kw> +<msg timestamp="20210602 14:11:32.720" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "t...</msg> +<status status="PASS" starttime="20210602 14:11:32.719" endtime="20210602 14:11:32.720"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<msg timestamp="20210602 14:11:32.721" level="FAIL">Dictionary does not contain key 'objectId'.</msg> +<status status="FAIL" starttime="20210602 14:11:32.721" endtime="20210602 14:11:32.722"></status> +</kw> +<msg timestamp="20210602 14:11:32.722" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:32.722" level="INFO">${objectId} = Dictionary does not contain key 'objectId'.</msg> +<status status="PASS" starttime="20210602 14:11:32.721" endtime="20210602 14:11:32.722"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectId": null</arg> +<arg>"objectId":${objectId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.723" endtime="20210602 14:11:32.723"></status> +</kw> +<msg timestamp="20210602 14:11:32.723" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "t...</msg> +<status status="PASS" starttime="20210602 14:11:32.722" endtime="20210602 14:11:32.724"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"option": "update"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.724" endtime="20210602 14:11:32.725"></status> +</kw> +<msg timestamp="20210602 14:11:32.725" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "t...</msg> +<status status="PASS" starttime="20210602 14:11:32.724" endtime="20210602 14:11:32.725"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectJsonList}</var> +</assign> +<msg timestamp="20210602 14:11:32.726" level="INFO">${objectJsonList} = []</msg> +<status status="PASS" starttime="20210602 14:11:32.725" endtime="20210602 14:11:32.726"></status> +</kw> +<kw name="Evaluate" library="BuiltIn"> +<doc>Evaluates the given expression in Python and returns the results.</doc> +<arguments> +<arg>type(${objList})</arg> +</arguments> +<assign> +<var>${objListType}</var> +</assign> +<msg timestamp="20210602 14:11:32.726" level="INFO">${objListType} = <class 'list'></msg> +<status status="PASS" starttime="20210602 14:11:32.726" endtime="20210602 14:11:32.727"></status> +</kw> +<kw name="${obj} IN [ @{objList} ]" type="for"> +<kw name="${obj} = {'addItemList': [{'keywordArray': ['123*']}, {'keywordArray': ['456*']}, {'keywordArray': ['12345678912345*']}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.728" endtime="20210602 14:11:32.729"></status> +</kw> +<msg timestamp="20210602 14:11:32.729" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:32.729" level="INFO">${addItemList} = [{'keywordArray': ['123*']}, {'keywordArray': ['456*']}, {'keywordArray': ['12345678912345*']}]</msg> +<status status="PASS" starttime="20210602 14:11:32.728" endtime="20210602 14:11:32.729"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:32.730" level="INFO">${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["456*"]}, {"keywordArray": ["12345678912345*"]}]</msg> +<status status="PASS" starttime="20210602 14:11:32.729" endtime="20210602 14:11:32.730"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.731" endtime="20210602 14:11:32.731"></status> +</kw> +<msg timestamp="20210602 14:11:32.731" level="INFO">${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["456*"]}, {"keywordArray": ["12345678912345*"]}]</msg> +<status status="PASS" starttime="20210602 14:11:32.730" endtime="20210602 14:11:32.731"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.732" endtime="20210602 14:11:32.732"></status> +</kw> +<msg timestamp="20210602 14:11:32.733" level="INFO">${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["456*"]}, {"keywordArray": ["12345678912345*"]}]</msg> +<status status="PASS" starttime="20210602 14:11:32.732" endtime="20210602 14:11:32.733"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.734" endtime="20210602 14:11:32.734"></status> +</kw> +<msg timestamp="20210602 14:11:32.735" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "t...</msg> +<status status="PASS" starttime="20210602 14:11:32.733" endtime="20210602 14:11:32.735"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:32.736" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "t...</msg> +<status status="PASS" starttime="20210602 14:11:32.735" endtime="20210602 14:11:32.736"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:32.736" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'mobile_identity', 'objectSubType': 'imsi', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [...</msg> +<status status="PASS" starttime="20210602 14:11:32.736" endtime="20210602 14:11:32.736"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.746" endtime="20210602 14:11:32.746"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.746" endtime="20210602 14:11:32.746"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'mobile_identity', 'objectSubType': 'imsi', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': []..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.747" endtime="20210602 14:11:32.747"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:32.747" endtime="20210602 14:11:32.748"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:32.747" endtime="20210602 14:11:32.748"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:32.746" endtime="20210602 14:11:32.748"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:32.728" endtime="20210602 14:11:32.750"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:32.727" endtime="20210602 14:11:32.750"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>opAction=add</arg> +<arg>returnData=1</arg> +<arg>objectList=${objectJsonList}</arg> +</arguments> +<assign> +<var>${objectData}</var> +</assign> +<msg timestamp="20210602 14:11:32.751" level="INFO">${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'mobile_identity', 'objectSubType': 'imsi', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'aut...</msg> +<status status="PASS" starttime="20210602 14:11:32.750" endtime="20210602 14:11:32.751"></status> +</kw> +<kw name="createObject" library="object"> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${rescode}</var> +<var>${objectIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${ipList}对象dict</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.752" endtime="20210602 14:11:32.752"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建IP</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.752" endtime="20210602 14:11:32.752"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${ipList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:32.753" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:32.753" endtime="20210602 14:11:32.753"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${ipList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:32.754" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "mobile_identity", "objectSubType": "imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "aut...</msg> +<status status="PASS" starttime="20210602 14:11:32.753" endtime="20210602 14:11:32.754"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${objectUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:32.755" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:32.755" endtime="20210602 14:11:32.755"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:32.756" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v1, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:32.756" endtime="20210602 14:11:32.756"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:32.756" level="INFO">POST Request using : uri=/policy/object, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "mobile_identity", "objectSubType": "imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"keywordArray": ["123*"]}, {"keywordArray": ["456*"]}, {"keywordArray": ["12345678912345*"]}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]} +json=None</msg> +<msg timestamp="20210602 14:11:32.844" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:32.756" endtime="20210602 14:11:32.845"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:32.845" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:32.845" endtime="20210602 14:11:32.846"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:32.846" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:32.846" endtime="20210602 14:11:32.846"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:32.847" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "objectList" : [ { + "addItemList" : [ { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:32", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "123" ], + "itemId" : 10074694, + "objectId" : 107885 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:32", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "456" ], + "itemId" : 10074695, + "objectId" : 107885 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:32", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "12345678912345" ], + "itemId" : 10074696, + "objectId" : 107885 + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107885, + "objectName" : "auttest单ip指定端口", + "objectSubType" : "imsi", + "objectType" : "mobile_identity", + "opTime" : "2021-06-02 14:11:32", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:32.847" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:32.848" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:32', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:32.847" endtime="20210602 14:11:32.848"></status> +</kw> +<msg timestamp="20210602 14:11:32.848" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:32', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:32.754" endtime="20210602 14:11:32.848"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>getObjectListIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${objectIds}</var> +</assign> +<kw name="getObjectListIds" library="process_object_body"> +<doc>获取结果中的对象ID</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>Call Get-ObjectIds</arg> +</arguments> +<msg timestamp="20210602 14:11:32.850" level="INFO">Call Get-ObjectIds</msg> +<status status="PASS" starttime="20210602 14:11:32.850" endtime="20210602 14:11:32.850"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIds}</var> +</assign> +<msg timestamp="20210602 14:11:32.851" level="INFO">${objectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:32.851" endtime="20210602 14:11:32.851"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${objectIdsTemp}</var> +</assign> +<msg timestamp="20210602 14:11:32.852" level="INFO">${objectIdsTemp} = </msg> +<status status="PASS" starttime="20210602 14:11:32.851" endtime="20210602 14:11:32.852"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${data}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.853" endtime="20210602 14:11:32.853"></status> +</kw> +<msg timestamp="20210602 14:11:32.853" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:32.853" level="INFO">${data} = {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:32', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['1...</msg> +<status status="PASS" starttime="20210602 14:11:32.852" endtime="20210602 14:11:32.853"></status> +</kw> +<kw name="Return From Keyword If" library="BuiltIn"> +<doc>Returns from the enclosing user keyword if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"=="FAIL"</arg> +<arg>${objectIdsTemp}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.854" endtime="20210602 14:11:32.854"></status> +</kw> +<kw name="${object} IN [ @{value['data']['objectList']} ]" type="for"> +<kw name="${object} = {'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:32', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['123'], 'itemId': ..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.855" endtime="20210602 14:11:32.855"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:32.855" endtime="20210602 14:11:32.856"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:32.854" endtime="20210602 14:11:32.856"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:32.849" endtime="20210602 14:11:32.856"></status> +</kw> +<msg timestamp="20210602 14:11:32.856" level="INFO">${objectIds} = [107885]</msg> +<status status="PASS" starttime="20210602 14:11:32.849" endtime="20210602 14:11:32.856"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:32.857" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:32.857" endtime="20210602 14:11:32.857"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:32.858" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:32.858" endtime="20210602 14:11:32.858"></status> +</kw> +<msg timestamp="20210602 14:11:32.858" level="INFO">${rescode} = 200</msg> +<msg timestamp="20210602 14:11:32.859" level="INFO">${objectIds} = [107885]</msg> +<status status="PASS" starttime="20210602 14:11:32.751" endtime="20210602 14:11:32.859"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:32.859" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:32.859" endtime="20210602 14:11:32.860"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${protocolField}</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${protocolField}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.860" endtime="20210602 14:11:32.861"></status> +</kw> +<msg timestamp="20210602 14:11:32.861" level="INFO">${protocolField} = TSG_FILED_GTP_IMSI</msg> +<status status="PASS" starttime="20210602 14:11:32.860" endtime="20210602 14:11:32.861"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectsList}</var> +</assign> +<msg timestamp="20210602 14:11:32.862" level="INFO">${objectsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:32.861" endtime="20210602 14:11:32.862"></status> +</kw> +<kw name="${obj} IN [ @{objectIds} ]" type="for"> +<kw name="${obj} = 107885" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:32.863" level="INFO">${objectList} = {'objectId': 107885, 'protocolField': 'TSG_FILED_GTP_IMSI'}</msg> +<status status="PASS" starttime="20210602 14:11:32.862" endtime="20210602 14:11:32.863"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.863" endtime="20210602 14:11:32.864"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:32.862" endtime="20210602 14:11:32.864"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:32.862" endtime="20210602 14:11:32.864"></status> +</kw> +<msg timestamp="20210602 14:11:32.864" level="INFO">${objectIds} = [107885]</msg> +<msg timestamp="20210602 14:11:32.864" level="INFO">${objectList} = {'objectId': 107885, 'protocolField': 'TSG_FILED_GTP_IMSI'}</msg> +<status status="PASS" starttime="20210602 14:11:32.709" endtime="20210602 14:11:32.865"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>OrangeFilter</arg> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.865" endtime="20210602 14:11:32.866"></status> +</kw> +<msg timestamp="20210602 14:11:32.866" level="INFO">${objectList} = {'objectId': 107885, 'protocolField': 'TSG_FILED_GTP_IMSI'}</msg> +<status status="PASS" starttime="20210602 14:11:32.865" endtime="20210602 14:11:32.867"></status> +</kw> +<msg timestamp="20210602 14:11:32.867" level="INFO">${objectIds} = [107885]</msg> +<msg timestamp="20210602 14:11:32.867" level="INFO">${objectList} = {'objectId': 107885, 'protocolField': 'TSG_FILED_GTP_IMSI'}</msg> +<status status="PASS" starttime="20210602 14:11:32.707" endtime="20210602 14:11:32.867"></status> +</kw> +<kw name="Get Length" library="BuiltIn"> +<doc>Returns and logs the length of the given item as an integer.</doc> +<arguments> +<arg>${objectIdsList}</arg> +</arguments> +<assign> +<var>${len}</var> +</assign> +<msg timestamp="20210602 14:11:32.868" level="INFO">Length is 3</msg> +<msg timestamp="20210602 14:11:32.868" level="INFO">${len} = 3</msg> +<status status="PASS" starttime="20210602 14:11:32.868" endtime="20210602 14:11:32.868"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${len} != 0</arg> +<arg>AppendListToList</arg> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectIds}</arg> +</arguments> +<assign> +<var>${objectIdsList}</var> +</assign> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.879" endtime="20210602 14:11:32.879"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.880" endtime="20210602 14:11:32.880"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = 107885" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.881" endtime="20210602 14:11:32.881"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:32.880" endtime="20210602 14:11:32.881"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:32.880" endtime="20210602 14:11:32.881"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:32.879" endtime="20210602 14:11:32.882"></status> +</kw> +<msg timestamp="20210602 14:11:32.882" level="INFO">${objectIdsList} = [107882, 107883, 107884, 107885]</msg> +<status status="PASS" starttime="20210602 14:11:32.869" endtime="20210602 14:11:32.882"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Append To List</arg> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Append To List</arg> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>Append To List</arg> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.883" endtime="20210602 14:11:32.883"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:32.882" endtime="20210602 14:11:32.883"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:32.706" endtime="20210602 14:11:32.884"></status> +</kw> +<kw name="${key} = {'protocolField': 'TSG_FILED_GTP_PHONE_NUMBER', 'objectType': 'mobile_identity', 'objectSubType': 'phone_number', 'objList': [{'addItemList': [{'keywordArray': ['123*']}, {'keywordArray': ['$123456789..." type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${key}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:32.884" level="INFO">${protocolField} = TSG_FILED_GTP_PHONE_NUMBER</msg> +<status status="PASS" starttime="20210602 14:11:32.884" endtime="20210602 14:11:32.885"></status> +</kw> +<kw name="CreateObjectList" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${key}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.885" endtime="20210602 14:11:32.886"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:32.886" level="INFO">${protocolField} = TSG_FILED_GTP_PHONE_NUMBER</msg> +<status status="PASS" starttime="20210602 14:11:32.886" endtime="20210602 14:11:32.886"></status> +</kw> +<kw name="CreateObjects" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.887" endtime="20210602 14:11:32.887"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:32.888" level="INFO">${protocolField} = TSG_FILED_GTP_PHONE_NUMBER</msg> +<status status="PASS" starttime="20210602 14:11:32.888" endtime="20210602 14:11:32.888"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objList</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:32.889" level="INFO">${objList} = [{'addItemList': [{'keywordArray': ['123*']}, {'keywordArray': ['$123456789012345']}, {'keywordArray': ['12345']}]}]</msg> +<status status="PASS" starttime="20210602 14:11:32.888" endtime="20210602 14:11:32.889"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${objJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.889" endtime="20210602 14:11:32.889"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objModeJson}</arg> +</arguments> +<assign> +<var>${objJson}</var> +</assign> +<msg timestamp="20210602 14:11:32.890" level="INFO">${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:32.890" endtime="20210602 14:11:32.890"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objListMode}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:32.891" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:32.891" endtime="20210602 14:11:32.891"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.892" endtime="20210602 14:11:32.892"></status> +</kw> +<msg timestamp="20210602 14:11:32.892" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:32.893" level="INFO">${objectType} = mobile_identity</msg> +<status status="PASS" starttime="20210602 14:11:32.891" endtime="20210602 14:11:32.893"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.893" endtime="20210602 14:11:32.894"></status> +</kw> +<msg timestamp="20210602 14:11:32.894" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc...</msg> +<status status="PASS" starttime="20210602 14:11:32.893" endtime="20210602 14:11:32.894"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectSubType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.895" endtime="20210602 14:11:32.895"></status> +</kw> +<msg timestamp="20210602 14:11:32.895" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:32.896" level="INFO">${objectSubType} = phone_number</msg> +<status status="PASS" starttime="20210602 14:11:32.895" endtime="20210602 14:11:32.896"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.896" endtime="20210602 14:11:32.897"></status> +</kw> +<msg timestamp="20210602 14:11:32.897" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectD...</msg> +<status status="PASS" starttime="20210602 14:11:32.896" endtime="20210602 14:11:32.897"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<msg timestamp="20210602 14:11:32.899" level="FAIL">Dictionary does not contain key 'objectId'.</msg> +<status status="FAIL" starttime="20210602 14:11:32.898" endtime="20210602 14:11:32.899"></status> +</kw> +<msg timestamp="20210602 14:11:32.899" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:32.899" level="INFO">${objectId} = Dictionary does not contain key 'objectId'.</msg> +<status status="PASS" starttime="20210602 14:11:32.897" endtime="20210602 14:11:32.899"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectId": null</arg> +<arg>"objectId":${objectId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.900" endtime="20210602 14:11:32.901"></status> +</kw> +<msg timestamp="20210602 14:11:32.901" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectD...</msg> +<status status="PASS" starttime="20210602 14:11:32.900" endtime="20210602 14:11:32.901"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"option": "update"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.902" endtime="20210602 14:11:32.902"></status> +</kw> +<msg timestamp="20210602 14:11:32.902" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectD...</msg> +<status status="PASS" starttime="20210602 14:11:32.901" endtime="20210602 14:11:32.902"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectJsonList}</var> +</assign> +<msg timestamp="20210602 14:11:32.903" level="INFO">${objectJsonList} = []</msg> +<status status="PASS" starttime="20210602 14:11:32.903" endtime="20210602 14:11:32.903"></status> +</kw> +<kw name="Evaluate" library="BuiltIn"> +<doc>Evaluates the given expression in Python and returns the results.</doc> +<arguments> +<arg>type(${objList})</arg> +</arguments> +<assign> +<var>${objListType}</var> +</assign> +<msg timestamp="20210602 14:11:32.904" level="INFO">${objListType} = <class 'list'></msg> +<status status="PASS" starttime="20210602 14:11:32.903" endtime="20210602 14:11:32.904"></status> +</kw> +<kw name="${obj} IN [ @{objList} ]" type="for"> +<kw name="${obj} = {'addItemList': [{'keywordArray': ['123*']}, {'keywordArray': ['$123456789012345']}, {'keywordArray': ['12345']}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.905" endtime="20210602 14:11:32.905"></status> +</kw> +<msg timestamp="20210602 14:11:32.906" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:32.906" level="INFO">${addItemList} = [{'keywordArray': ['123*']}, {'keywordArray': ['$123456789012345']}, {'keywordArray': ['12345']}]</msg> +<status status="PASS" starttime="20210602 14:11:32.905" endtime="20210602 14:11:32.906"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:32.907" level="INFO">${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["$123456789012345"]}, {"keywordArray": ["12345"]}]</msg> +<status status="PASS" starttime="20210602 14:11:32.906" endtime="20210602 14:11:32.907"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.908" endtime="20210602 14:11:32.908"></status> +</kw> +<msg timestamp="20210602 14:11:32.908" level="INFO">${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["$123456789012345"]}, {"keywordArray": ["12345"]}]</msg> +<status status="PASS" starttime="20210602 14:11:32.907" endtime="20210602 14:11:32.908"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.909" endtime="20210602 14:11:32.909"></status> +</kw> +<msg timestamp="20210602 14:11:32.910" level="INFO">${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["$123456789012345"]}, {"keywordArray": ["12345"]}]</msg> +<status status="PASS" starttime="20210602 14:11:32.909" endtime="20210602 14:11:32.910"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.911" endtime="20210602 14:11:32.911"></status> +</kw> +<msg timestamp="20210602 14:11:32.911" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectD...</msg> +<status status="PASS" starttime="20210602 14:11:32.910" endtime="20210602 14:11:32.911"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:32.912" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectD...</msg> +<status status="PASS" starttime="20210602 14:11:32.912" endtime="20210602 14:11:32.912"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:32.913" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'mobile_identity', 'objectSubType': 'phone_number', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjec...</msg> +<status status="PASS" starttime="20210602 14:11:32.913" endtime="20210602 14:11:32.913"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.929" endtime="20210602 14:11:32.929"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.929" endtime="20210602 14:11:32.930"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'mobile_identity', 'objectSubType': 'phone_number', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObject..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.931" endtime="20210602 14:11:32.931"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:32.930" endtime="20210602 14:11:32.931"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:32.930" endtime="20210602 14:11:32.931"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:32.928" endtime="20210602 14:11:32.932"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:32.905" endtime="20210602 14:11:32.932"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:32.904" endtime="20210602 14:11:32.932"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>opAction=add</arg> +<arg>returnData=1</arg> +<arg>objectList=${objectJsonList}</arg> +</arguments> +<assign> +<var>${objectData}</var> +</assign> +<msg timestamp="20210602 14:11:32.933" level="INFO">${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'mobile_identity', 'objectSubType': 'phone_number', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectNam...</msg> +<status status="PASS" starttime="20210602 14:11:32.932" endtime="20210602 14:11:32.933"></status> +</kw> +<kw name="createObject" library="object"> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${rescode}</var> +<var>${objectIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${ipList}对象dict</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.934" endtime="20210602 14:11:32.934"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建IP</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:32.934" endtime="20210602 14:11:32.935"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${ipList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:32.936" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:32.935" endtime="20210602 14:11:32.936"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${ipList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:32.937" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "mobile_identity", "objectSubType": "phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectNam...</msg> +<status status="PASS" starttime="20210602 14:11:32.936" endtime="20210602 14:11:32.937"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${objectUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:32.938" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:32.938" endtime="20210602 14:11:32.939"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:32.939" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v1, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:32.939" endtime="20210602 14:11:32.940"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:32.940" level="INFO">POST Request using : uri=/policy/object, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "mobile_identity", "objectSubType": "phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"keywordArray": ["123*"]}, {"keywordArray": ["$123456789012345"]}, {"keywordArray": ["12345"]}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]} +json=None</msg> +<msg timestamp="20210602 14:11:33.217" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:32.940" endtime="20210602 14:11:33.217"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:33.218" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:33.218" endtime="20210602 14:11:33.218"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:33.219" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:33.219" endtime="20210602 14:11:33.219"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:33.220" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "objectList" : [ { + "addItemList" : [ { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:32", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "123" ], + "itemId" : 10074697, + "objectId" : 107886 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:32", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "123456789012345" ], + "itemId" : 10074698, + "objectId" : 107886 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:32", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "12345" ], + "itemId" : 10074699, + "objectId" : 107886 + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107886, + "objectName" : "auttest单ip指定端口", + "objectSubType" : "phone_number", + "objectType" : "mobile_identity", + "opTime" : "2021-06-02 14:11:32", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:33.220" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:33.220" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:32', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:33.219" endtime="20210602 14:11:33.221"></status> +</kw> +<msg timestamp="20210602 14:11:33.221" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:32', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:32.938" endtime="20210602 14:11:33.221"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>getObjectListIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${objectIds}</var> +</assign> +<kw name="getObjectListIds" library="process_object_body"> +<doc>获取结果中的对象ID</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>Call Get-ObjectIds</arg> +</arguments> +<msg timestamp="20210602 14:11:33.223" level="INFO">Call Get-ObjectIds</msg> +<status status="PASS" starttime="20210602 14:11:33.222" endtime="20210602 14:11:33.223"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIds}</var> +</assign> +<msg timestamp="20210602 14:11:33.224" level="INFO">${objectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:33.224" endtime="20210602 14:11:33.224"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${objectIdsTemp}</var> +</assign> +<msg timestamp="20210602 14:11:33.226" level="INFO">${objectIdsTemp} = </msg> +<status status="PASS" starttime="20210602 14:11:33.225" endtime="20210602 14:11:33.226"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${data}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.227" endtime="20210602 14:11:33.227"></status> +</kw> +<msg timestamp="20210602 14:11:33.227" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:33.227" level="INFO">${data} = {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:32', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['1...</msg> +<status status="PASS" starttime="20210602 14:11:33.226" endtime="20210602 14:11:33.227"></status> +</kw> +<kw name="Return From Keyword If" library="BuiltIn"> +<doc>Returns from the enclosing user keyword if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"=="FAIL"</arg> +<arg>${objectIdsTemp}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.228" endtime="20210602 14:11:33.228"></status> +</kw> +<kw name="${object} IN [ @{value['data']['objectList']} ]" type="for"> +<kw name="${object} = {'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:32', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['123'], 'itemId': ..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.229" endtime="20210602 14:11:33.229"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.229" endtime="20210602 14:11:33.230"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.228" endtime="20210602 14:11:33.230"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.222" endtime="20210602 14:11:33.230"></status> +</kw> +<msg timestamp="20210602 14:11:33.230" level="INFO">${objectIds} = [107886]</msg> +<status status="PASS" starttime="20210602 14:11:33.221" endtime="20210602 14:11:33.231"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:33.231" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:33.231" endtime="20210602 14:11:33.231"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:33.232" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:33.232" endtime="20210602 14:11:33.232"></status> +</kw> +<msg timestamp="20210602 14:11:33.232" level="INFO">${rescode} = 200</msg> +<msg timestamp="20210602 14:11:33.233" level="INFO">${objectIds} = [107886]</msg> +<status status="PASS" starttime="20210602 14:11:32.933" endtime="20210602 14:11:33.233"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:33.233" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:33.233" endtime="20210602 14:11:33.233"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${protocolField}</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${protocolField}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.234" endtime="20210602 14:11:33.235"></status> +</kw> +<msg timestamp="20210602 14:11:33.235" level="INFO">${protocolField} = TSG_FILED_GTP_PHONE_NUMBER</msg> +<status status="PASS" starttime="20210602 14:11:33.234" endtime="20210602 14:11:33.235"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectsList}</var> +</assign> +<msg timestamp="20210602 14:11:33.235" level="INFO">${objectsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:33.235" endtime="20210602 14:11:33.236"></status> +</kw> +<kw name="${obj} IN [ @{objectIds} ]" type="for"> +<kw name="${obj} = 107886" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:33.237" level="INFO">${objectList} = {'objectId': 107886, 'protocolField': 'TSG_FILED_GTP_PHONE_NUMBER'}</msg> +<status status="PASS" starttime="20210602 14:11:33.236" endtime="20210602 14:11:33.237"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.237" endtime="20210602 14:11:33.238"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.236" endtime="20210602 14:11:33.238"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.236" endtime="20210602 14:11:33.238"></status> +</kw> +<msg timestamp="20210602 14:11:33.238" level="INFO">${objectIds} = [107886]</msg> +<msg timestamp="20210602 14:11:33.238" level="INFO">${objectList} = {'objectId': 107886, 'protocolField': 'TSG_FILED_GTP_PHONE_NUMBER'}</msg> +<status status="PASS" starttime="20210602 14:11:32.887" endtime="20210602 14:11:33.238"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>OrangeFilter</arg> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.240" endtime="20210602 14:11:33.240"></status> +</kw> +<msg timestamp="20210602 14:11:33.240" level="INFO">${objectList} = {'objectId': 107886, 'protocolField': 'TSG_FILED_GTP_PHONE_NUMBER'}</msg> +<status status="PASS" starttime="20210602 14:11:33.239" endtime="20210602 14:11:33.240"></status> +</kw> +<msg timestamp="20210602 14:11:33.240" level="INFO">${objectIds} = [107886]</msg> +<msg timestamp="20210602 14:11:33.241" level="INFO">${objectList} = {'objectId': 107886, 'protocolField': 'TSG_FILED_GTP_PHONE_NUMBER'}</msg> +<status status="PASS" starttime="20210602 14:11:32.885" endtime="20210602 14:11:33.241"></status> +</kw> +<kw name="Get Length" library="BuiltIn"> +<doc>Returns and logs the length of the given item as an integer.</doc> +<arguments> +<arg>${objectIdsList}</arg> +</arguments> +<assign> +<var>${len}</var> +</assign> +<msg timestamp="20210602 14:11:33.241" level="INFO">Length is 4</msg> +<msg timestamp="20210602 14:11:33.242" level="INFO">${len} = 4</msg> +<status status="PASS" starttime="20210602 14:11:33.241" endtime="20210602 14:11:33.242"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${len} != 0</arg> +<arg>AppendListToList</arg> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectIds}</arg> +</arguments> +<assign> +<var>${objectIdsList}</var> +</assign> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.253" endtime="20210602 14:11:33.254"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.254" endtime="20210602 14:11:33.254"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = 107886" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.255" endtime="20210602 14:11:33.255"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.254" endtime="20210602 14:11:33.255"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.254" endtime="20210602 14:11:33.255"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.253" endtime="20210602 14:11:33.256"></status> +</kw> +<msg timestamp="20210602 14:11:33.256" level="INFO">${objectIdsList} = [107882, 107883, 107884, 107885, 107886]</msg> +<status status="PASS" starttime="20210602 14:11:33.242" endtime="20210602 14:11:33.257"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Append To List</arg> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Append To List</arg> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>Append To List</arg> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.258" endtime="20210602 14:11:33.258"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.257" endtime="20210602 14:11:33.258"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:32.884" endtime="20210602 14:11:33.258"></status> +</kw> +<kw name="${key} = {'protocolField': 'TSG_FILED_GTP_APN', 'objectType': 'apn', 'objectSubType': '', 'objList': [{'addItemList': [{'keywordArray': ['*uawei.org']}, {'keywordArray': ['$huawei.com']}, {'keywordArray': ['$w..." type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${key}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:33.259" level="INFO">${protocolField} = TSG_FILED_GTP_APN</msg> +<status status="PASS" starttime="20210602 14:11:33.259" endtime="20210602 14:11:33.259"></status> +</kw> +<kw name="CreateObjectList" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${key}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.260" endtime="20210602 14:11:33.260"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:33.261" level="INFO">${protocolField} = TSG_FILED_GTP_APN</msg> +<status status="PASS" starttime="20210602 14:11:33.261" endtime="20210602 14:11:33.261"></status> +</kw> +<kw name="CreateObjects" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.262" endtime="20210602 14:11:33.262"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:33.263" level="INFO">${protocolField} = TSG_FILED_GTP_APN</msg> +<status status="PASS" starttime="20210602 14:11:33.263" endtime="20210602 14:11:33.263"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objList</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:33.264" level="INFO">${objList} = [{'addItemList': [{'keywordArray': ['*uawei.org']}, {'keywordArray': ['$huawei.com']}, {'keywordArray': ['$www.huawei.com']}]}]</msg> +<status status="PASS" starttime="20210602 14:11:33.263" endtime="20210602 14:11:33.264"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${objJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.264" endtime="20210602 14:11:33.264"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objModeJson}</arg> +</arguments> +<assign> +<var>${objJson}</var> +</assign> +<msg timestamp="20210602 14:11:33.265" level="INFO">${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:33.265" endtime="20210602 14:11:33.265"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objListMode}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:33.266" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:33.265" endtime="20210602 14:11:33.266"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.267" endtime="20210602 14:11:33.267"></status> +</kw> +<msg timestamp="20210602 14:11:33.267" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:33.267" level="INFO">${objectType} = apn</msg> +<status status="PASS" starttime="20210602 14:11:33.266" endtime="20210602 14:11:33.267"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.268" endtime="20210602 14:11:33.269"></status> +</kw> +<msg timestamp="20210602 14:11:33.269" level="INFO">${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:33.268" endtime="20210602 14:11:33.269"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectSubType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.270" endtime="20210602 14:11:33.270"></status> +</kw> +<msg timestamp="20210602 14:11:33.270" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:33.271" level="INFO">${objectSubType} = </msg> +<status status="PASS" starttime="20210602 14:11:33.270" endtime="20210602 14:11:33.271"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.272" endtime="20210602 14:11:33.272"></status> +</kw> +<msg timestamp="20210602 14:11:33.272" level="INFO">${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...</msg> +<status status="PASS" starttime="20210602 14:11:33.271" endtime="20210602 14:11:33.273"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<msg timestamp="20210602 14:11:33.274" level="FAIL">Dictionary does not contain key 'objectId'.</msg> +<status status="FAIL" starttime="20210602 14:11:33.273" endtime="20210602 14:11:33.274"></status> +</kw> +<msg timestamp="20210602 14:11:33.274" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:33.274" level="INFO">${objectId} = Dictionary does not contain key 'objectId'.</msg> +<status status="PASS" starttime="20210602 14:11:33.273" endtime="20210602 14:11:33.274"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectId": null</arg> +<arg>"objectId":${objectId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.275" endtime="20210602 14:11:33.276"></status> +</kw> +<msg timestamp="20210602 14:11:33.276" level="INFO">${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...</msg> +<status status="PASS" starttime="20210602 14:11:33.275" endtime="20210602 14:11:33.276"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"option": "update"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.277" endtime="20210602 14:11:33.277"></status> +</kw> +<msg timestamp="20210602 14:11:33.277" level="INFO">${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...</msg> +<status status="PASS" starttime="20210602 14:11:33.276" endtime="20210602 14:11:33.277"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectJsonList}</var> +</assign> +<msg timestamp="20210602 14:11:33.278" level="INFO">${objectJsonList} = []</msg> +<status status="PASS" starttime="20210602 14:11:33.278" endtime="20210602 14:11:33.278"></status> +</kw> +<kw name="Evaluate" library="BuiltIn"> +<doc>Evaluates the given expression in Python and returns the results.</doc> +<arguments> +<arg>type(${objList})</arg> +</arguments> +<assign> +<var>${objListType}</var> +</assign> +<msg timestamp="20210602 14:11:33.279" level="INFO">${objListType} = <class 'list'></msg> +<status status="PASS" starttime="20210602 14:11:33.278" endtime="20210602 14:11:33.279"></status> +</kw> +<kw name="${obj} IN [ @{objList} ]" type="for"> +<kw name="${obj} = {'addItemList': [{'keywordArray': ['*uawei.org']}, {'keywordArray': ['$huawei.com']}, {'keywordArray': ['$www.huawei.com']}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.280" endtime="20210602 14:11:33.281"></status> +</kw> +<msg timestamp="20210602 14:11:33.281" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:33.281" level="INFO">${addItemList} = [{'keywordArray': ['*uawei.org']}, {'keywordArray': ['$huawei.com']}, {'keywordArray': ['$www.huawei.com']}]</msg> +<status status="PASS" starttime="20210602 14:11:33.280" endtime="20210602 14:11:33.281"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:33.282" level="INFO">${addItemList} = [{"keywordArray": ["*uawei.org"]}, {"keywordArray": ["$huawei.com"]}, {"keywordArray": ["$www.huawei.com"]}]</msg> +<status status="PASS" starttime="20210602 14:11:33.282" endtime="20210602 14:11:33.282"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.283" endtime="20210602 14:11:33.283"></status> +</kw> +<msg timestamp="20210602 14:11:33.284" level="INFO">${addItemList} = [{"keywordArray": ["*uawei.org"]}, {"keywordArray": ["$huawei.com"]}, {"keywordArray": ["$www.huawei.com"]}]</msg> +<status status="PASS" starttime="20210602 14:11:33.282" endtime="20210602 14:11:33.284"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.285" endtime="20210602 14:11:33.285"></status> +</kw> +<msg timestamp="20210602 14:11:33.285" level="INFO">${addItemList} = [{"keywordArray": ["*uawei.org"]}, {"keywordArray": ["$huawei.com"]}, {"keywordArray": ["$www.huawei.com"]}]</msg> +<status status="PASS" starttime="20210602 14:11:33.284" endtime="20210602 14:11:33.285"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.286" endtime="20210602 14:11:33.287"></status> +</kw> +<msg timestamp="20210602 14:11:33.287" level="INFO">${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...</msg> +<status status="PASS" starttime="20210602 14:11:33.286" endtime="20210602 14:11:33.287"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:33.288" level="INFO">${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...</msg> +<status status="PASS" starttime="20210602 14:11:33.288" endtime="20210602 14:11:33.288"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:33.289" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'apn', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addItemList'...</msg> +<status status="PASS" starttime="20210602 14:11:33.289" endtime="20210602 14:11:33.289"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.300" endtime="20210602 14:11:33.300"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.300" endtime="20210602 14:11:33.301"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'apn', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addItemList':..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.301" endtime="20210602 14:11:33.302"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.301" endtime="20210602 14:11:33.302"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.301" endtime="20210602 14:11:33.302"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.299" endtime="20210602 14:11:33.302"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.280" endtime="20210602 14:11:33.303"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.279" endtime="20210602 14:11:33.303"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>opAction=add</arg> +<arg>returnData=1</arg> +<arg>objectList=${objectJsonList}</arg> +</arguments> +<assign> +<var>${objectData}</var> +</assign> +<msg timestamp="20210602 14:11:33.304" level="INFO">${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'apn', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'o...</msg> +<status status="PASS" starttime="20210602 14:11:33.303" endtime="20210602 14:11:33.304"></status> +</kw> +<kw name="createObject" library="object"> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${rescode}</var> +<var>${objectIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${ipList}对象dict</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.305" endtime="20210602 14:11:33.305"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建IP</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.306" endtime="20210602 14:11:33.306"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${ipList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:33.307" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:33.306" endtime="20210602 14:11:33.307"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${ipList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:33.307" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "apn", "objectSubType": "", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u63...</msg> +<status status="PASS" starttime="20210602 14:11:33.307" endtime="20210602 14:11:33.308"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${objectUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:33.309" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:33.308" endtime="20210602 14:11:33.309"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:33.309" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v1, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:33.309" endtime="20210602 14:11:33.310"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:33.311" level="INFO">POST Request using : uri=/policy/object, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "apn", "objectSubType": "", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"keywordArray": ["*uawei.org"]}, {"keywordArray": ["$huawei.com"]}, {"keywordArray": ["$www.huawei.com"]}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]} +json=None</msg> +<msg timestamp="20210602 14:11:33.455" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:33.310" endtime="20210602 14:11:33.456"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:33.456" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:33.456" endtime="20210602 14:11:33.457"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:33.457" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:33.457" endtime="20210602 14:11:33.458"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:33.458" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "objectList" : [ { + "addItemList" : [ { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:32", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "uawei.org" ], + "itemId" : 10074700, + "objectId" : 107887 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:32", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "huawei.com" ], + "itemId" : 10074701, + "objectId" : 107887 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:32", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "www.huawei.com" ], + "itemId" : 10074702, + "objectId" : 107887 + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107887, + "objectName" : "auttest单ip指定端口", + "objectType" : "apn", + "opTime" : "2021-06-02 14:11:32", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:33.459" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:33.459" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:32', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:33.458" endtime="20210602 14:11:33.459"></status> +</kw> +<msg timestamp="20210602 14:11:33.460" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:32', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:33.308" endtime="20210602 14:11:33.460"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>getObjectListIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${objectIds}</var> +</assign> +<kw name="getObjectListIds" library="process_object_body"> +<doc>获取结果中的对象ID</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>Call Get-ObjectIds</arg> +</arguments> +<msg timestamp="20210602 14:11:33.462" level="INFO">Call Get-ObjectIds</msg> +<status status="PASS" starttime="20210602 14:11:33.462" endtime="20210602 14:11:33.462"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIds}</var> +</assign> +<msg timestamp="20210602 14:11:33.463" level="INFO">${objectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:33.462" endtime="20210602 14:11:33.463"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${objectIdsTemp}</var> +</assign> +<msg timestamp="20210602 14:11:33.464" level="INFO">${objectIdsTemp} = </msg> +<status status="PASS" starttime="20210602 14:11:33.463" endtime="20210602 14:11:33.464"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${data}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.465" endtime="20210602 14:11:33.465"></status> +</kw> +<msg timestamp="20210602 14:11:33.466" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:33.466" level="INFO">${data} = {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:32', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['u...</msg> +<status status="PASS" starttime="20210602 14:11:33.464" endtime="20210602 14:11:33.466"></status> +</kw> +<kw name="Return From Keyword If" library="BuiltIn"> +<doc>Returns from the enclosing user keyword if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"=="FAIL"</arg> +<arg>${objectIdsTemp}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.466" endtime="20210602 14:11:33.467"></status> +</kw> +<kw name="${object} IN [ @{value['data']['objectList']} ]" type="for"> +<kw name="${object} = {'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:32', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['uawei.org'], 'ite..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.468" endtime="20210602 14:11:33.468"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.467" endtime="20210602 14:11:33.468"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.467" endtime="20210602 14:11:33.469"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.461" endtime="20210602 14:11:33.469"></status> +</kw> +<msg timestamp="20210602 14:11:33.469" level="INFO">${objectIds} = [107887]</msg> +<status status="PASS" starttime="20210602 14:11:33.460" endtime="20210602 14:11:33.470"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:33.470" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:33.470" endtime="20210602 14:11:33.471"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:33.471" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:33.471" endtime="20210602 14:11:33.472"></status> +</kw> +<msg timestamp="20210602 14:11:33.472" level="INFO">${rescode} = 200</msg> +<msg timestamp="20210602 14:11:33.472" level="INFO">${objectIds} = [107887]</msg> +<status status="PASS" starttime="20210602 14:11:33.305" endtime="20210602 14:11:33.472"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:33.473" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:33.473" endtime="20210602 14:11:33.473"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${protocolField}</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${protocolField}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.474" endtime="20210602 14:11:33.474"></status> +</kw> +<msg timestamp="20210602 14:11:33.475" level="INFO">${protocolField} = TSG_FILED_GTP_APN</msg> +<status status="PASS" starttime="20210602 14:11:33.474" endtime="20210602 14:11:33.475"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectsList}</var> +</assign> +<msg timestamp="20210602 14:11:33.475" level="INFO">${objectsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:33.475" endtime="20210602 14:11:33.476"></status> +</kw> +<kw name="${obj} IN [ @{objectIds} ]" type="for"> +<kw name="${obj} = 107887" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:33.477" level="INFO">${objectList} = {'objectId': 107887, 'protocolField': 'TSG_FILED_GTP_APN'}</msg> +<status status="PASS" starttime="20210602 14:11:33.476" endtime="20210602 14:11:33.477"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.477" endtime="20210602 14:11:33.478"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.476" endtime="20210602 14:11:33.478"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.476" endtime="20210602 14:11:33.478"></status> +</kw> +<msg timestamp="20210602 14:11:33.478" level="INFO">${objectIds} = [107887]</msg> +<msg timestamp="20210602 14:11:33.479" level="INFO">${objectList} = {'objectId': 107887, 'protocolField': 'TSG_FILED_GTP_APN'}</msg> +<status status="PASS" starttime="20210602 14:11:33.261" endtime="20210602 14:11:33.479"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>OrangeFilter</arg> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.480" endtime="20210602 14:11:33.480"></status> +</kw> +<msg timestamp="20210602 14:11:33.480" level="INFO">${objectList} = {'objectId': 107887, 'protocolField': 'TSG_FILED_GTP_APN'}</msg> +<status status="PASS" starttime="20210602 14:11:33.479" endtime="20210602 14:11:33.480"></status> +</kw> +<msg timestamp="20210602 14:11:33.481" level="INFO">${objectIds} = [107887]</msg> +<msg timestamp="20210602 14:11:33.481" level="INFO">${objectList} = {'objectId': 107887, 'protocolField': 'TSG_FILED_GTP_APN'}</msg> +<status status="PASS" starttime="20210602 14:11:33.260" endtime="20210602 14:11:33.481"></status> +</kw> +<kw name="Get Length" library="BuiltIn"> +<doc>Returns and logs the length of the given item as an integer.</doc> +<arguments> +<arg>${objectIdsList}</arg> +</arguments> +<assign> +<var>${len}</var> +</assign> +<msg timestamp="20210602 14:11:33.482" level="INFO">Length is 5</msg> +<msg timestamp="20210602 14:11:33.482" level="INFO">${len} = 5</msg> +<status status="PASS" starttime="20210602 14:11:33.481" endtime="20210602 14:11:33.482"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${len} != 0</arg> +<arg>AppendListToList</arg> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectIds}</arg> +</arguments> +<assign> +<var>${objectIdsList}</var> +</assign> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.493" endtime="20210602 14:11:33.493"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.493" endtime="20210602 14:11:33.493"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = 107887" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.493" endtime="20210602 14:11:33.493"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.493" endtime="20210602 14:11:33.495"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.493" endtime="20210602 14:11:33.495"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.492" endtime="20210602 14:11:33.495"></status> +</kw> +<msg timestamp="20210602 14:11:33.495" level="INFO">${objectIdsList} = [107882, 107883, 107884, 107885, 107886, 107887]</msg> +<status status="PASS" starttime="20210602 14:11:33.482" endtime="20210602 14:11:33.495"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Append To List</arg> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Append To List</arg> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>Append To List</arg> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.497" endtime="20210602 14:11:33.497"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.496" endtime="20210602 14:11:33.497"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.259" endtime="20210602 14:11:33.498"></status> +</kw> +<kw name="${key} = {'protocolField': 'TSG_SECURITY_SOURCE_ADDR', 'objectType': 'ip', 'objectSubType': 'ip_learning', 'objList': [{'addItemList': [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', ..." type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${key}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:33.498" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:33.498" endtime="20210602 14:11:33.499"></status> +</kw> +<kw name="CreateObjectList" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${key}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.499" endtime="20210602 14:11:33.500"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:33.500" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:33.500" endtime="20210602 14:11:33.500"></status> +</kw> +<kw name="CreateObjects" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.501" endtime="20210602 14:11:33.501"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:33.502" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:33.502" endtime="20210602 14:11:33.502"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objList</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:33.503" level="INFO">${objList} = [{'addItemList': [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'learningDepth': '2', 'agingTime': '12', 'voteClientNum': '10', 'learnedIpLimit': '1000'}]}]</msg> +<status status="PASS" starttime="20210602 14:11:33.503" endtime="20210602 14:11:33.503"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${objJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.503" endtime="20210602 14:11:33.503"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objModeJson}</arg> +</arguments> +<assign> +<var>${objJson}</var> +</assign> +<msg timestamp="20210602 14:11:33.503" level="INFO">${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:33.503" endtime="20210602 14:11:33.503"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objListMode}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:33.504" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:33.504" endtime="20210602 14:11:33.504"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.505" endtime="20210602 14:11:33.505"></status> +</kw> +<msg timestamp="20210602 14:11:33.505" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:33.505" level="INFO">${objectType} = ip</msg> +<status status="PASS" starttime="20210602 14:11:33.504" endtime="20210602 14:11:33.506"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.506" endtime="20210602 14:11:33.507"></status> +</kw> +<msg timestamp="20210602 14:11:33.507" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "s...</msg> +<status status="PASS" starttime="20210602 14:11:33.506" endtime="20210602 14:11:33.507"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectSubType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.508" endtime="20210602 14:11:33.508"></status> +</kw> +<msg timestamp="20210602 14:11:33.508" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:33.509" level="INFO">${objectSubType} = ip_learning</msg> +<status status="PASS" starttime="20210602 14:11:33.507" endtime="20210602 14:11:33.509"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.509" endtime="20210602 14:11:33.510"></status> +</kw> +<msg timestamp="20210602 14:11:33.510" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", ...</msg> +<status status="PASS" starttime="20210602 14:11:33.509" endtime="20210602 14:11:33.510"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<msg timestamp="20210602 14:11:33.511" level="FAIL">Dictionary does not contain key 'objectId'.</msg> +<status status="FAIL" starttime="20210602 14:11:33.511" endtime="20210602 14:11:33.511"></status> +</kw> +<msg timestamp="20210602 14:11:33.512" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:33.512" level="INFO">${objectId} = Dictionary does not contain key 'objectId'.</msg> +<status status="PASS" starttime="20210602 14:11:33.511" endtime="20210602 14:11:33.512"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectId": null</arg> +<arg>"objectId":${objectId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.513" endtime="20210602 14:11:33.513"></status> +</kw> +<msg timestamp="20210602 14:11:33.513" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", ...</msg> +<status status="PASS" starttime="20210602 14:11:33.512" endtime="20210602 14:11:33.513"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"option": "update"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.514" endtime="20210602 14:11:33.514"></status> +</kw> +<msg timestamp="20210602 14:11:33.515" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", ...</msg> +<status status="PASS" starttime="20210602 14:11:33.514" endtime="20210602 14:11:33.515"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectJsonList}</var> +</assign> +<msg timestamp="20210602 14:11:33.515" level="INFO">${objectJsonList} = []</msg> +<status status="PASS" starttime="20210602 14:11:33.515" endtime="20210602 14:11:33.516"></status> +</kw> +<kw name="Evaluate" library="BuiltIn"> +<doc>Evaluates the given expression in Python and returns the results.</doc> +<arguments> +<arg>type(${objList})</arg> +</arguments> +<assign> +<var>${objListType}</var> +</assign> +<msg timestamp="20210602 14:11:33.517" level="INFO">${objListType} = <class 'list'></msg> +<status status="PASS" starttime="20210602 14:11:33.516" endtime="20210602 14:11:33.517"></status> +</kw> +<kw name="${obj} IN [ @{objList} ]" type="for"> +<kw name="${obj} = {'addItemList': [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'learningDepth': '2', 'agingTime': '12', 'voteClientNum': '10', 'learnedIpLimit': '1000'}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.519" endtime="20210602 14:11:33.519"></status> +</kw> +<msg timestamp="20210602 14:11:33.519" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:33.519" level="INFO">${addItemList} = [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'learningDepth': '2', 'agingTime': '12', 'voteClientNum': '10', 'learnedIpLimit': '1000'}]</msg> +<status status="PASS" starttime="20210602 14:11:33.518" endtime="20210602 14:11:33.520"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:33.520" level="INFO">${addItemList} = [{"fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"}]</msg> +<status status="PASS" starttime="20210602 14:11:33.520" endtime="20210602 14:11:33.520"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.521" endtime="20210602 14:11:33.522"></status> +</kw> +<msg timestamp="20210602 14:11:33.523" level="INFO">${addItemList} = "fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"}]</msg> +<status status="PASS" starttime="20210602 14:11:33.521" endtime="20210602 14:11:33.523"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.524" endtime="20210602 14:11:33.524"></status> +</kw> +<msg timestamp="20210602 14:11:33.524" level="INFO">${addItemList} = "fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"</msg> +<status status="PASS" starttime="20210602 14:11:33.523" endtime="20210602 14:11:33.524"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.525" endtime="20210602 14:11:33.526"></status> +</kw> +<msg timestamp="20210602 14:11:33.526" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", ...</msg> +<status status="PASS" starttime="20210602 14:11:33.525" endtime="20210602 14:11:33.526"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:33.527" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", ...</msg> +<status status="PASS" starttime="20210602 14:11:33.526" endtime="20210602 14:11:33.527"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:33.528" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'ip_learning', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'ad...</msg> +<status status="PASS" starttime="20210602 14:11:33.527" endtime="20210602 14:11:33.528"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.544" endtime="20210602 14:11:33.544"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.545" endtime="20210602 14:11:33.545"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'ip', 'objectSubType': 'ip_learning', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'add..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.546" endtime="20210602 14:11:33.546"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.545" endtime="20210602 14:11:33.546"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.545" endtime="20210602 14:11:33.546"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.543" endtime="20210602 14:11:33.546"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.518" endtime="20210602 14:11:33.547"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.518" endtime="20210602 14:11:33.547"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>opAction=add</arg> +<arg>returnData=1</arg> +<arg>objectList=${objectJsonList}</arg> +</arguments> +<assign> +<var>${objectData}</var> +</assign> +<msg timestamp="20210602 14:11:33.548" level="INFO">${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'ip_learning', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单i...</msg> +<status status="PASS" starttime="20210602 14:11:33.547" endtime="20210602 14:11:33.548"></status> +</kw> +<kw name="createObject" library="object"> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${rescode}</var> +<var>${objectIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${ipList}对象dict</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.548" endtime="20210602 14:11:33.549"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建IP</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.549" endtime="20210602 14:11:33.549"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${ipList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:33.550" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:33.550" endtime="20210602 14:11:33.550"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${ipList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:33.551" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u...</msg> +<status status="PASS" starttime="20210602 14:11:33.550" endtime="20210602 14:11:33.551"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${objectUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:33.552" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:33.552" endtime="20210602 14:11:33.552"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:33.553" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v1, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:33.552" endtime="20210602 14:11:33.553"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:33.555" level="INFO">POST Request using : uri=/policy/object, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [], "fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000", "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]} +json=None</msg> +<msg timestamp="20210602 14:11:33.647" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:33.554" endtime="20210602 14:11:33.648"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:33.650" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:33.649" endtime="20210602 14:11:33.650"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:33.653" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:33.651" endtime="20210602 14:11:33.653"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:33.656" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "objectList" : [ { + "addItemList" : [ ], + "agingTime" : 12, + "deleteItemIds" : [ ], + "fromFqdns" : [ "$www.baidu.com", "*jd.com" ], + "fromProtocol" : "HTTP,SSL", + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "learnedIpLimit" : 1000, + "learningDepth" : "2", + "memberType" : 3, + "objectDesc" : "test", + "objectId" : 107888, + "objectName" : "auttest单ip指定端口", + "objectSubType" : "ip_learning", + "objectType" : "ip", + "opTime" : "2021-06-02 14:11:33", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ], + "voteClientNum" : 10 + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:33.657" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:33.657" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '...</msg> +<status status="PASS" starttime="20210602 14:11:33.654" endtime="20210602 14:11:33.658"></status> +</kw> +<msg timestamp="20210602 14:11:33.659" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '...</msg> +<status status="PASS" starttime="20210602 14:11:33.551" endtime="20210602 14:11:33.659"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>getObjectListIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${objectIds}</var> +</assign> +<kw name="getObjectListIds" library="process_object_body"> +<doc>获取结果中的对象ID</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>Call Get-ObjectIds</arg> +</arguments> +<msg timestamp="20210602 14:11:33.661" level="INFO">Call Get-ObjectIds</msg> +<status status="PASS" starttime="20210602 14:11:33.660" endtime="20210602 14:11:33.661"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIds}</var> +</assign> +<msg timestamp="20210602 14:11:33.661" level="INFO">${objectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:33.661" endtime="20210602 14:11:33.661"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${objectIdsTemp}</var> +</assign> +<msg timestamp="20210602 14:11:33.662" level="INFO">${objectIdsTemp} = </msg> +<status status="PASS" starttime="20210602 14:11:33.662" endtime="20210602 14:11:33.662"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${data}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.663" endtime="20210602 14:11:33.663"></status> +</kw> +<msg timestamp="20210602 14:11:33.663" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:33.664" level="INFO">${data} = {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '#31739C', 'isDisplay': None, 'isExclusio...</msg> +<status status="PASS" starttime="20210602 14:11:33.663" endtime="20210602 14:11:33.664"></status> +</kw> +<kw name="Return From Keyword If" library="BuiltIn"> +<doc>Returns from the enclosing user keyword if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"=="FAIL"</arg> +<arg>${objectIdsTemp}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.664" endtime="20210602 14:11:33.664"></status> +</kw> +<kw name="${object} IN [ @{value['data']['objectList']} ]" type="for"> +<kw name="${object} = {'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '#31739C', 'isDisplay': None, 'isExclusion': 0, 'isInitia..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.665" endtime="20210602 14:11:33.665"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.665" endtime="20210602 14:11:33.666"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.665" endtime="20210602 14:11:33.666"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.660" endtime="20210602 14:11:33.666"></status> +</kw> +<msg timestamp="20210602 14:11:33.666" level="INFO">${objectIds} = [107888]</msg> +<status status="PASS" starttime="20210602 14:11:33.659" endtime="20210602 14:11:33.667"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:33.667" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:33.667" endtime="20210602 14:11:33.667"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:33.668" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:33.668" endtime="20210602 14:11:33.668"></status> +</kw> +<msg timestamp="20210602 14:11:33.668" level="INFO">${rescode} = 200</msg> +<msg timestamp="20210602 14:11:33.669" level="INFO">${objectIds} = [107888]</msg> +<status status="PASS" starttime="20210602 14:11:33.548" endtime="20210602 14:11:33.669"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:33.669" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:33.669" endtime="20210602 14:11:33.670"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${protocolField}</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${protocolField}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.670" endtime="20210602 14:11:33.671"></status> +</kw> +<msg timestamp="20210602 14:11:33.671" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:33.670" endtime="20210602 14:11:33.671"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectsList}</var> +</assign> +<msg timestamp="20210602 14:11:33.672" level="INFO">${objectsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:33.671" endtime="20210602 14:11:33.672"></status> +</kw> +<kw name="${obj} IN [ @{objectIds} ]" type="for"> +<kw name="${obj} = 107888" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:33.673" level="INFO">${objectList} = {'objectId': 107888, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:33.672" endtime="20210602 14:11:33.673"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.673" endtime="20210602 14:11:33.674"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.672" endtime="20210602 14:11:33.674"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.672" endtime="20210602 14:11:33.674"></status> +</kw> +<msg timestamp="20210602 14:11:33.675" level="INFO">${objectIds} = [107888]</msg> +<msg timestamp="20210602 14:11:33.675" level="INFO">${objectList} = {'objectId': 107888, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:33.501" endtime="20210602 14:11:33.675"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>OrangeFilter</arg> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.676" endtime="20210602 14:11:33.676"></status> +</kw> +<msg timestamp="20210602 14:11:33.677" level="INFO">${objectList} = {'objectId': 107888, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:33.675" endtime="20210602 14:11:33.677"></status> +</kw> +<msg timestamp="20210602 14:11:33.677" level="INFO">${objectIds} = [107888]</msg> +<msg timestamp="20210602 14:11:33.677" level="INFO">${objectList} = {'objectId': 107888, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:33.499" endtime="20210602 14:11:33.678"></status> +</kw> +<kw name="Get Length" library="BuiltIn"> +<doc>Returns and logs the length of the given item as an integer.</doc> +<arguments> +<arg>${objectIdsList}</arg> +</arguments> +<assign> +<var>${len}</var> +</assign> +<msg timestamp="20210602 14:11:33.678" level="INFO">Length is 6</msg> +<msg timestamp="20210602 14:11:33.679" level="INFO">${len} = 6</msg> +<status status="PASS" starttime="20210602 14:11:33.678" endtime="20210602 14:11:33.679"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${len} != 0</arg> +<arg>AppendListToList</arg> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectIds}</arg> +</arguments> +<assign> +<var>${objectIdsList}</var> +</assign> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.690" endtime="20210602 14:11:33.690"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.691" endtime="20210602 14:11:33.691"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = 107888" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.692" endtime="20210602 14:11:33.693"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.692" endtime="20210602 14:11:33.693"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.691" endtime="20210602 14:11:33.693"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.689" endtime="20210602 14:11:33.694"></status> +</kw> +<msg timestamp="20210602 14:11:33.694" level="INFO">${objectIdsList} = [107882, 107883, 107884, 107885, 107886, 107887, 107888]</msg> +<status status="PASS" starttime="20210602 14:11:33.679" endtime="20210602 14:11:33.694"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Append To List</arg> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Append To List</arg> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>Append To List</arg> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.696" endtime="20210602 14:11:33.696"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.695" endtime="20210602 14:11:33.697"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.498" endtime="20210602 14:11:33.697"></status> +</kw> +<kw name="${key} = {'protocolField': 'TSG_SECURITY_DESTINATION_ADDR', 'objList': [{'addItemList': [{'ip': '255.255.255.254', 'port': '65535'}, {'ip': '255.255.255.254', 'port': '1'}]}]}" type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${key}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:33.698" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:33.697" endtime="20210602 14:11:33.698"></status> +</kw> +<kw name="CreateObjectList" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${key}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.699" endtime="20210602 14:11:33.699"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:33.700" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:33.700" endtime="20210602 14:11:33.700"></status> +</kw> +<kw name="CreateObjects" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.701" endtime="20210602 14:11:33.701"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:33.702" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:33.702" endtime="20210602 14:11:33.702"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objList</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:33.703" level="INFO">${objList} = [{'addItemList': [{'ip': '255.255.255.254', 'port': '65535'}, {'ip': '255.255.255.254', 'port': '1'}]}]</msg> +<status status="PASS" starttime="20210602 14:11:33.703" endtime="20210602 14:11:33.704"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${objJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.704" endtime="20210602 14:11:33.704"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objModeJson}</arg> +</arguments> +<assign> +<var>${objJson}</var> +</assign> +<msg timestamp="20210602 14:11:33.705" level="INFO">${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:33.704" endtime="20210602 14:11:33.705"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objListMode}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:33.706" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:33.706" endtime="20210602 14:11:33.706"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<msg timestamp="20210602 14:11:33.708" level="FAIL">Dictionary does not contain key 'objectType'.</msg> +<status status="FAIL" starttime="20210602 14:11:33.707" endtime="20210602 14:11:33.708"></status> +</kw> +<msg timestamp="20210602 14:11:33.708" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:33.708" level="INFO">${objectType} = Dictionary does not contain key 'objectType'.</msg> +<status status="PASS" starttime="20210602 14:11:33.707" endtime="20210602 14:11:33.708"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.709" endtime="20210602 14:11:33.710"></status> +</kw> +<msg timestamp="20210602 14:11:33.710" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:33.709" endtime="20210602 14:11:33.710"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectSubType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<msg timestamp="20210602 14:11:33.712" level="FAIL">Dictionary does not contain key 'objectSubType'.</msg> +<status status="FAIL" starttime="20210602 14:11:33.711" endtime="20210602 14:11:33.712"></status> +</kw> +<msg timestamp="20210602 14:11:33.712" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:33.713" level="INFO">${objectSubType} = Dictionary does not contain key 'objectSubType'.</msg> +<status status="PASS" starttime="20210602 14:11:33.710" endtime="20210602 14:11:33.713"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.715" endtime="20210602 14:11:33.715"></status> +</kw> +<msg timestamp="20210602 14:11:33.716" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:33.714" endtime="20210602 14:11:33.716"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<msg timestamp="20210602 14:11:33.718" level="FAIL">Dictionary does not contain key 'objectId'.</msg> +<status status="FAIL" starttime="20210602 14:11:33.717" endtime="20210602 14:11:33.718"></status> +</kw> +<msg timestamp="20210602 14:11:33.718" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:33.718" level="INFO">${objectId} = Dictionary does not contain key 'objectId'.</msg> +<status status="PASS" starttime="20210602 14:11:33.716" endtime="20210602 14:11:33.719"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectId": null</arg> +<arg>"objectId":${objectId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.719" endtime="20210602 14:11:33.720"></status> +</kw> +<msg timestamp="20210602 14:11:33.720" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:33.719" endtime="20210602 14:11:33.720"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"option": "update"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.721" endtime="20210602 14:11:33.722"></status> +</kw> +<msg timestamp="20210602 14:11:33.722" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:33.721" endtime="20210602 14:11:33.723"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectJsonList}</var> +</assign> +<msg timestamp="20210602 14:11:33.723" level="INFO">${objectJsonList} = []</msg> +<status status="PASS" starttime="20210602 14:11:33.723" endtime="20210602 14:11:33.723"></status> +</kw> +<kw name="Evaluate" library="BuiltIn"> +<doc>Evaluates the given expression in Python and returns the results.</doc> +<arguments> +<arg>type(${objList})</arg> +</arguments> +<assign> +<var>${objListType}</var> +</assign> +<msg timestamp="20210602 14:11:33.724" level="INFO">${objListType} = <class 'list'></msg> +<status status="PASS" starttime="20210602 14:11:33.724" endtime="20210602 14:11:33.724"></status> +</kw> +<kw name="${obj} IN [ @{objList} ]" type="for"> +<kw name="${obj} = {'addItemList': [{'ip': '255.255.255.254', 'port': '65535'}, {'ip': '255.255.255.254', 'port': '1'}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.725" endtime="20210602 14:11:33.726"></status> +</kw> +<msg timestamp="20210602 14:11:33.726" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:33.727" level="INFO">${addItemList} = [{'ip': '255.255.255.254', 'port': '65535'}, {'ip': '255.255.255.254', 'port': '1'}]</msg> +<status status="PASS" starttime="20210602 14:11:33.725" endtime="20210602 14:11:33.727"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:33.728" level="INFO">${addItemList} = [{"ip": "255.255.255.254", "port": "65535"}, {"ip": "255.255.255.254", "port": "1"}]</msg> +<status status="PASS" starttime="20210602 14:11:33.727" endtime="20210602 14:11:33.728"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.729" endtime="20210602 14:11:33.729"></status> +</kw> +<msg timestamp="20210602 14:11:33.729" level="INFO">${addItemList} = [{"ip": "255.255.255.254", "port": "65535"}, {"ip": "255.255.255.254", "port": "1"}]</msg> +<status status="PASS" starttime="20210602 14:11:33.728" endtime="20210602 14:11:33.729"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.730" endtime="20210602 14:11:33.730"></status> +</kw> +<msg timestamp="20210602 14:11:33.731" level="INFO">${addItemList} = [{"ip": "255.255.255.254", "port": "65535"}, {"ip": "255.255.255.254", "port": "1"}]</msg> +<status status="PASS" starttime="20210602 14:11:33.729" endtime="20210602 14:11:33.731"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.731" endtime="20210602 14:11:33.732"></status> +</kw> +<msg timestamp="20210602 14:11:33.732" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:33.731" endtime="20210602 14:11:33.732"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:33.733" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:33.732" endtime="20210602 14:11:33.733"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:33.734" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addIt...</msg> +<status status="PASS" starttime="20210602 14:11:33.733" endtime="20210602 14:11:33.734"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.747" endtime="20210602 14:11:33.747"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.748" endtime="20210602 14:11:33.748"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addIte..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.749" endtime="20210602 14:11:33.749"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.748" endtime="20210602 14:11:33.749"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.748" endtime="20210602 14:11:33.749"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.746" endtime="20210602 14:11:33.750"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.725" endtime="20210602 14:11:33.750"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.724" endtime="20210602 14:11:33.750"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>opAction=add</arg> +<arg>returnData=1</arg> +<arg>objectList=${objectJsonList}</arg> +</arguments> +<assign> +<var>${objectData}</var> +</assign> +<msg timestamp="20210602 14:11:33.751" level="INFO">${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定...</msg> +<status status="PASS" starttime="20210602 14:11:33.750" endtime="20210602 14:11:33.751"></status> +</kw> +<kw name="createObject" library="object"> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${rescode}</var> +<var>${objectIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${ipList}对象dict</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.752" endtime="20210602 14:11:33.752"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建IP</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:33.752" endtime="20210602 14:11:33.752"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${ipList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:33.753" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:33.753" endtime="20210602 14:11:33.753"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${ipList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:33.754" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u535...</msg> +<status status="PASS" starttime="20210602 14:11:33.754" endtime="20210602 14:11:33.754"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${objectUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:33.755" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:33.755" endtime="20210602 14:11:33.756"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:33.756" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v1, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:33.756" endtime="20210602 14:11:33.757"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:33.758" level="INFO">POST Request using : uri=/policy/object, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"ip": "255.255.255.254", "port": "65535"}, {"ip": "255.255.255.254", "port": "1"}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]} +json=None</msg> +<msg timestamp="20210602 14:11:34.104" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:33.757" endtime="20210602 14:11:34.104"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:34.105" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:34.105" endtime="20210602 14:11:34.105"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:34.106" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:34.106" endtime="20210602 14:11:34.106"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:34.107" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "objectList" : [ { + "addItemList" : [ { + "addrType" : 4, + "clientIp1" : "255.255.255.254", + "clientIp2" : "32", + "clientIpFormat" : "CIDR", + "clientPort1" : "65535", + "clientPort2" : "65535", + "clientPortFormat" : "range", + "direction" : 0, + "ip" : "255.255.255.254", + "isInitialize" : 0, + "isSession" : "endpoint", + "isValid" : 1, + "itemDesc" : "{ \"ip\":\"255.255.255.254\" ,\"port\":\"65535\"}", + "itemId" : 10074703, + "itemName" : null, + "itemType" : "ip", + "objectId" : 107889, + "opTime" : "2021-06-02 14:11:33", + "opUser" : 425, + "port" : "65535", + "protocol" : 0, + "serverIp1" : "0.0.0.0", + "serverIp2" : "255.255.255.255", + "serverIpFormat" : "mask", + "serverPort1" : "0", + "serverPort2" : "65535", + "serverPortFormat" : "mask" + }, { + "addrType" : 4, + "clientIp1" : "255.255.255.254", + "clientIp2" : "32", + "clientIpFormat" : "CIDR", + "clientPort1" : "1", + "clientPort2" : "1", + "clientPortFormat" : "range", + "direction" : 0, + "ip" : "255.255.255.254", + "isInitialize" : 0, + "isSession" : "endpoint", + "isValid" : 1, + "itemDesc" : "{ \"ip\":\"255.255.255.254\" ,\"port\":\"1\"}", + "itemId" : 10074704, + "itemName" : null, + "itemType" : "ip", + "objectId" : 107889, + "opTime" : "2021-06-02 14:11:33", + "opUser" : 425, + "port" : "1", + "protocol" : 0, + "serverIp1" : "0.0.0.0", + "serverIp2" : "255.255.255.255", + "serverIpFormat" : "mask", + "serverPort1" : "0", + "serverPort2" : "65535", + "serverPortFormat" : "mask" + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107889, + "objectName" : "auttest单ip指定端口", + "objectSubType" : "endpoint", + "objectType" : "ip", + "opTime" : "2021-06-02 14:11:33", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:34.108" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:34.108" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.254', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '65535', 'clientPor...</msg> +<status status="PASS" starttime="20210602 14:11:34.107" endtime="20210602 14:11:34.108"></status> +</kw> +<msg timestamp="20210602 14:11:34.109" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.254', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '65535', 'clientPor...</msg> +<status status="PASS" starttime="20210602 14:11:33.754" endtime="20210602 14:11:34.109"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>getObjectListIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${objectIds}</var> +</assign> +<kw name="getObjectListIds" library="process_object_body"> +<doc>获取结果中的对象ID</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>Call Get-ObjectIds</arg> +</arguments> +<msg timestamp="20210602 14:11:34.111" level="INFO">Call Get-ObjectIds</msg> +<status status="PASS" starttime="20210602 14:11:34.110" endtime="20210602 14:11:34.111"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIds}</var> +</assign> +<msg timestamp="20210602 14:11:34.112" level="INFO">${objectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:34.111" endtime="20210602 14:11:34.112"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${objectIdsTemp}</var> +</assign> +<msg timestamp="20210602 14:11:34.113" level="INFO">${objectIdsTemp} = </msg> +<status status="PASS" starttime="20210602 14:11:34.112" endtime="20210602 14:11:34.113"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${data}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:34.114" endtime="20210602 14:11:34.114"></status> +</kw> +<msg timestamp="20210602 14:11:34.115" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:34.115" level="INFO">${data} = {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.254', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '65535', 'clientPort2': '65535', 'clientPortFormat': 'range...</msg> +<status status="PASS" starttime="20210602 14:11:34.113" endtime="20210602 14:11:34.115"></status> +</kw> +<kw name="Return From Keyword If" library="BuiltIn"> +<doc>Returns from the enclosing user keyword if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"=="FAIL"</arg> +<arg>${objectIdsTemp}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:34.115" endtime="20210602 14:11:34.116"></status> +</kw> +<kw name="${object} IN [ @{value['data']['objectList']} ]" type="for"> +<kw name="${object} = {'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.254', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '65535', 'clientPort2': '65535', 'clientPortFormat': 'range', 'direction': ..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:34.117" endtime="20210602 14:11:34.117"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:34.116" endtime="20210602 14:11:34.117"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:34.116" endtime="20210602 14:11:34.118"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:34.110" endtime="20210602 14:11:34.118"></status> +</kw> +<msg timestamp="20210602 14:11:34.118" level="INFO">${objectIds} = [107889]</msg> +<status status="PASS" starttime="20210602 14:11:34.109" endtime="20210602 14:11:34.118"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:34.119" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:34.119" endtime="20210602 14:11:34.119"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:34.120" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:34.120" endtime="20210602 14:11:34.120"></status> +</kw> +<msg timestamp="20210602 14:11:34.121" level="INFO">${rescode} = 200</msg> +<msg timestamp="20210602 14:11:34.121" level="INFO">${objectIds} = [107889]</msg> +<status status="PASS" starttime="20210602 14:11:33.751" endtime="20210602 14:11:34.121"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:34.122" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:34.121" endtime="20210602 14:11:34.122"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${protocolField}</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${protocolField}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:34.123" endtime="20210602 14:11:34.123"></status> +</kw> +<msg timestamp="20210602 14:11:34.123" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:34.122" endtime="20210602 14:11:34.123"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectsList}</var> +</assign> +<msg timestamp="20210602 14:11:34.124" level="INFO">${objectsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:34.123" endtime="20210602 14:11:34.124"></status> +</kw> +<kw name="${obj} IN [ @{objectIds} ]" type="for"> +<kw name="${obj} = 107889" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:34.125" level="INFO">${objectList} = {'objectId': 107889, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:34.125" endtime="20210602 14:11:34.125"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:34.126" endtime="20210602 14:11:34.126"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:34.124" endtime="20210602 14:11:34.126"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:34.124" endtime="20210602 14:11:34.126"></status> +</kw> +<msg timestamp="20210602 14:11:34.127" level="INFO">${objectIds} = [107889]</msg> +<msg timestamp="20210602 14:11:34.127" level="INFO">${objectList} = {'objectId': 107889, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:33.701" endtime="20210602 14:11:34.127"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>OrangeFilter</arg> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:34.128" endtime="20210602 14:11:34.128"></status> +</kw> +<msg timestamp="20210602 14:11:34.129" level="INFO">${objectList} = {'objectId': 107889, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:34.127" endtime="20210602 14:11:34.129"></status> +</kw> +<msg timestamp="20210602 14:11:34.129" level="INFO">${objectIds} = [107889]</msg> +<msg timestamp="20210602 14:11:34.129" level="INFO">${objectList} = {'objectId': 107889, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:33.698" endtime="20210602 14:11:34.129"></status> +</kw> +<kw name="Get Length" library="BuiltIn"> +<doc>Returns and logs the length of the given item as an integer.</doc> +<arguments> +<arg>${objectIdsList}</arg> +</arguments> +<assign> +<var>${len}</var> +</assign> +<msg timestamp="20210602 14:11:34.130" level="INFO">Length is 7</msg> +<msg timestamp="20210602 14:11:34.130" level="INFO">${len} = 7</msg> +<status status="PASS" starttime="20210602 14:11:34.130" endtime="20210602 14:11:34.130"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${len} != 0</arg> +<arg>AppendListToList</arg> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectIds}</arg> +</arguments> +<assign> +<var>${objectIdsList}</var> +</assign> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:34.141" endtime="20210602 14:11:34.142"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:34.142" endtime="20210602 14:11:34.142"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = 107889" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:34.143" endtime="20210602 14:11:34.143"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:34.143" endtime="20210602 14:11:34.143"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:34.142" endtime="20210602 14:11:34.144"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:34.141" endtime="20210602 14:11:34.144"></status> +</kw> +<msg timestamp="20210602 14:11:34.144" level="INFO">${objectIdsList} = [107882, 107883, 107884, 107885, 107886, 107887, 107888, 107889]</msg> +<status status="PASS" starttime="20210602 14:11:34.131" endtime="20210602 14:11:34.144"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Append To List</arg> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Append To List</arg> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>Append To List</arg> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:34.145" endtime="20210602 14:11:34.146"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:34.144" endtime="20210602 14:11:34.146"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:33.697" endtime="20210602 14:11:34.146"></status> +</kw> +<kw name="${key} = {'protocolField': 'TSG_SECURITY_DESTINATION_LOCATION', 'objectSubType': 'geo_location', 'objList': [{'addItemList': [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}]}]}" type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${key}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:34.147" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_LOCATION</msg> +<status status="PASS" starttime="20210602 14:11:34.146" endtime="20210602 14:11:34.147"></status> +</kw> +<kw name="CreateObjectList" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${key}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:34.148" endtime="20210602 14:11:34.148"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:34.149" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_LOCATION</msg> +<status status="PASS" starttime="20210602 14:11:34.149" endtime="20210602 14:11:34.149"></status> +</kw> +<kw name="CreateObjects" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:34.150" endtime="20210602 14:11:34.151"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:34.151" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_LOCATION</msg> +<status status="PASS" starttime="20210602 14:11:34.151" endtime="20210602 14:11:34.151"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objList</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:34.152" level="INFO">${objList} = [{'addItemList': [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}]}]</msg> +<status status="PASS" starttime="20210602 14:11:34.152" endtime="20210602 14:11:34.152"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${objJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:34.152" endtime="20210602 14:11:34.153"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objModeJson}</arg> +</arguments> +<assign> +<var>${objJson}</var> +</assign> +<msg timestamp="20210602 14:11:34.153" level="INFO">${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:34.153" endtime="20210602 14:11:34.153"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objListMode}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:34.154" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:34.154" endtime="20210602 14:11:34.154"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<msg timestamp="20210602 14:11:34.155" level="FAIL">Dictionary does not contain key 'objectType'.</msg> +<status status="FAIL" starttime="20210602 14:11:34.155" endtime="20210602 14:11:34.156"></status> +</kw> +<msg timestamp="20210602 14:11:34.156" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:34.156" level="INFO">${objectType} = Dictionary does not contain key 'objectType'.</msg> +<status status="PASS" starttime="20210602 14:11:34.155" endtime="20210602 14:11:34.156"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:34.157" endtime="20210602 14:11:34.157"></status> +</kw> +<msg timestamp="20210602 14:11:34.157" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:34.156" endtime="20210602 14:11:34.157"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectSubType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:34.158" endtime="20210602 14:11:34.158"></status> +</kw> +<msg timestamp="20210602 14:11:34.159" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:34.159" level="INFO">${objectSubType} = geo_location</msg> +<status status="PASS" starttime="20210602 14:11:34.158" endtime="20210602 14:11:34.159"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:34.160" endtime="20210602 14:11:34.160"></status> +</kw> +<msg timestamp="20210602 14:11:34.160" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test"...</msg> +<status status="PASS" starttime="20210602 14:11:34.159" endtime="20210602 14:11:34.161"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<msg timestamp="20210602 14:11:34.162" level="FAIL">Dictionary does not contain key 'objectId'.</msg> +<status status="FAIL" starttime="20210602 14:11:34.161" endtime="20210602 14:11:34.162"></status> +</kw> +<msg timestamp="20210602 14:11:34.162" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:34.162" level="INFO">${objectId} = Dictionary does not contain key 'objectId'.</msg> +<status status="PASS" starttime="20210602 14:11:34.161" endtime="20210602 14:11:34.163"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectId": null</arg> +<arg>"objectId":${objectId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:34.164" endtime="20210602 14:11:34.165"></status> +</kw> +<msg timestamp="20210602 14:11:34.165" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test"...</msg> +<status status="PASS" starttime="20210602 14:11:34.163" endtime="20210602 14:11:34.165"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"option": "update"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:34.166" endtime="20210602 14:11:34.166"></status> +</kw> +<msg timestamp="20210602 14:11:34.166" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test"...</msg> +<status status="PASS" starttime="20210602 14:11:34.165" endtime="20210602 14:11:34.166"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectJsonList}</var> +</assign> +<msg timestamp="20210602 14:11:34.167" level="INFO">${objectJsonList} = []</msg> +<status status="PASS" starttime="20210602 14:11:34.167" endtime="20210602 14:11:34.167"></status> +</kw> +<kw name="Evaluate" library="BuiltIn"> +<doc>Evaluates the given expression in Python and returns the results.</doc> +<arguments> +<arg>type(${objList})</arg> +</arguments> +<assign> +<var>${objListType}</var> +</assign> +<msg timestamp="20210602 14:11:34.168" level="INFO">${objListType} = <class 'list'></msg> +<status status="PASS" starttime="20210602 14:11:34.167" endtime="20210602 14:11:34.168"></status> +</kw> +<kw name="${obj} IN [ @{objList} ]" type="for"> +<kw name="${obj} = {'addItemList': [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:34.169" endtime="20210602 14:11:34.169"></status> +</kw> +<msg timestamp="20210602 14:11:34.170" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:34.170" level="INFO">${addItemList} = [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}]</msg> +<status status="PASS" starttime="20210602 14:11:34.169" endtime="20210602 14:11:34.170"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:34.171" level="INFO">${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}]</msg> +<status status="PASS" starttime="20210602 14:11:34.170" endtime="20210602 14:11:34.171"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:34.172" endtime="20210602 14:11:34.172"></status> +</kw> +<msg timestamp="20210602 14:11:34.172" level="INFO">${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}]</msg> +<status status="PASS" starttime="20210602 14:11:34.171" endtime="20210602 14:11:34.172"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:34.173" endtime="20210602 14:11:34.173"></status> +</kw> +<msg timestamp="20210602 14:11:34.174" level="INFO">${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}]</msg> +<status status="PASS" starttime="20210602 14:11:34.173" endtime="20210602 14:11:34.174"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:34.175" endtime="20210602 14:11:34.175"></status> +</kw> +<msg timestamp="20210602 14:11:34.175" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test"...</msg> +<status status="PASS" starttime="20210602 14:11:34.174" endtime="20210602 14:11:34.175"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:34.176" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test"...</msg> +<status status="PASS" starttime="20210602 14:11:34.176" endtime="20210602 14:11:34.176"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:34.177" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'geo_location', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'a...</msg> +<status status="PASS" starttime="20210602 14:11:34.176" endtime="20210602 14:11:34.177"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:34.188" endtime="20210602 14:11:34.188"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:34.188" endtime="20210602 14:11:34.189"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'ip', 'objectSubType': 'geo_location', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'ad..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:34.189" endtime="20210602 14:11:34.190"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:34.189" endtime="20210602 14:11:34.190"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:34.189" endtime="20210602 14:11:34.190"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:34.187" endtime="20210602 14:11:34.190"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:34.168" endtime="20210602 14:11:34.191"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:34.168" endtime="20210602 14:11:34.191"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>opAction=add</arg> +<arg>returnData=1</arg> +<arg>objectList=${objectJsonList}</arg> +</arguments> +<assign> +<var>${objectData}</var> +</assign> +<msg timestamp="20210602 14:11:34.192" level="INFO">${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'geo_location', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单...</msg> +<status status="PASS" starttime="20210602 14:11:34.191" endtime="20210602 14:11:34.192"></status> +</kw> +<kw name="createObject" library="object"> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${rescode}</var> +<var>${objectIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${ipList}对象dict</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:34.193" endtime="20210602 14:11:34.193"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建IP</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:34.193" endtime="20210602 14:11:34.193"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${ipList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:34.194" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:34.194" endtime="20210602 14:11:34.194"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${ipList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:34.195" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\...</msg> +<status status="PASS" starttime="20210602 14:11:34.194" endtime="20210602 14:11:34.195"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${objectUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:34.196" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:34.196" endtime="20210602 14:11:34.196"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:34.197" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v1, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:34.197" endtime="20210602 14:11:34.197"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:34.198" level="INFO">POST Request using : uri=/policy/object, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]} +json=None</msg> +<msg timestamp="20210602 14:11:35.073" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:34.198" endtime="20210602 14:11:35.074"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:35.077" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:35.075" endtime="20210602 14:11:35.078"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:35.081" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:35.079" endtime="20210602 14:11:35.082"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:35.085" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "objectList" : [ { + "addItemList" : [ { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:33", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "Algeria." ], + "itemId" : 10074705, + "objectId" : 107890 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:33", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "China.Duyun." ], + "itemId" : 10074706, + "objectId" : 107890 + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107890, + "objectName" : "auttest单ip指定端口", + "objectSubType" : "geo_location", + "objectType" : "ip", + "opTime" : "2021-06-02 14:11:33", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:35.085" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:35.086" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:33', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:35.083" endtime="20210602 14:11:35.087"></status> +</kw> +<msg timestamp="20210602 14:11:35.088" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:33', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:34.195" endtime="20210602 14:11:35.088"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>getObjectListIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${objectIds}</var> +</assign> +<kw name="getObjectListIds" library="process_object_body"> +<doc>获取结果中的对象ID</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>Call Get-ObjectIds</arg> +</arguments> +<msg timestamp="20210602 14:11:35.092" level="INFO">Call Get-ObjectIds</msg> +<status status="PASS" starttime="20210602 14:11:35.092" endtime="20210602 14:11:35.093"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIds}</var> +</assign> +<msg timestamp="20210602 14:11:35.094" level="INFO">${objectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:35.093" endtime="20210602 14:11:35.094"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${objectIdsTemp}</var> +</assign> +<msg timestamp="20210602 14:11:35.096" level="INFO">${objectIdsTemp} = </msg> +<status status="PASS" starttime="20210602 14:11:35.095" endtime="20210602 14:11:35.096"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${data}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:35.097" endtime="20210602 14:11:35.098"></status> +</kw> +<msg timestamp="20210602 14:11:35.098" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:35.098" level="INFO">${data} = {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:33', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['A...</msg> +<status status="PASS" starttime="20210602 14:11:35.097" endtime="20210602 14:11:35.099"></status> +</kw> +<kw name="Return From Keyword If" library="BuiltIn"> +<doc>Returns from the enclosing user keyword if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"=="FAIL"</arg> +<arg>${objectIdsTemp}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:35.099" endtime="20210602 14:11:35.100"></status> +</kw> +<kw name="${object} IN [ @{value['data']['objectList']} ]" type="for"> +<kw name="${object} = {'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:33', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['Algeria.'], 'item..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:35.101" endtime="20210602 14:11:35.102"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:35.101" endtime="20210602 14:11:35.102"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:35.100" endtime="20210602 14:11:35.102"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:35.090" endtime="20210602 14:11:35.103"></status> +</kw> +<msg timestamp="20210602 14:11:35.103" level="INFO">${objectIds} = [107890]</msg> +<status status="PASS" starttime="20210602 14:11:35.089" endtime="20210602 14:11:35.103"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:35.104" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:35.104" endtime="20210602 14:11:35.104"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:35.105" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:35.105" endtime="20210602 14:11:35.106"></status> +</kw> +<msg timestamp="20210602 14:11:35.106" level="INFO">${rescode} = 200</msg> +<msg timestamp="20210602 14:11:35.106" level="INFO">${objectIds} = [107890]</msg> +<status status="PASS" starttime="20210602 14:11:34.192" endtime="20210602 14:11:35.107"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:35.107" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:35.107" endtime="20210602 14:11:35.108"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${protocolField}</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${protocolField}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:35.109" endtime="20210602 14:11:35.109"></status> +</kw> +<msg timestamp="20210602 14:11:35.109" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_LOCATION</msg> +<status status="PASS" starttime="20210602 14:11:35.108" endtime="20210602 14:11:35.109"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectsList}</var> +</assign> +<msg timestamp="20210602 14:11:35.110" level="INFO">${objectsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:35.110" endtime="20210602 14:11:35.110"></status> +</kw> +<kw name="${obj} IN [ @{objectIds} ]" type="for"> +<kw name="${obj} = 107890" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:35.112" level="INFO">${objectList} = {'objectId': 107890, 'protocolField': 'TSG_SECURITY_DESTINATION_LOCATION'}</msg> +<status status="PASS" starttime="20210602 14:11:35.111" endtime="20210602 14:11:35.112"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:35.112" endtime="20210602 14:11:35.113"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:35.111" endtime="20210602 14:11:35.113"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:35.111" endtime="20210602 14:11:35.113"></status> +</kw> +<msg timestamp="20210602 14:11:35.113" level="INFO">${objectIds} = [107890]</msg> +<msg timestamp="20210602 14:11:35.114" level="INFO">${objectList} = {'objectId': 107890, 'protocolField': 'TSG_SECURITY_DESTINATION_LOCATION'}</msg> +<status status="PASS" starttime="20210602 14:11:34.150" endtime="20210602 14:11:35.114"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>OrangeFilter</arg> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:35.115" endtime="20210602 14:11:35.115"></status> +</kw> +<msg timestamp="20210602 14:11:35.116" level="INFO">${objectList} = {'objectId': 107890, 'protocolField': 'TSG_SECURITY_DESTINATION_LOCATION'}</msg> +<status status="PASS" starttime="20210602 14:11:35.114" endtime="20210602 14:11:35.116"></status> +</kw> +<msg timestamp="20210602 14:11:35.116" level="INFO">${objectIds} = [107890]</msg> +<msg timestamp="20210602 14:11:35.116" level="INFO">${objectList} = {'objectId': 107890, 'protocolField': 'TSG_SECURITY_DESTINATION_LOCATION'}</msg> +<status status="PASS" starttime="20210602 14:11:34.147" endtime="20210602 14:11:35.116"></status> +</kw> +<kw name="Get Length" library="BuiltIn"> +<doc>Returns and logs the length of the given item as an integer.</doc> +<arguments> +<arg>${objectIdsList}</arg> +</arguments> +<assign> +<var>${len}</var> +</assign> +<msg timestamp="20210602 14:11:35.117" level="INFO">Length is 8</msg> +<msg timestamp="20210602 14:11:35.117" level="INFO">${len} = 8</msg> +<status status="PASS" starttime="20210602 14:11:35.117" endtime="20210602 14:11:35.118"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${len} != 0</arg> +<arg>AppendListToList</arg> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectIds}</arg> +</arguments> +<assign> +<var>${objectIdsList}</var> +</assign> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:35.135" endtime="20210602 14:11:35.135"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:35.135" endtime="20210602 14:11:35.136"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = 107890" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:35.136" endtime="20210602 14:11:35.137"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:35.136" endtime="20210602 14:11:35.137"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:35.136" endtime="20210602 14:11:35.137"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:35.134" endtime="20210602 14:11:35.137"></status> +</kw> +<msg timestamp="20210602 14:11:35.138" level="INFO">${objectIdsList} = [107882, 107883, 107884, 107885, 107886, 107887, 107888, 107889, 107890]</msg> +<status status="PASS" starttime="20210602 14:11:35.118" endtime="20210602 14:11:35.138"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Append To List</arg> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Append To List</arg> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>Append To List</arg> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:35.139" endtime="20210602 14:11:35.139"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:35.138" endtime="20210602 14:11:35.139"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:34.146" endtime="20210602 14:11:35.140"></status> +</kw> +<kw name="${key} = {'protocolField': 'TSG_SECURITY_DESTINATION_ADDR', 'objectSubType': 'ip_learning', 'objList': [{'addItemList': [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'learningDepth'..." type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${key}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:35.140" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:35.140" endtime="20210602 14:11:35.141"></status> +</kw> +<kw name="CreateObjectList" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${key}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:35.141" endtime="20210602 14:11:35.142"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:35.142" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:35.142" endtime="20210602 14:11:35.142"></status> +</kw> +<kw name="CreateObjects" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:35.143" endtime="20210602 14:11:35.143"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:35.144" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:35.144" endtime="20210602 14:11:35.144"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objList</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:35.145" level="INFO">${objList} = [{'addItemList': [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'learningDepth': '2', 'agingTime': '12', 'voteClientNum': '10', 'learnedIpLimit': '1000'}]}]</msg> +<status status="PASS" starttime="20210602 14:11:35.144" endtime="20210602 14:11:35.145"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${objJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:35.145" endtime="20210602 14:11:35.145"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objModeJson}</arg> +</arguments> +<assign> +<var>${objJson}</var> +</assign> +<msg timestamp="20210602 14:11:35.146" level="INFO">${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:35.146" endtime="20210602 14:11:35.146"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objListMode}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:35.147" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:35.146" endtime="20210602 14:11:35.147"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<msg timestamp="20210602 14:11:35.148" level="FAIL">Dictionary does not contain key 'objectType'.</msg> +<status status="FAIL" starttime="20210602 14:11:35.148" endtime="20210602 14:11:35.148"></status> +</kw> +<msg timestamp="20210602 14:11:35.148" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:35.148" level="INFO">${objectType} = Dictionary does not contain key 'objectType'.</msg> +<status status="PASS" starttime="20210602 14:11:35.147" endtime="20210602 14:11:35.149"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:35.150" endtime="20210602 14:11:35.150"></status> +</kw> +<msg timestamp="20210602 14:11:35.151" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:35.149" endtime="20210602 14:11:35.151"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectSubType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:35.151" endtime="20210602 14:11:35.152"></status> +</kw> +<msg timestamp="20210602 14:11:35.152" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:35.152" level="INFO">${objectSubType} = ip_learning</msg> +<status status="PASS" starttime="20210602 14:11:35.151" endtime="20210602 14:11:35.152"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:35.153" endtime="20210602 14:11:35.154"></status> +</kw> +<msg timestamp="20210602 14:11:35.154" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...</msg> +<status status="PASS" starttime="20210602 14:11:35.153" endtime="20210602 14:11:35.154"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<msg timestamp="20210602 14:11:35.155" level="FAIL">Dictionary does not contain key 'objectId'.</msg> +<status status="FAIL" starttime="20210602 14:11:35.155" endtime="20210602 14:11:35.156"></status> +</kw> +<msg timestamp="20210602 14:11:35.156" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:35.156" level="INFO">${objectId} = Dictionary does not contain key 'objectId'.</msg> +<status status="PASS" starttime="20210602 14:11:35.154" endtime="20210602 14:11:35.156"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectId": null</arg> +<arg>"objectId":${objectId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:35.157" endtime="20210602 14:11:35.157"></status> +</kw> +<msg timestamp="20210602 14:11:35.158" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...</msg> +<status status="PASS" starttime="20210602 14:11:35.156" endtime="20210602 14:11:35.158"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"option": "update"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:35.159" endtime="20210602 14:11:35.159"></status> +</kw> +<msg timestamp="20210602 14:11:35.159" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...</msg> +<status status="PASS" starttime="20210602 14:11:35.158" endtime="20210602 14:11:35.159"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectJsonList}</var> +</assign> +<msg timestamp="20210602 14:11:35.160" level="INFO">${objectJsonList} = []</msg> +<status status="PASS" starttime="20210602 14:11:35.160" endtime="20210602 14:11:35.160"></status> +</kw> +<kw name="Evaluate" library="BuiltIn"> +<doc>Evaluates the given expression in Python and returns the results.</doc> +<arguments> +<arg>type(${objList})</arg> +</arguments> +<assign> +<var>${objListType}</var> +</assign> +<msg timestamp="20210602 14:11:35.161" level="INFO">${objListType} = <class 'list'></msg> +<status status="PASS" starttime="20210602 14:11:35.161" endtime="20210602 14:11:35.161"></status> +</kw> +<kw name="${obj} IN [ @{objList} ]" type="for"> +<kw name="${obj} = {'addItemList': [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'learningDepth': '2', 'agingTime': '12', 'voteClientNum': '10', 'learnedIpLimit': '1000'}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:35.163" endtime="20210602 14:11:35.163"></status> +</kw> +<msg timestamp="20210602 14:11:35.163" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:35.163" level="INFO">${addItemList} = [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'learningDepth': '2', 'agingTime': '12', 'voteClientNum': '10', 'learnedIpLimit': '1000'}]</msg> +<status status="PASS" starttime="20210602 14:11:35.162" endtime="20210602 14:11:35.164"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:35.165" level="INFO">${addItemList} = [{"fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"}]</msg> +<status status="PASS" starttime="20210602 14:11:35.164" endtime="20210602 14:11:35.165"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:35.166" endtime="20210602 14:11:35.166"></status> +</kw> +<msg timestamp="20210602 14:11:35.167" level="INFO">${addItemList} = "fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"}]</msg> +<status status="PASS" starttime="20210602 14:11:35.165" endtime="20210602 14:11:35.167"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:35.168" endtime="20210602 14:11:35.168"></status> +</kw> +<msg timestamp="20210602 14:11:35.169" level="INFO">${addItemList} = "fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"</msg> +<status status="PASS" starttime="20210602 14:11:35.167" endtime="20210602 14:11:35.169"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:35.171" endtime="20210602 14:11:35.171"></status> +</kw> +<msg timestamp="20210602 14:11:35.171" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...</msg> +<status status="PASS" starttime="20210602 14:11:35.170" endtime="20210602 14:11:35.172"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:35.172" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...</msg> +<status status="PASS" starttime="20210602 14:11:35.172" endtime="20210602 14:11:35.173"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:35.173" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'ip_learning', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'ad...</msg> +<status status="PASS" starttime="20210602 14:11:35.173" endtime="20210602 14:11:35.174"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:35.184" endtime="20210602 14:11:35.185"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:35.185" endtime="20210602 14:11:35.185"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'ip', 'objectSubType': 'ip_learning', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'add..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:35.186" endtime="20210602 14:11:35.186"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:35.186" endtime="20210602 14:11:35.186"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:35.185" endtime="20210602 14:11:35.187"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:35.184" endtime="20210602 14:11:35.187"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:35.162" endtime="20210602 14:11:35.187"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:35.162" endtime="20210602 14:11:35.187"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>opAction=add</arg> +<arg>returnData=1</arg> +<arg>objectList=${objectJsonList}</arg> +</arguments> +<assign> +<var>${objectData}</var> +</assign> +<msg timestamp="20210602 14:11:35.188" level="INFO">${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'ip_learning', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单i...</msg> +<status status="PASS" starttime="20210602 14:11:35.188" endtime="20210602 14:11:35.189"></status> +</kw> +<kw name="createObject" library="object"> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${rescode}</var> +<var>${objectIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${ipList}对象dict</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:35.189" endtime="20210602 14:11:35.190"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建IP</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:35.190" endtime="20210602 14:11:35.190"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${ipList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:35.191" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:35.191" endtime="20210602 14:11:35.191"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${ipList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:35.192" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u...</msg> +<status status="PASS" starttime="20210602 14:11:35.191" endtime="20210602 14:11:35.192"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${objectUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:35.193" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:35.193" endtime="20210602 14:11:35.193"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:35.194" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v1, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:35.194" endtime="20210602 14:11:35.195"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:35.195" level="INFO">POST Request using : uri=/policy/object, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [], "fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000", "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]} +json=None</msg> +<msg timestamp="20210602 14:11:36.822" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:35.195" endtime="20210602 14:11:36.823"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:36.826" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:36.825" endtime="20210602 14:11:36.827"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:36.830" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:36.828" endtime="20210602 14:11:36.831"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:36.834" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "objectList" : [ { + "addItemList" : [ ], + "agingTime" : 12, + "deleteItemIds" : [ ], + "fromFqdns" : [ "$www.baidu.com", "*jd.com" ], + "fromProtocol" : "HTTP,SSL", + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "learnedIpLimit" : 1000, + "learningDepth" : "2", + "memberType" : 3, + "objectDesc" : "test", + "objectId" : 107891, + "objectName" : "auttest单ip指定端口", + "objectSubType" : "ip_learning", + "objectType" : "ip", + "opTime" : "2021-06-02 14:11:34", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ], + "voteClientNum" : 10 + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:36.834" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:36.835" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '...</msg> +<status status="PASS" starttime="20210602 14:11:36.832" endtime="20210602 14:11:36.835"></status> +</kw> +<msg timestamp="20210602 14:11:36.836" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '...</msg> +<status status="PASS" starttime="20210602 14:11:35.192" endtime="20210602 14:11:36.837"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>getObjectListIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${objectIds}</var> +</assign> +<kw name="getObjectListIds" library="process_object_body"> +<doc>获取结果中的对象ID</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>Call Get-ObjectIds</arg> +</arguments> +<msg timestamp="20210602 14:11:36.840" level="INFO">Call Get-ObjectIds</msg> +<status status="PASS" starttime="20210602 14:11:36.840" endtime="20210602 14:11:36.841"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIds}</var> +</assign> +<msg timestamp="20210602 14:11:36.842" level="INFO">${objectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:36.841" endtime="20210602 14:11:36.842"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${objectIdsTemp}</var> +</assign> +<msg timestamp="20210602 14:11:36.844" level="INFO">${objectIdsTemp} = </msg> +<status status="PASS" starttime="20210602 14:11:36.843" endtime="20210602 14:11:36.844"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${data}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.845" endtime="20210602 14:11:36.846"></status> +</kw> +<msg timestamp="20210602 14:11:36.846" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:36.846" level="INFO">${data} = {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '#31739C', 'isDisplay': None, 'isExclusio...</msg> +<status status="PASS" starttime="20210602 14:11:36.844" endtime="20210602 14:11:36.847"></status> +</kw> +<kw name="Return From Keyword If" library="BuiltIn"> +<doc>Returns from the enclosing user keyword if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"=="FAIL"</arg> +<arg>${objectIdsTemp}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.847" endtime="20210602 14:11:36.848"></status> +</kw> +<kw name="${object} IN [ @{value['data']['objectList']} ]" type="for"> +<kw name="${object} = {'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '#31739C', 'isDisplay': None, 'isExclusion': 0, 'isInitia..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.849" endtime="20210602 14:11:36.850"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:36.849" endtime="20210602 14:11:36.850"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:36.848" endtime="20210602 14:11:36.851"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:36.839" endtime="20210602 14:11:36.851"></status> +</kw> +<msg timestamp="20210602 14:11:36.851" level="INFO">${objectIds} = [107891]</msg> +<status status="PASS" starttime="20210602 14:11:36.837" endtime="20210602 14:11:36.851"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:36.853" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:36.852" endtime="20210602 14:11:36.853"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:36.854" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:36.854" endtime="20210602 14:11:36.854"></status> +</kw> +<msg timestamp="20210602 14:11:36.855" level="INFO">${rescode} = 200</msg> +<msg timestamp="20210602 14:11:36.855" level="INFO">${objectIds} = [107891]</msg> +<status status="PASS" starttime="20210602 14:11:35.189" endtime="20210602 14:11:36.855"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:36.856" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:36.856" endtime="20210602 14:11:36.856"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${protocolField}</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${protocolField}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.857" endtime="20210602 14:11:36.858"></status> +</kw> +<msg timestamp="20210602 14:11:36.858" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:36.857" endtime="20210602 14:11:36.858"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectsList}</var> +</assign> +<msg timestamp="20210602 14:11:36.859" level="INFO">${objectsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:36.858" endtime="20210602 14:11:36.859"></status> +</kw> +<kw name="${obj} IN [ @{objectIds} ]" type="for"> +<kw name="${obj} = 107891" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:36.861" level="INFO">${objectList} = {'objectId': 107891, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:36.860" endtime="20210602 14:11:36.861"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.861" endtime="20210602 14:11:36.861"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:36.859" endtime="20210602 14:11:36.862"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:36.859" endtime="20210602 14:11:36.862"></status> +</kw> +<msg timestamp="20210602 14:11:36.862" level="INFO">${objectIds} = [107891]</msg> +<msg timestamp="20210602 14:11:36.862" level="INFO">${objectList} = {'objectId': 107891, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:35.143" endtime="20210602 14:11:36.862"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>OrangeFilter</arg> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.864" endtime="20210602 14:11:36.864"></status> +</kw> +<msg timestamp="20210602 14:11:36.864" level="INFO">${objectList} = {'objectId': 107891, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:36.863" endtime="20210602 14:11:36.864"></status> +</kw> +<msg timestamp="20210602 14:11:36.865" level="INFO">${objectIds} = [107891]</msg> +<msg timestamp="20210602 14:11:36.865" level="INFO">${objectList} = {'objectId': 107891, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:35.141" endtime="20210602 14:11:36.865"></status> +</kw> +<kw name="Get Length" library="BuiltIn"> +<doc>Returns and logs the length of the given item as an integer.</doc> +<arguments> +<arg>${objectIdsList}</arg> +</arguments> +<assign> +<var>${len}</var> +</assign> +<msg timestamp="20210602 14:11:36.866" level="INFO">Length is 9</msg> +<msg timestamp="20210602 14:11:36.866" level="INFO">${len} = 9</msg> +<status status="PASS" starttime="20210602 14:11:36.865" endtime="20210602 14:11:36.866"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${len} != 0</arg> +<arg>AppendListToList</arg> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectIds}</arg> +</arguments> +<assign> +<var>${objectIdsList}</var> +</assign> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.879" endtime="20210602 14:11:36.879"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.879" endtime="20210602 14:11:36.880"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = 107891" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.880" endtime="20210602 14:11:36.881"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:36.880" endtime="20210602 14:11:36.881"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:36.880" endtime="20210602 14:11:36.881"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:36.878" endtime="20210602 14:11:36.881"></status> +</kw> +<msg timestamp="20210602 14:11:36.882" level="INFO">${objectIdsList} = [107882, 107883, 107884, 107885, 107886, 107887, 107888, 107889, 107890, 107891]</msg> +<status status="PASS" starttime="20210602 14:11:36.866" endtime="20210602 14:11:36.882"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Append To List</arg> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Append To List</arg> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>Append To List</arg> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.883" endtime="20210602 14:11:36.883"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:36.882" endtime="20210602 14:11:36.883"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:35.140" endtime="20210602 14:11:36.883"></status> +</kw> +<kw name="${key} = {'protocolField': 'TSG_FIELD_HTTP_URL', 'objectType': 'url', 'objectSubType': '', 'objList': [{'addItemList': [{'keywordArray': ['$cloud.tencent.com/developer/ask/202829']}, {'keywordArray': ['*tencen..." type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${key}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:36.884" level="INFO">${protocolField} = TSG_FIELD_HTTP_URL</msg> +<status status="PASS" starttime="20210602 14:11:36.884" endtime="20210602 14:11:36.885"></status> +</kw> +<kw name="CreateObjectList" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${key}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.885" endtime="20210602 14:11:36.886"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:36.886" level="INFO">${protocolField} = TSG_FIELD_HTTP_URL</msg> +<status status="PASS" starttime="20210602 14:11:36.886" endtime="20210602 14:11:36.886"></status> +</kw> +<kw name="CreateObjects" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.887" endtime="20210602 14:11:36.887"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:36.888" level="INFO">${protocolField} = TSG_FIELD_HTTP_URL</msg> +<status status="PASS" starttime="20210602 14:11:36.888" endtime="20210602 14:11:36.888"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objList</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:36.889" level="INFO">${objList} = [{'addItemList': [{'keywordArray': ['$cloud.tencent.com/developer/ask/202829']}, {'keywordArray': ['*tencent.com/developer/ask/202829']}, {'keywordArray': ['tencent.com']}, {'keywordArray': ['cloud.te...</msg> +<status status="PASS" starttime="20210602 14:11:36.889" endtime="20210602 14:11:36.889"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${objJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.889" endtime="20210602 14:11:36.890"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objModeJson}</arg> +</arguments> +<assign> +<var>${objJson}</var> +</assign> +<msg timestamp="20210602 14:11:36.890" level="INFO">${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:36.890" endtime="20210602 14:11:36.891"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objListMode}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:36.891" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:36.891" endtime="20210602 14:11:36.891"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.892" endtime="20210602 14:11:36.892"></status> +</kw> +<msg timestamp="20210602 14:11:36.893" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:36.893" level="INFO">${objectType} = url</msg> +<status status="PASS" starttime="20210602 14:11:36.892" endtime="20210602 14:11:36.893"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.894" endtime="20210602 14:11:36.894"></status> +</kw> +<msg timestamp="20210602 14:11:36.894" level="INFO">${objectJson} = [{"objectId": null, "objectType":"url", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:36.893" endtime="20210602 14:11:36.895"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectSubType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.895" endtime="20210602 14:11:36.896"></status> +</kw> +<msg timestamp="20210602 14:11:36.896" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:36.896" level="INFO">${objectSubType} = </msg> +<status status="PASS" starttime="20210602 14:11:36.895" endtime="20210602 14:11:36.896"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.897" endtime="20210602 14:11:36.898"></status> +</kw> +<msg timestamp="20210602 14:11:36.898" level="INFO">${objectJson} = [{"objectId": null, "objectType":"url", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...</msg> +<status status="PASS" starttime="20210602 14:11:36.896" endtime="20210602 14:11:36.898"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<msg timestamp="20210602 14:11:36.899" level="FAIL">Dictionary does not contain key 'objectId'.</msg> +<status status="FAIL" starttime="20210602 14:11:36.899" endtime="20210602 14:11:36.900"></status> +</kw> +<msg timestamp="20210602 14:11:36.900" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:36.900" level="INFO">${objectId} = Dictionary does not contain key 'objectId'.</msg> +<status status="PASS" starttime="20210602 14:11:36.899" endtime="20210602 14:11:36.900"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectId": null</arg> +<arg>"objectId":${objectId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.901" endtime="20210602 14:11:36.901"></status> +</kw> +<msg timestamp="20210602 14:11:36.901" level="INFO">${objectJson} = [{"objectId": null, "objectType":"url", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...</msg> +<status status="PASS" starttime="20210602 14:11:36.900" endtime="20210602 14:11:36.902"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"option": "update"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.902" endtime="20210602 14:11:36.903"></status> +</kw> +<msg timestamp="20210602 14:11:36.903" level="INFO">${objectJson} = [{"objectId": null, "objectType":"url", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...</msg> +<status status="PASS" starttime="20210602 14:11:36.902" endtime="20210602 14:11:36.903"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectJsonList}</var> +</assign> +<msg timestamp="20210602 14:11:36.904" level="INFO">${objectJsonList} = []</msg> +<status status="PASS" starttime="20210602 14:11:36.903" endtime="20210602 14:11:36.904"></status> +</kw> +<kw name="Evaluate" library="BuiltIn"> +<doc>Evaluates the given expression in Python and returns the results.</doc> +<arguments> +<arg>type(${objList})</arg> +</arguments> +<assign> +<var>${objListType}</var> +</assign> +<msg timestamp="20210602 14:11:36.905" level="INFO">${objListType} = <class 'list'></msg> +<status status="PASS" starttime="20210602 14:11:36.904" endtime="20210602 14:11:36.905"></status> +</kw> +<kw name="${obj} IN [ @{objList} ]" type="for"> +<kw name="${obj} = {'addItemList': [{'keywordArray': ['$cloud.tencent.com/developer/ask/202829']}, {'keywordArray': ['*tencent.com/developer/ask/202829']}, {'keywordArray': ['tencent.com']}, {'keywordArray': ['cloud.ten..." type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.906" endtime="20210602 14:11:36.906"></status> +</kw> +<msg timestamp="20210602 14:11:36.907" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:36.907" level="INFO">${addItemList} = [{'keywordArray': ['$cloud.tencent.com/developer/ask/202829']}, {'keywordArray': ['*tencent.com/developer/ask/202829']}, {'keywordArray': ['tencent.com']}, {'keywordArray': ['cloud.tencent.com/develop...</msg> +<status status="PASS" starttime="20210602 14:11:36.906" endtime="20210602 14:11:36.907"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:36.908" level="INFO">${addItemList} = [{"keywordArray": ["$cloud.tencent.com/developer/ask/202829"]}, {"keywordArray": ["*tencent.com/developer/ask/202829"]}, {"keywordArray": ["tencent.com"]}, {"keywordArray": ["cloud.tencent.com/develop...</msg> +<status status="PASS" starttime="20210602 14:11:36.907" endtime="20210602 14:11:36.908"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.908" endtime="20210602 14:11:36.909"></status> +</kw> +<msg timestamp="20210602 14:11:36.909" level="INFO">${addItemList} = [{"keywordArray": ["$cloud.tencent.com/developer/ask/202829"]}, {"keywordArray": ["*tencent.com/developer/ask/202829"]}, {"keywordArray": ["tencent.com"]}, {"keywordArray": ["cloud.tencent.com/develop...</msg> +<status status="PASS" starttime="20210602 14:11:36.908" endtime="20210602 14:11:36.909"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.910" endtime="20210602 14:11:36.910"></status> +</kw> +<msg timestamp="20210602 14:11:36.911" level="INFO">${addItemList} = [{"keywordArray": ["$cloud.tencent.com/developer/ask/202829"]}, {"keywordArray": ["*tencent.com/developer/ask/202829"]}, {"keywordArray": ["tencent.com"]}, {"keywordArray": ["cloud.tencent.com/develop...</msg> +<status status="PASS" starttime="20210602 14:11:36.909" endtime="20210602 14:11:36.911"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.912" endtime="20210602 14:11:36.912"></status> +</kw> +<msg timestamp="20210602 14:11:36.912" level="INFO">${objectJson} = [{"objectId": null, "objectType":"url", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...</msg> +<status status="PASS" starttime="20210602 14:11:36.911" endtime="20210602 14:11:36.912"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:36.914" level="INFO">${objectJson} = [{"objectId": null, "objectType":"url", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...</msg> +<status status="PASS" starttime="20210602 14:11:36.913" endtime="20210602 14:11:36.914"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:36.914" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'url', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addItemList'...</msg> +<status status="PASS" starttime="20210602 14:11:36.914" endtime="20210602 14:11:36.915"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.931" endtime="20210602 14:11:36.931"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.932" endtime="20210602 14:11:36.932"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'url', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addItemList':..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.933" endtime="20210602 14:11:36.933"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:36.932" endtime="20210602 14:11:36.933"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:36.932" endtime="20210602 14:11:36.933"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:36.930" endtime="20210602 14:11:36.934"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:36.905" endtime="20210602 14:11:36.934"></status> +</kw> +<kw name="${obj} = {'addItemList': [{'keywordArray': ['$www.bejson.com/validators/yaml_editor/']}, {'keywordArray': ['*bejson.com/validators/yaml_editor']}, {'keywordArray': ['bejson.com/validators/*']}, {'keywordArray'..." type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.935" endtime="20210602 14:11:36.935"></status> +</kw> +<msg timestamp="20210602 14:11:36.935" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:36.935" level="INFO">${addItemList} = [{'keywordArray': ['$www.bejson.com/validators/yaml_editor/']}, {'keywordArray': ['*bejson.com/validators/yaml_editor']}, {'keywordArray': ['bejson.com/validators/*']}, {'keywordArray': ['bejson.com']...</msg> +<status status="PASS" starttime="20210602 14:11:36.934" endtime="20210602 14:11:36.935"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:36.936" level="INFO">${addItemList} = [{"keywordArray": ["$www.bejson.com/validators/yaml_editor/"]}, {"keywordArray": ["*bejson.com/validators/yaml_editor"]}, {"keywordArray": ["bejson.com/validators/*"]}, {"keywordArray": ["bejson.com"]...</msg> +<status status="PASS" starttime="20210602 14:11:36.936" endtime="20210602 14:11:36.936"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.937" endtime="20210602 14:11:36.937"></status> +</kw> +<msg timestamp="20210602 14:11:36.938" level="INFO">${addItemList} = [{"keywordArray": ["$www.bejson.com/validators/yaml_editor/"]}, {"keywordArray": ["*bejson.com/validators/yaml_editor"]}, {"keywordArray": ["bejson.com/validators/*"]}, {"keywordArray": ["bejson.com"]...</msg> +<status status="PASS" starttime="20210602 14:11:36.937" endtime="20210602 14:11:36.938"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.939" endtime="20210602 14:11:36.939"></status> +</kw> +<msg timestamp="20210602 14:11:36.939" level="INFO">${addItemList} = [{"keywordArray": ["$www.bejson.com/validators/yaml_editor/"]}, {"keywordArray": ["*bejson.com/validators/yaml_editor"]}, {"keywordArray": ["bejson.com/validators/*"]}, {"keywordArray": ["bejson.com"]...</msg> +<status status="PASS" starttime="20210602 14:11:36.938" endtime="20210602 14:11:36.939"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.940" endtime="20210602 14:11:36.940"></status> +</kw> +<msg timestamp="20210602 14:11:36.941" level="INFO">${objectJson} = [{"objectId": null, "objectType":"url", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...</msg> +<status status="PASS" starttime="20210602 14:11:36.939" endtime="20210602 14:11:36.941"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:36.941" level="INFO">${objectJson} = [{"objectId": null, "objectType":"url", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...</msg> +<status status="PASS" starttime="20210602 14:11:36.941" endtime="20210602 14:11:36.942"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:36.942" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'url', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addItemList'...</msg> +<status status="PASS" starttime="20210602 14:11:36.942" endtime="20210602 14:11:36.942"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.957" endtime="20210602 14:11:36.957"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.958" endtime="20210602 14:11:36.958"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'url', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addItemList':..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.959" endtime="20210602 14:11:36.959"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:36.958" endtime="20210602 14:11:36.959"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:36.958" endtime="20210602 14:11:36.960"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:36.956" endtime="20210602 14:11:36.960"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:36.934" endtime="20210602 14:11:36.960"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:36.905" endtime="20210602 14:11:36.960"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>opAction=add</arg> +<arg>returnData=1</arg> +<arg>objectList=${objectJsonList}</arg> +</arguments> +<assign> +<var>${objectData}</var> +</assign> +<msg timestamp="20210602 14:11:36.962" level="INFO">${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'url', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'o...</msg> +<status status="PASS" starttime="20210602 14:11:36.961" endtime="20210602 14:11:36.962"></status> +</kw> +<kw name="createObject" library="object"> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${rescode}</var> +<var>${objectIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${ipList}对象dict</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.963" endtime="20210602 14:11:36.963"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建IP</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:36.964" endtime="20210602 14:11:36.964"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${ipList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:36.965" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:36.964" endtime="20210602 14:11:36.965"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${ipList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:36.966" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "url", "objectSubType": "", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u63...</msg> +<status status="PASS" starttime="20210602 14:11:36.965" endtime="20210602 14:11:36.966"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${objectUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:36.967" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:36.967" endtime="20210602 14:11:36.967"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:36.968" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v1, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:36.968" endtime="20210602 14:11:36.969"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:36.970" level="INFO">POST Request using : uri=/policy/object, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "url", "objectSubType": "", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"keywordArray": ["$cloud.tencent.com/developer/ask/202829"]}, {"keywordArray": ["*tencent.com/developer/ask/202829"]}, {"keywordArray": ["tencent.com"]}, {"keywordArray": ["cloud.tencent.com/developer/*"]}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}, {"objectId": null, "objectType": "url", "objectSubType": "", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"keywordArray": ["$cloud.tencent.com/developer/ask/202829"]}, {"keywordArray": ["*tencent.com/developer/ask/202829"]}, {"keywordArray": ["tencent.com"]}, {"keywordArray": ["cloud.tencent.com/developer/*"]}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]} +json=None</msg> +<msg timestamp="20210602 14:11:37.224" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:36.970" endtime="20210602 14:11:37.225"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:37.228" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:37.226" endtime="20210602 14:11:37.228"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:37.230" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:37.229" endtime="20210602 14:11:37.230"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:37.232" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "objectList" : [ { + "addItemList" : [ { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:36", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "cloud.tencent.com/developer/ask/202829" ], + "itemId" : 10074707, + "objectId" : 107892 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:36", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "tencent.com/developer/ask/202829" ], + "itemId" : 10074708, + "objectId" : 107892 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:36", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "tencent.com" ], + "itemId" : 10074709, + "objectId" : 107892 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:36", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "cloud.tencent.com/developer/" ], + "itemId" : 10074710, + "objectId" : 107892 + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107892, + "objectName" : "auttest单ip指定端口", + "objectType" : "url", + "opTime" : "2021-06-02 14:11:36", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + }, { + "addItemList" : [ { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:36", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "cloud.tencent.com/developer/ask/202829" ], + "itemId" : 10074711, + "objectId" : 107893 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:36", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "tencent.com/developer/ask/202829" ], + "itemId" : 10074712, + "objectId" : 107893 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:36", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "tencent.com" ], + "itemId" : 10074713, + "objectId" : 107893 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:36", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "cloud.tencent.com/developer/" ], + "itemId" : 10074714, + "objectId" : 107893 + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107893, + "objectName" : "auttest单ip指定端口", + "objectType" : "url", + "opTime" : "2021-06-02 14:11:36", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:37.232" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:37.233" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:36', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:37.231" endtime="20210602 14:11:37.233"></status> +</kw> +<msg timestamp="20210602 14:11:37.234" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:36', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:36.966" endtime="20210602 14:11:37.234"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>getObjectListIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${objectIds}</var> +</assign> +<kw name="getObjectListIds" library="process_object_body"> +<doc>获取结果中的对象ID</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>Call Get-ObjectIds</arg> +</arguments> +<msg timestamp="20210602 14:11:37.238" level="INFO">Call Get-ObjectIds</msg> +<status status="PASS" starttime="20210602 14:11:37.238" endtime="20210602 14:11:37.239"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIds}</var> +</assign> +<msg timestamp="20210602 14:11:37.239" level="INFO">${objectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:37.239" endtime="20210602 14:11:37.239"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${objectIdsTemp}</var> +</assign> +<msg timestamp="20210602 14:11:37.241" level="INFO">${objectIdsTemp} = </msg> +<status status="PASS" starttime="20210602 14:11:37.239" endtime="20210602 14:11:37.241"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${data}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.242" endtime="20210602 14:11:37.242"></status> +</kw> +<msg timestamp="20210602 14:11:37.243" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:37.243" level="INFO">${data} = {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:36', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['c...</msg> +<status status="PASS" starttime="20210602 14:11:37.241" endtime="20210602 14:11:37.243"></status> +</kw> +<kw name="Return From Keyword If" library="BuiltIn"> +<doc>Returns from the enclosing user keyword if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"=="FAIL"</arg> +<arg>${objectIdsTemp}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.244" endtime="20210602 14:11:37.244"></status> +</kw> +<kw name="${object} IN [ @{value['data']['objectList']} ]" type="for"> +<kw name="${object} = {'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:36', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['cloud.tencent.com..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.245" endtime="20210602 14:11:37.246"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.245" endtime="20210602 14:11:37.246"></status> +</kw> +<kw name="${object} = {'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:36', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['cloud.tencent.com..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.246" endtime="20210602 14:11:37.246"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.246" endtime="20210602 14:11:37.246"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.244" endtime="20210602 14:11:37.246"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.236" endtime="20210602 14:11:37.247"></status> +</kw> +<msg timestamp="20210602 14:11:37.247" level="INFO">${objectIds} = [107892, 107893]</msg> +<status status="PASS" starttime="20210602 14:11:37.235" endtime="20210602 14:11:37.247"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:37.248" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:37.248" endtime="20210602 14:11:37.248"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:37.249" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:37.248" endtime="20210602 14:11:37.249"></status> +</kw> +<msg timestamp="20210602 14:11:37.249" level="INFO">${rescode} = 200</msg> +<msg timestamp="20210602 14:11:37.250" level="INFO">${objectIds} = [107892, 107893]</msg> +<status status="PASS" starttime="20210602 14:11:36.962" endtime="20210602 14:11:37.250"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:37.250" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:37.250" endtime="20210602 14:11:37.251"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${protocolField}</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${protocolField}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.251" endtime="20210602 14:11:37.252"></status> +</kw> +<msg timestamp="20210602 14:11:37.252" level="INFO">${protocolField} = TSG_FIELD_HTTP_URL</msg> +<status status="PASS" starttime="20210602 14:11:37.251" endtime="20210602 14:11:37.252"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectsList}</var> +</assign> +<msg timestamp="20210602 14:11:37.253" level="INFO">${objectsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:37.252" endtime="20210602 14:11:37.253"></status> +</kw> +<kw name="${obj} IN [ @{objectIds} ]" type="for"> +<kw name="${obj} = 107892" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:37.254" level="INFO">${objectList} = {'objectId': 107892, 'protocolField': 'TSG_FIELD_HTTP_URL'}</msg> +<status status="PASS" starttime="20210602 14:11:37.254" endtime="20210602 14:11:37.254"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.255" endtime="20210602 14:11:37.255"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.253" endtime="20210602 14:11:37.255"></status> +</kw> +<kw name="${obj} = 107893" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:37.256" level="INFO">${objectList} = {'objectId': 107892, 'protocolField': 'TSG_FIELD_HTTP_URL'}</msg> +<status status="PASS" starttime="20210602 14:11:37.256" endtime="20210602 14:11:37.256"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.256" endtime="20210602 14:11:37.257"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.255" endtime="20210602 14:11:37.257"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.253" endtime="20210602 14:11:37.257"></status> +</kw> +<msg timestamp="20210602 14:11:37.258" level="INFO">${objectIds} = [107892, 107893]</msg> +<msg timestamp="20210602 14:11:37.258" level="INFO">${objectList} = {'objectId': 107892, 'protocolField': 'TSG_FIELD_HTTP_URL'}</msg> +<status status="PASS" starttime="20210602 14:11:36.887" endtime="20210602 14:11:37.258"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>OrangeFilter</arg> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<kw name="OrangeFilter" library="object"> +<doc>filer对象处理,把一个filter的list处理为一个filter</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${list}</var> +</assign> +<msg timestamp="20210602 14:11:37.261" level="INFO">${list} = [{'objectId': 107892, 'protocolField': 'TSG_FIELD_HTTP_URL'}]</msg> +<status status="PASS" starttime="20210602 14:11:37.260" endtime="20210602 14:11:37.261"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>filter=${list}</arg> +</arguments> +<assign> +<var>${filter}</var> +</assign> +<msg timestamp="20210602 14:11:37.261" level="INFO">${filter} = {'filter': [{'objectId': 107892, 'protocolField': 'TSG_FIELD_HTTP_URL'}]}</msg> +<status status="PASS" starttime="20210602 14:11:37.261" endtime="20210602 14:11:37.262"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.260" endtime="20210602 14:11:37.262"></status> +</kw> +<msg timestamp="20210602 14:11:37.262" level="INFO">${objectList} = {'filter': [{'objectId': 107892, 'protocolField': 'TSG_FIELD_HTTP_URL'}]}</msg> +<status status="PASS" starttime="20210602 14:11:37.258" endtime="20210602 14:11:37.262"></status> +</kw> +<msg timestamp="20210602 14:11:37.263" level="INFO">${objectIds} = [107892, 107893]</msg> +<msg timestamp="20210602 14:11:37.263" level="INFO">${objectList} = {'filter': [{'objectId': 107892, 'protocolField': 'TSG_FIELD_HTTP_URL'}]}</msg> +<status status="PASS" starttime="20210602 14:11:36.885" endtime="20210602 14:11:37.263"></status> +</kw> +<kw name="Get Length" library="BuiltIn"> +<doc>Returns and logs the length of the given item as an integer.</doc> +<arguments> +<arg>${objectIdsList}</arg> +</arguments> +<assign> +<var>${len}</var> +</assign> +<msg timestamp="20210602 14:11:37.264" level="INFO">Length is 10</msg> +<msg timestamp="20210602 14:11:37.264" level="INFO">${len} = 10</msg> +<status status="PASS" starttime="20210602 14:11:37.263" endtime="20210602 14:11:37.264"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${len} != 0</arg> +<arg>AppendListToList</arg> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectIds}</arg> +</arguments> +<assign> +<var>${objectIdsList}</var> +</assign> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.275" endtime="20210602 14:11:37.276"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.276" endtime="20210602 14:11:37.276"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = 107892" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.277" endtime="20210602 14:11:37.278"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.277" endtime="20210602 14:11:37.278"></status> +</kw> +<kw name="${objdict} = 107893" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.278" endtime="20210602 14:11:37.279"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.278" endtime="20210602 14:11:37.279"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.277" endtime="20210602 14:11:37.279"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.274" endtime="20210602 14:11:37.280"></status> +</kw> +<msg timestamp="20210602 14:11:37.280" level="INFO">${objectIdsList} = [107882, 107883, 107884, 107885, 107886, 107887, 107888, 107889, 107890, 107891, 107892, 107893]</msg> +<status status="PASS" starttime="20210602 14:11:37.264" endtime="20210602 14:11:37.280"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Append To List</arg> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Append To List</arg> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>Append To List</arg> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.281" endtime="20210602 14:11:37.282"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.280" endtime="20210602 14:11:37.282"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:36.884" endtime="20210602 14:11:37.282"></status> +</kw> +<kw name="${key} = {'protocolField': 'TSG_FIELD_HTTP_HOST', 'objectType': 'fqdn', 'objectSubType': '', 'objList': [{'addItemList': [{'keywordArray': ['$blog.csdn.net']}, {'keywordArray': ['*.csdn.net']}]}, {'addItemList..." type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${key}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:37.283" level="INFO">${protocolField} = TSG_FIELD_HTTP_HOST</msg> +<status status="PASS" starttime="20210602 14:11:37.283" endtime="20210602 14:11:37.283"></status> +</kw> +<kw name="CreateObjectList" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${key}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.284" endtime="20210602 14:11:37.284"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:37.285" level="INFO">${protocolField} = TSG_FIELD_HTTP_HOST</msg> +<status status="PASS" starttime="20210602 14:11:37.285" endtime="20210602 14:11:37.285"></status> +</kw> +<kw name="CreateObjects" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.286" endtime="20210602 14:11:37.286"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:37.287" level="INFO">${protocolField} = TSG_FIELD_HTTP_HOST</msg> +<status status="PASS" starttime="20210602 14:11:37.287" endtime="20210602 14:11:37.287"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objList</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:37.288" level="INFO">${objList} = [{'addItemList': [{'keywordArray': ['$blog.csdn.net']}, {'keywordArray': ['*.csdn.net']}]}, {'addItemList': [{'keywordArray': ['$www.json.cn/']}, {'keywordArray': ['*json.cn/']}]}]</msg> +<status status="PASS" starttime="20210602 14:11:37.288" endtime="20210602 14:11:37.288"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${objJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.288" endtime="20210602 14:11:37.289"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objModeJson}</arg> +</arguments> +<assign> +<var>${objJson}</var> +</assign> +<msg timestamp="20210602 14:11:37.289" level="INFO">${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:37.289" endtime="20210602 14:11:37.290"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objListMode}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:37.291" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:37.290" endtime="20210602 14:11:37.291"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.292" endtime="20210602 14:11:37.292"></status> +</kw> +<msg timestamp="20210602 14:11:37.292" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:37.293" level="INFO">${objectType} = fqdn</msg> +<status status="PASS" starttime="20210602 14:11:37.291" endtime="20210602 14:11:37.293"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.293" endtime="20210602 14:11:37.294"></status> +</kw> +<msg timestamp="20210602 14:11:37.294" level="INFO">${objectJson} = [{"objectId": null, "objectType":"fqdn", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", ...</msg> +<status status="PASS" starttime="20210602 14:11:37.293" endtime="20210602 14:11:37.294"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectSubType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.295" endtime="20210602 14:11:37.295"></status> +</kw> +<msg timestamp="20210602 14:11:37.296" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:37.296" level="INFO">${objectSubType} = </msg> +<status status="PASS" starttime="20210602 14:11:37.295" endtime="20210602 14:11:37.296"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.297" endtime="20210602 14:11:37.297"></status> +</kw> +<msg timestamp="20210602 14:11:37.297" level="INFO">${objectJson} = [{"objectId": null, "objectType":"fqdn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjec...</msg> +<status status="PASS" starttime="20210602 14:11:37.296" endtime="20210602 14:11:37.297"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<msg timestamp="20210602 14:11:37.299" level="FAIL">Dictionary does not contain key 'objectId'.</msg> +<status status="FAIL" starttime="20210602 14:11:37.298" endtime="20210602 14:11:37.299"></status> +</kw> +<msg timestamp="20210602 14:11:37.299" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:37.299" level="INFO">${objectId} = Dictionary does not contain key 'objectId'.</msg> +<status status="PASS" starttime="20210602 14:11:37.298" endtime="20210602 14:11:37.299"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectId": null</arg> +<arg>"objectId":${objectId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.300" endtime="20210602 14:11:37.300"></status> +</kw> +<msg timestamp="20210602 14:11:37.301" level="INFO">${objectJson} = [{"objectId": null, "objectType":"fqdn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjec...</msg> +<status status="PASS" starttime="20210602 14:11:37.299" endtime="20210602 14:11:37.301"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"option": "update"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.301" endtime="20210602 14:11:37.302"></status> +</kw> +<msg timestamp="20210602 14:11:37.302" level="INFO">${objectJson} = [{"objectId": null, "objectType":"fqdn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjec...</msg> +<status status="PASS" starttime="20210602 14:11:37.301" endtime="20210602 14:11:37.302"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectJsonList}</var> +</assign> +<msg timestamp="20210602 14:11:37.303" level="INFO">${objectJsonList} = []</msg> +<status status="PASS" starttime="20210602 14:11:37.302" endtime="20210602 14:11:37.303"></status> +</kw> +<kw name="Evaluate" library="BuiltIn"> +<doc>Evaluates the given expression in Python and returns the results.</doc> +<arguments> +<arg>type(${objList})</arg> +</arguments> +<assign> +<var>${objListType}</var> +</assign> +<msg timestamp="20210602 14:11:37.304" level="INFO">${objListType} = <class 'list'></msg> +<status status="PASS" starttime="20210602 14:11:37.303" endtime="20210602 14:11:37.304"></status> +</kw> +<kw name="${obj} IN [ @{objList} ]" type="for"> +<kw name="${obj} = {'addItemList': [{'keywordArray': ['$blog.csdn.net']}, {'keywordArray': ['*.csdn.net']}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.306" endtime="20210602 14:11:37.306"></status> +</kw> +<msg timestamp="20210602 14:11:37.307" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:37.307" level="INFO">${addItemList} = [{'keywordArray': ['$blog.csdn.net']}, {'keywordArray': ['*.csdn.net']}]</msg> +<status status="PASS" starttime="20210602 14:11:37.305" endtime="20210602 14:11:37.307"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:37.308" level="INFO">${addItemList} = [{"keywordArray": ["$blog.csdn.net"]}, {"keywordArray": ["*.csdn.net"]}]</msg> +<status status="PASS" starttime="20210602 14:11:37.308" endtime="20210602 14:11:37.308"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.309" endtime="20210602 14:11:37.310"></status> +</kw> +<msg timestamp="20210602 14:11:37.310" level="INFO">${addItemList} = [{"keywordArray": ["$blog.csdn.net"]}, {"keywordArray": ["*.csdn.net"]}]</msg> +<status status="PASS" starttime="20210602 14:11:37.309" endtime="20210602 14:11:37.310"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.311" endtime="20210602 14:11:37.311"></status> +</kw> +<msg timestamp="20210602 14:11:37.312" level="INFO">${addItemList} = [{"keywordArray": ["$blog.csdn.net"]}, {"keywordArray": ["*.csdn.net"]}]</msg> +<status status="PASS" starttime="20210602 14:11:37.310" endtime="20210602 14:11:37.312"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.313" endtime="20210602 14:11:37.313"></status> +</kw> +<msg timestamp="20210602 14:11:37.313" level="INFO">${objectJson} = [{"objectId": null, "objectType":"fqdn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjec...</msg> +<status status="PASS" starttime="20210602 14:11:37.312" endtime="20210602 14:11:37.313"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:37.314" level="INFO">${objectJson} = [{"objectId": null, "objectType":"fqdn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjec...</msg> +<status status="PASS" starttime="20210602 14:11:37.314" endtime="20210602 14:11:37.314"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:37.315" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'fqdn', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addItemList...</msg> +<status status="PASS" starttime="20210602 14:11:37.315" endtime="20210602 14:11:37.315"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.325" endtime="20210602 14:11:37.326"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.326" endtime="20210602 14:11:37.327"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'fqdn', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addItemList'..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.328" endtime="20210602 14:11:37.328"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.327" endtime="20210602 14:11:37.328"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.327" endtime="20210602 14:11:37.329"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.325" endtime="20210602 14:11:37.329"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.305" endtime="20210602 14:11:37.329"></status> +</kw> +<kw name="${obj} = {'addItemList': [{'keywordArray': ['$www.json.cn/']}, {'keywordArray': ['*json.cn/']}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.330" endtime="20210602 14:11:37.331"></status> +</kw> +<msg timestamp="20210602 14:11:37.331" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:37.331" level="INFO">${addItemList} = [{'keywordArray': ['$www.json.cn/']}, {'keywordArray': ['*json.cn/']}]</msg> +<status status="PASS" starttime="20210602 14:11:37.330" endtime="20210602 14:11:37.331"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:37.332" level="INFO">${addItemList} = [{"keywordArray": ["$www.json.cn/"]}, {"keywordArray": ["*json.cn/"]}]</msg> +<status status="PASS" starttime="20210602 14:11:37.332" endtime="20210602 14:11:37.332"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.333" endtime="20210602 14:11:37.334"></status> +</kw> +<msg timestamp="20210602 14:11:37.334" level="INFO">${addItemList} = [{"keywordArray": ["$www.json.cn/"]}, {"keywordArray": ["*json.cn/"]}]</msg> +<status status="PASS" starttime="20210602 14:11:37.333" endtime="20210602 14:11:37.334"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.335" endtime="20210602 14:11:37.335"></status> +</kw> +<msg timestamp="20210602 14:11:37.335" level="INFO">${addItemList} = [{"keywordArray": ["$www.json.cn/"]}, {"keywordArray": ["*json.cn/"]}]</msg> +<status status="PASS" starttime="20210602 14:11:37.334" endtime="20210602 14:11:37.335"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.336" endtime="20210602 14:11:37.337"></status> +</kw> +<msg timestamp="20210602 14:11:37.337" level="INFO">${objectJson} = [{"objectId": null, "objectType":"fqdn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjec...</msg> +<status status="PASS" starttime="20210602 14:11:37.336" endtime="20210602 14:11:37.337"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:37.338" level="INFO">${objectJson} = [{"objectId": null, "objectType":"fqdn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjec...</msg> +<status status="PASS" starttime="20210602 14:11:37.337" endtime="20210602 14:11:37.338"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:37.339" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'fqdn', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addItemList...</msg> +<status status="PASS" starttime="20210602 14:11:37.338" endtime="20210602 14:11:37.339"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.350" endtime="20210602 14:11:37.350"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.351" endtime="20210602 14:11:37.351"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'fqdn', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addItemList'..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.352" endtime="20210602 14:11:37.353"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.352" endtime="20210602 14:11:37.353"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.352" endtime="20210602 14:11:37.353"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.350" endtime="20210602 14:11:37.353"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.329" endtime="20210602 14:11:37.353"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.304" endtime="20210602 14:11:37.353"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>opAction=add</arg> +<arg>returnData=1</arg> +<arg>objectList=${objectJsonList}</arg> +</arguments> +<assign> +<var>${objectData}</var> +</assign> +<msg timestamp="20210602 14:11:37.354" level="INFO">${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'fqdn', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', '...</msg> +<status status="PASS" starttime="20210602 14:11:37.354" endtime="20210602 14:11:37.355"></status> +</kw> +<kw name="createObject" library="object"> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${rescode}</var> +<var>${objectIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${ipList}对象dict</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.355" endtime="20210602 14:11:37.356"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建IP</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.356" endtime="20210602 14:11:37.356"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${ipList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:37.357" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:37.357" endtime="20210602 14:11:37.357"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${ipList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:37.358" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "fqdn", "objectSubType": "", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6...</msg> +<status status="PASS" starttime="20210602 14:11:37.357" endtime="20210602 14:11:37.358"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${objectUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:37.359" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:37.359" endtime="20210602 14:11:37.359"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:37.360" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v1, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:37.359" endtime="20210602 14:11:37.360"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:37.361" level="INFO">POST Request using : uri=/policy/object, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "fqdn", "objectSubType": "", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"keywordArray": ["$blog.csdn.net"]}, {"keywordArray": ["*.csdn.net"]}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}, {"objectId": null, "objectType": "fqdn", "objectSubType": "", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"keywordArray": ["$blog.csdn.net"]}, {"keywordArray": ["*.csdn.net"]}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]} +json=None</msg> +<msg timestamp="20210602 14:11:37.460" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:37.360" endtime="20210602 14:11:37.460"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:37.462" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:37.461" endtime="20210602 14:11:37.463"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:37.464" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:37.463" endtime="20210602 14:11:37.464"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:37.465" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "objectList" : [ { + "addItemList" : [ { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:36", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "blog.csdn.net" ], + "itemId" : 10074715, + "objectId" : 107894 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:36", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ ".csdn.net" ], + "itemId" : 10074716, + "objectId" : 107894 + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107894, + "objectName" : "auttest单ip指定端口", + "objectType" : "fqdn", + "opTime" : "2021-06-02 14:11:36", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + }, { + "addItemList" : [ { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:36", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "blog.csdn.net" ], + "itemId" : 10074717, + "objectId" : 107895 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:36", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ ".csdn.net" ], + "itemId" : 10074718, + "objectId" : 107895 + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107895, + "objectName" : "auttest单ip指定端口", + "objectType" : "fqdn", + "opTime" : "2021-06-02 14:11:36", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:37.465" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:37.466" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:36', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:37.465" endtime="20210602 14:11:37.466"></status> +</kw> +<msg timestamp="20210602 14:11:37.466" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:36', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:37.358" endtime="20210602 14:11:37.466"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>getObjectListIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${objectIds}</var> +</assign> +<kw name="getObjectListIds" library="process_object_body"> +<doc>获取结果中的对象ID</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>Call Get-ObjectIds</arg> +</arguments> +<msg timestamp="20210602 14:11:37.468" level="INFO">Call Get-ObjectIds</msg> +<status status="PASS" starttime="20210602 14:11:37.467" endtime="20210602 14:11:37.468"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIds}</var> +</assign> +<msg timestamp="20210602 14:11:37.468" level="INFO">${objectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:37.468" endtime="20210602 14:11:37.469"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${objectIdsTemp}</var> +</assign> +<msg timestamp="20210602 14:11:37.469" level="INFO">${objectIdsTemp} = </msg> +<status status="PASS" starttime="20210602 14:11:37.469" endtime="20210602 14:11:37.469"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${data}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.470" endtime="20210602 14:11:37.470"></status> +</kw> +<msg timestamp="20210602 14:11:37.471" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:37.471" level="INFO">${data} = {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:36', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['b...</msg> +<status status="PASS" starttime="20210602 14:11:37.470" endtime="20210602 14:11:37.471"></status> +</kw> +<kw name="Return From Keyword If" library="BuiltIn"> +<doc>Returns from the enclosing user keyword if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"=="FAIL"</arg> +<arg>${objectIdsTemp}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.471" endtime="20210602 14:11:37.471"></status> +</kw> +<kw name="${object} IN [ @{value['data']['objectList']} ]" type="for"> +<kw name="${object} = {'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:36', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['blog.csdn.net'], ..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.472" endtime="20210602 14:11:37.473"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.472" endtime="20210602 14:11:37.473"></status> +</kw> +<kw name="${object} = {'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:36', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['blog.csdn.net'], ..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.473" endtime="20210602 14:11:37.474"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.473" endtime="20210602 14:11:37.474"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.472" endtime="20210602 14:11:37.474"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.467" endtime="20210602 14:11:37.474"></status> +</kw> +<msg timestamp="20210602 14:11:37.475" level="INFO">${objectIds} = [107894, 107895]</msg> +<status status="PASS" starttime="20210602 14:11:37.466" endtime="20210602 14:11:37.475"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:37.475" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:37.475" endtime="20210602 14:11:37.476"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:37.476" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:37.476" endtime="20210602 14:11:37.476"></status> +</kw> +<msg timestamp="20210602 14:11:37.477" level="INFO">${rescode} = 200</msg> +<msg timestamp="20210602 14:11:37.477" level="INFO">${objectIds} = [107894, 107895]</msg> +<status status="PASS" starttime="20210602 14:11:37.355" endtime="20210602 14:11:37.477"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:37.478" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:37.477" endtime="20210602 14:11:37.478"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${protocolField}</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${protocolField}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.479" endtime="20210602 14:11:37.479"></status> +</kw> +<msg timestamp="20210602 14:11:37.479" level="INFO">${protocolField} = TSG_FIELD_HTTP_HOST</msg> +<status status="PASS" starttime="20210602 14:11:37.478" endtime="20210602 14:11:37.479"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectsList}</var> +</assign> +<msg timestamp="20210602 14:11:37.480" level="INFO">${objectsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:37.479" endtime="20210602 14:11:37.480"></status> +</kw> +<kw name="${obj} IN [ @{objectIds} ]" type="for"> +<kw name="${obj} = 107894" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:37.481" level="INFO">${objectList} = {'objectId': 107894, 'protocolField': 'TSG_FIELD_HTTP_HOST'}</msg> +<status status="PASS" starttime="20210602 14:11:37.481" endtime="20210602 14:11:37.481"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.482" endtime="20210602 14:11:37.482"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.480" endtime="20210602 14:11:37.482"></status> +</kw> +<kw name="${obj} = 107895" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:37.483" level="INFO">${objectList} = {'objectId': 107894, 'protocolField': 'TSG_FIELD_HTTP_HOST'}</msg> +<status status="PASS" starttime="20210602 14:11:37.483" endtime="20210602 14:11:37.483"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.483" endtime="20210602 14:11:37.484"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.482" endtime="20210602 14:11:37.484"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.480" endtime="20210602 14:11:37.484"></status> +</kw> +<msg timestamp="20210602 14:11:37.484" level="INFO">${objectIds} = [107894, 107895]</msg> +<msg timestamp="20210602 14:11:37.485" level="INFO">${objectList} = {'objectId': 107894, 'protocolField': 'TSG_FIELD_HTTP_HOST'}</msg> +<status status="PASS" starttime="20210602 14:11:37.285" endtime="20210602 14:11:37.485"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>OrangeFilter</arg> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<kw name="OrangeFilter" library="object"> +<doc>filer对象处理,把一个filter的list处理为一个filter</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${list}</var> +</assign> +<msg timestamp="20210602 14:11:37.486" level="INFO">${list} = [{'objectId': 107894, 'protocolField': 'TSG_FIELD_HTTP_HOST'}]</msg> +<status status="PASS" starttime="20210602 14:11:37.486" endtime="20210602 14:11:37.487"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>filter=${list}</arg> +</arguments> +<assign> +<var>${filter}</var> +</assign> +<msg timestamp="20210602 14:11:37.487" level="INFO">${filter} = {'filter': [{'objectId': 107894, 'protocolField': 'TSG_FIELD_HTTP_HOST'}]}</msg> +<status status="PASS" starttime="20210602 14:11:37.487" endtime="20210602 14:11:37.488"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.486" endtime="20210602 14:11:37.488"></status> +</kw> +<msg timestamp="20210602 14:11:37.488" level="INFO">${objectList} = {'filter': [{'objectId': 107894, 'protocolField': 'TSG_FIELD_HTTP_HOST'}]}</msg> +<status status="PASS" starttime="20210602 14:11:37.485" endtime="20210602 14:11:37.488"></status> +</kw> +<msg timestamp="20210602 14:11:37.489" level="INFO">${objectIds} = [107894, 107895]</msg> +<msg timestamp="20210602 14:11:37.489" level="INFO">${objectList} = {'filter': [{'objectId': 107894, 'protocolField': 'TSG_FIELD_HTTP_HOST'}]}</msg> +<status status="PASS" starttime="20210602 14:11:37.284" endtime="20210602 14:11:37.489"></status> +</kw> +<kw name="Get Length" library="BuiltIn"> +<doc>Returns and logs the length of the given item as an integer.</doc> +<arguments> +<arg>${objectIdsList}</arg> +</arguments> +<assign> +<var>${len}</var> +</assign> +<msg timestamp="20210602 14:11:37.489" level="INFO">Length is 12</msg> +<msg timestamp="20210602 14:11:37.490" level="INFO">${len} = 12</msg> +<status status="PASS" starttime="20210602 14:11:37.489" endtime="20210602 14:11:37.490"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${len} != 0</arg> +<arg>AppendListToList</arg> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectIds}</arg> +</arguments> +<assign> +<var>${objectIdsList}</var> +</assign> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.507" endtime="20210602 14:11:37.507"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.507" endtime="20210602 14:11:37.508"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = 107894" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.508" endtime="20210602 14:11:37.509"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.508" endtime="20210602 14:11:37.509"></status> +</kw> +<kw name="${objdict} = 107895" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.510" endtime="20210602 14:11:37.510"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.509" endtime="20210602 14:11:37.510"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.508" endtime="20210602 14:11:37.510"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.506" endtime="20210602 14:11:37.511"></status> +</kw> +<msg timestamp="20210602 14:11:37.511" level="INFO">${objectIdsList} = [107882, 107883, 107884, 107885, 107886, 107887, 107888, 107889, 107890, 107891, 107892, 107893, 107894, 107895]</msg> +<status status="PASS" starttime="20210602 14:11:37.490" endtime="20210602 14:11:37.511"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Append To List</arg> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Append To List</arg> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>Append To List</arg> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.512" endtime="20210602 14:11:37.512"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.511" endtime="20210602 14:11:37.513"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.282" endtime="20210602 14:11:37.513"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.536" endtime="20210602 14:11:37.513"></status> +</kw> +<msg timestamp="20210602 14:11:37.513" level="INFO">${objectIds} = [107882, 107883, 107884, 107885, 107886, 107887, 107888, 107889, 107890, 107891, 107892, 107893, 107894, 107895]</msg> +<msg timestamp="20210602 14:11:37.513" level="INFO">${sourceList} = [{'objectId': 107882, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}, {'objectId': 107884, 'protocolField': 'TSG_SECURITY_SOURCE_LOCATION'}, {'objectId': 107885, 'protocolField': 'TSG_FILED_GTP_IMSI'}, ...</msg> +<msg timestamp="20210602 14:11:37.514" level="INFO">${destinationList} = [{'objectId': 107889, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}, {'objectId': 107890, 'protocolField': 'TSG_SECURITY_DESTINATION_LOCATION'}, {'objectId': 107891, 'protocolField': 'TSG_SECURITY...</msg> +<msg timestamp="20210602 14:11:37.514" level="INFO">${filterList} = [{'filter': [{'objectId': 107892, 'protocolField': 'TSG_FIELD_HTTP_URL'}]}, {'filter': [{'objectId': 107894, 'protocolField': 'TSG_FIELD_HTTP_HOST'}]}]</msg> +<status status="PASS" starttime="20210602 14:11:31.532" endtime="20210602 14:11:37.514"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${sourceList}</arg> +</arguments> +<assign> +<var>${sourceList}</var> +</assign> +<msg timestamp="20210602 14:11:37.515" level="INFO">${sourceList} = [{"objectId": 107882, "protocolField": "TSG_SECURITY_SOURCE_ADDR"}, {"objectId": 107884, "protocolField": "TSG_SECURITY_SOURCE_LOCATION"}, {"objectId": 107885, "protocolField": "TSG_FILED_GTP_IMSI"}, ...</msg> +<status status="PASS" starttime="20210602 14:11:37.514" endtime="20210602 14:11:37.515"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${destinationList}</arg> +</arguments> +<assign> +<var>${destinationList}</var> +</assign> +<msg timestamp="20210602 14:11:37.515" level="INFO">${destinationList} = [{"objectId": 107889, "protocolField": "TSG_SECURITY_DESTINATION_ADDR"}, {"objectId": 107890, "protocolField": "TSG_SECURITY_DESTINATION_LOCATION"}, {"objectId": 107891, "protocolField": "TSG_SECURITY...</msg> +<status status="PASS" starttime="20210602 14:11:37.515" endtime="20210602 14:11:37.515"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${filterList}</arg> +</arguments> +<assign> +<var>${filterList}</var> +</assign> +<msg timestamp="20210602 14:11:37.516" level="INFO">${filterList} = [{"filter": [{"objectId": 107892, "protocolField": "TSG_FIELD_HTTP_URL"}]}, {"filter": [{"objectId": 107894, "protocolField": "TSG_FIELD_HTTP_HOST"}]}]</msg> +<status status="PASS" starttime="20210602 14:11:37.516" endtime="20210602 14:11:37.516"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"source": null</arg> +<arg>"source":${sourceList}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<msg timestamp="20210602 14:11:37.517" level="INFO">${policyJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...</msg> +<status status="PASS" starttime="20210602 14:11:37.516" endtime="20210602 14:11:37.517"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"destination": null</arg> +<arg>"destination":${destinationList}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<msg timestamp="20210602 14:11:37.518" level="INFO">${policyJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...</msg> +<status status="PASS" starttime="20210602 14:11:37.517" endtime="20210602 14:11:37.518"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"filterList": null</arg> +<arg>"filterList":${filterList}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<msg timestamp="20210602 14:11:37.518" level="INFO">${policyJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...</msg> +<status status="PASS" starttime="20210602 14:11:37.518" endtime="20210602 14:11:37.519"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>处理策略数据:</arg> +<arg>"opAction": "add"</arg> +<arg>"returnData": 1</arg> +<arg>"policyName": "autotest"</arg> +<arg>"policyType": "tsg_security"</arg> +<arg>"action": "allow"</arg> +<arg>"userTags": ""</arg> +<arg>"doBlacklist": 0</arg> +<arg>"doLog": 1</arg> +<arg>"policyDesc": "autotest"</arg> +<arg>"effectiveRange":</arg> +<arg>"userRegion":</arg> +<arg>"appIdObjects":</arg> +<arg>"appSelectorObjects":</arg> +<arg>"isValid": 1</arg> +<arg>"scheduleId":</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.519" endtime="20210602 14:11:37.519"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>opAction</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${opAction}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>opAction</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.520" endtime="20210602 14:11:37.520"></status> +</kw> +<msg timestamp="20210602 14:11:37.520" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:37.521" level="INFO">${opAction} = add</msg> +<status status="PASS" starttime="20210602 14:11:37.520" endtime="20210602 14:11:37.521"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${opAction}" != "${EMPTY}"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"opAction": "${opAction}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"opAction": "${opAction}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.522" endtime="20210602 14:11:37.522"></status> +</kw> +<msg timestamp="20210602 14:11:37.522" level="INFO">${policyJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...</msg> +<status status="PASS" starttime="20210602 14:11:37.521" endtime="20210602 14:11:37.522"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${returnData}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>returnData</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.523" endtime="20210602 14:11:37.523"></status> +</kw> +<msg timestamp="20210602 14:11:37.524" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:37.524" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:37.523" endtime="20210602 14:11:37.525"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${returnData}" != "${EMPTY}"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"returnData": 1</arg> +<arg>"returnData": "${returnData}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"returnData": 1</arg> +<arg>"returnData": "${returnData}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.526" endtime="20210602 14:11:37.526"></status> +</kw> +<msg timestamp="20210602 14:11:37.526" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest",...</msg> +<status status="PASS" starttime="20210602 14:11:37.525" endtime="20210602 14:11:37.526"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>policyName</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${policyName}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>policyName</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.527" endtime="20210602 14:11:37.527"></status> +</kw> +<msg timestamp="20210602 14:11:37.528" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:37.528" level="INFO">${policyName} = autotestdeny</msg> +<status status="PASS" starttime="20210602 14:11:37.527" endtime="20210602 14:11:37.528"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${policyName}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"policyName": "autotest"</arg> +<arg>"policyName": "${policyName}"</arg> +<arg>ELSE</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"policyName": "autotest"</arg> +<arg>"policyName": "${testName}"</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"policyName": "autotest"</arg> +<arg>"policyName": "${policyName}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.529" endtime="20210602 14:11:37.529"></status> +</kw> +<msg timestamp="20210602 14:11:37.529" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestdeny", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autote...</msg> +<status status="PASS" starttime="20210602 14:11:37.528" endtime="20210602 14:11:37.530"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>policyType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${policyType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>policyType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.530" endtime="20210602 14:11:37.531"></status> +</kw> +<msg timestamp="20210602 14:11:37.531" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:37.531" level="INFO">${policyType} = tsg_security</msg> +<status status="PASS" starttime="20210602 14:11:37.530" endtime="20210602 14:11:37.531"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${policyType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"policyType": "tsg_security"</arg> +<arg>"policyType": "${policyType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"policyType": "tsg_security"</arg> +<arg>"policyType": "${policyType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.532" endtime="20210602 14:11:37.533"></status> +</kw> +<msg timestamp="20210602 14:11:37.533" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestdeny", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autote...</msg> +<status status="PASS" starttime="20210602 14:11:37.532" endtime="20210602 14:11:37.533"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>action</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${action}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>action</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.534" endtime="20210602 14:11:37.534"></status> +</kw> +<msg timestamp="20210602 14:11:37.534" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:37.534" level="INFO">${action} = deny</msg> +<status status="PASS" starttime="20210602 14:11:37.533" endtime="20210602 14:11:37.534"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${action}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"action": "allow"</arg> +<arg>"action": "${action}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"action": "allow"</arg> +<arg>"action": "${action}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.535" endtime="20210602 14:11:37.536"></status> +</kw> +<msg timestamp="20210602 14:11:37.536" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestdeny", "policyType": "tsg_security", "action": "deny", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotes...</msg> +<status status="PASS" starttime="20210602 14:11:37.535" endtime="20210602 14:11:37.536"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>method</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${method}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>method</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.537" endtime="20210602 14:11:37.537"></status> +</kw> +<msg timestamp="20210602 14:11:37.537" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:37.537" level="INFO">${method} = block</msg> +<status status="PASS" starttime="20210602 14:11:37.536" endtime="20210602 14:11:37.537"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>userTags</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${userTags}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>userTags</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.538" endtime="20210602 14:11:37.538"></status> +</kw> +<msg timestamp="20210602 14:11:37.539" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:37.539" level="INFO">${userTags} = </msg> +<status status="PASS" starttime="20210602 14:11:37.538" endtime="20210602 14:11:37.539"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${userTags}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"userTags": null</arg> +<arg>"userTags": ${userTags}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"userTags": null</arg> +<arg>"userTags": ${userTags}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.540" endtime="20210602 14:11:37.540"></status> +</kw> +<msg timestamp="20210602 14:11:37.541" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestdeny", "policyType": "tsg_security", "action": "deny", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotes...</msg> +<status status="PASS" starttime="20210602 14:11:37.540" endtime="20210602 14:11:37.541"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>doBlacklist</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${doBlacklist}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>doBlacklist</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.542" endtime="20210602 14:11:37.542"></status> +</kw> +<msg timestamp="20210602 14:11:37.542" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:37.542" level="INFO">${doBlacklist} = 0</msg> +<status status="PASS" starttime="20210602 14:11:37.541" endtime="20210602 14:11:37.542"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${doBlacklist}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"doBlacklist": 0</arg> +<arg>"doBlacklist": ${doBlacklist}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"doBlacklist": 0</arg> +<arg>"doBlacklist": ${doBlacklist}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.543" endtime="20210602 14:11:37.543"></status> +</kw> +<msg timestamp="20210602 14:11:37.544" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestdeny", "policyType": "tsg_security", "action": "deny", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotes...</msg> +<status status="PASS" starttime="20210602 14:11:37.543" endtime="20210602 14:11:37.544"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>doLog</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${doLog}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>doLog</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.544" endtime="20210602 14:11:37.545"></status> +</kw> +<msg timestamp="20210602 14:11:37.545" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:37.545" level="INFO">${doLog} = 1</msg> +<status status="PASS" starttime="20210602 14:11:37.544" endtime="20210602 14:11:37.545"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${doLog}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"doLog": 1</arg> +<arg>"doLog": ${doLog}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"doLog": 1</arg> +<arg>"doLog": ${doLog}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.546" endtime="20210602 14:11:37.546"></status> +</kw> +<msg timestamp="20210602 14:11:37.547" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestdeny", "policyType": "tsg_security", "action": "deny", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotes...</msg> +<status status="PASS" starttime="20210602 14:11:37.546" endtime="20210602 14:11:37.547"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>policyDesc</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${policyDesc}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>policyDesc</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.548" endtime="20210602 14:11:37.548"></status> +</kw> +<msg timestamp="20210602 14:11:37.548" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:37.548" level="INFO">${policyDesc} = autotest</msg> +<status status="PASS" starttime="20210602 14:11:37.547" endtime="20210602 14:11:37.548"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${policyDesc}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"policyDesc": "autotest"</arg> +<arg>"policyDesc": "${policyDesc}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"policyDesc": "autotest"</arg> +<arg>"policyDesc": "${policyDesc}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.549" endtime="20210602 14:11:37.550"></status> +</kw> +<msg timestamp="20210602 14:11:37.550" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestdeny", "policyType": "tsg_security", "action": "deny", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotes...</msg> +<status status="PASS" starttime="20210602 14:11:37.549" endtime="20210602 14:11:37.550"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>effectiveRange</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${effectiveRange}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>effectiveRange</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.551" endtime="20210602 14:11:37.551"></status> +</kw> +<msg timestamp="20210602 14:11:37.551" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:37.551" level="INFO">${effectiveRange} = None</msg> +<status status="PASS" starttime="20210602 14:11:37.550" endtime="20210602 14:11:37.551"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${effectiveRange}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"effectiveRange": null</arg> +<arg>"effectiveRange": ${effectiveRange}</arg> +<arg>ELSE</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"effectiveRange": null</arg> +<arg>"effectiveRange": {}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"effectiveRange": null</arg> +<arg>"effectiveRange": {}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.552" endtime="20210602 14:11:37.553"></status> +</kw> +<msg timestamp="20210602 14:11:37.553" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestdeny", "policyType": "tsg_security", "action": "deny", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotes...</msg> +<status status="PASS" starttime="20210602 14:11:37.552" endtime="20210602 14:11:37.553"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>userRegion</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${userRegion}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>userRegion</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.554" endtime="20210602 14:11:37.554"></status> +</kw> +<msg timestamp="20210602 14:11:37.555" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:37.555" level="INFO">${userRegion} = None</msg> +<status status="PASS" starttime="20210602 14:11:37.553" endtime="20210602 14:11:37.555"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>code</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${code}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>code</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.556" endtime="20210602 14:11:37.556"></status> +</kw> +<msg timestamp="20210602 14:11:37.557" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:37.557" level="INFO">${code} = 403</msg> +<status status="PASS" starttime="20210602 14:11:37.555" endtime="20210602 14:11:37.557"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>message</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${message}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>message</arg> +</arguments> +<msg timestamp="20210602 14:11:37.559" level="FAIL">Dictionary does not contain key 'message'.</msg> +<status status="FAIL" starttime="20210602 14:11:37.558" endtime="20210602 14:11:37.559"></status> +</kw> +<msg timestamp="20210602 14:11:37.559" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:37.560" level="INFO">${message} = Dictionary does not contain key 'message'.</msg> +<status status="PASS" starttime="20210602 14:11:37.557" endtime="20210602 14:11:37.560"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>html_profile</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${html_profile}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>html_profile</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.561" endtime="20210602 14:11:37.561"></status> +</kw> +<msg timestamp="20210602 14:11:37.561" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:37.561" level="INFO">${html_profile} = 2551</msg> +<status status="PASS" starttime="20210602 14:11:37.560" endtime="20210602 14:11:37.561"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${html_profile}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${html_profile}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${message}</arg> +</arguments> +<assign> +<var>${message}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${html_profile}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.562" endtime="20210602 14:11:37.563"></status> +</kw> +<msg timestamp="20210602 14:11:37.563" level="INFO">${message} = 2551</msg> +<status status="PASS" starttime="20210602 14:11:37.562" endtime="20210602 14:11:37.563"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${html_profile}" != "None"</arg> +<arg>Set Variable</arg> +<arg>html_profile</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>message</arg> +</arguments> +<assign> +<var>${messageKey}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>html_profile</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.564" endtime="20210602 14:11:37.564"></status> +</kw> +<msg timestamp="20210602 14:11:37.564" level="INFO">${messageKey} = html_profile</msg> +<status status="PASS" starttime="20210602 14:11:37.563" endtime="20210602 14:11:37.565"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>keyring</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${keyring}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>keyring</arg> +</arguments> +<msg timestamp="20210602 14:11:37.566" level="FAIL">Dictionary does not contain key 'keyring'.</msg> +<status status="FAIL" starttime="20210602 14:11:37.565" endtime="20210602 14:11:37.566"></status> +</kw> +<msg timestamp="20210602 14:11:37.566" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:37.566" level="INFO">${keyring} = Dictionary does not contain key 'keyring'.</msg> +<status status="PASS" starttime="20210602 14:11:37.565" endtime="20210602 14:11:37.566"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${keyring}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${keyring}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>""</arg> +</arguments> +<assign> +<var>${keyring}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>""</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.567" endtime="20210602 14:11:37.568"></status> +</kw> +<msg timestamp="20210602 14:11:37.568" level="INFO">${keyring} = ""</msg> +<status status="PASS" starttime="20210602 14:11:37.567" endtime="20210602 14:11:37.568"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>decryption</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${decryption}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>decryption</arg> +</arguments> +<msg timestamp="20210602 14:11:37.569" level="FAIL">Dictionary does not contain key 'decryption'.</msg> +<status status="FAIL" starttime="20210602 14:11:37.569" endtime="20210602 14:11:37.569"></status> +</kw> +<msg timestamp="20210602 14:11:37.569" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:37.569" level="INFO">${decryption} = Dictionary does not contain key 'decryption'.</msg> +<status status="PASS" starttime="20210602 14:11:37.568" endtime="20210602 14:11:37.570"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${decryption}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${decryption}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>""</arg> +</arguments> +<assign> +<var>${decryption}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>""</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.570" endtime="20210602 14:11:37.571"></status> +</kw> +<msg timestamp="20210602 14:11:37.571" level="INFO">${decryption} = ""</msg> +<status status="PASS" starttime="20210602 14:11:37.570" endtime="20210602 14:11:37.571"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>decrypt_mirror</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${decrypt_mirror}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>decrypt_mirror</arg> +</arguments> +<msg timestamp="20210602 14:11:37.572" level="FAIL">Dictionary does not contain key 'decrypt_mirror'.</msg> +<status status="FAIL" starttime="20210602 14:11:37.572" endtime="20210602 14:11:37.572"></status> +</kw> +<msg timestamp="20210602 14:11:37.573" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:37.573" level="INFO">${decrypt_mirror} = Dictionary does not contain key 'decrypt_mirror'.</msg> +<status status="PASS" starttime="20210602 14:11:37.571" endtime="20210602 14:11:37.573"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${decrypt_mirror}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${decrypt_mirror}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>""</arg> +</arguments> +<assign> +<var>${decrypt_mirror}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>""</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.574" endtime="20210602 14:11:37.574"></status> +</kw> +<msg timestamp="20210602 14:11:37.575" level="INFO">${decrypt_mirror} = ""</msg> +<status status="PASS" starttime="20210602 14:11:37.573" endtime="20210602 14:11:37.575"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${decrypt_mirror}</arg> +</arguments> +<assign> +<var>${decrypt_mirror}</var> +</assign> +<msg timestamp="20210602 14:11:37.576" level="INFO">${decrypt_mirror} = "\"\""</msg> +<status status="PASS" starttime="20210602 14:11:37.575" endtime="20210602 14:11:37.576"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>appIdObjects</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${appIdObjects}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>appIdObjects</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.577" endtime="20210602 14:11:37.577"></status> +</kw> +<msg timestamp="20210602 14:11:37.577" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:37.577" level="INFO">${appIdObjects} = ['http']</msg> +<status status="PASS" starttime="20210602 14:11:37.576" endtime="20210602 14:11:37.578"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${appIdObjectIds}</var> +</assign> +<msg timestamp="20210602 14:11:37.578" level="INFO">${appIdObjectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:37.578" endtime="20210602 14:11:37.578"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>userRegionStr由:动作,协议,动作参数等决定,待完成;userregion在allow,monitor动作时多个协议为空;deny,多个协议时为子动作;Intercept,多个协议为空;http为,ssl为,判断appid对象的个数。</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.579" endtime="20210602 14:11:37.579"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<assign> +<var>${userRegionStr}</var> +</assign> +<msg timestamp="20210602 14:11:37.580" level="INFO">${userRegionStr} = </msg> +<status status="PASS" starttime="20210602 14:11:37.579" endtime="20210602 14:11:37.580"></status> +</kw> +<kw name="${key} IN [ @{appIdObjects} ]" type="for"> +<kw name="${key} = http" type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objprotol}</arg> +<arg>${key}</arg> +</arguments> +<assign> +<var>${appObjId}</var> +</assign> +<msg timestamp="20210602 14:11:37.582" level="INFO">${appObjId} = 75744</msg> +<status status="PASS" starttime="20210602 14:11:37.581" endtime="20210602 14:11:37.583"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${appIdObjectIds}</arg> +<arg>${appObjId}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.583" endtime="20210602 14:11:37.584"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${method}" == "block" or "${method}" == "alert"</arg> +<arg>Set Variable</arg> +<arg>{"protocol":"${key}","method": "${method}","code":${code},"${messageKey}":${message}}</arg> +<arg>ELSE IF</arg> +<arg>"${action}" == "deny"</arg> +<arg>Set Variable</arg> +<arg>{"protocol":"${key}","method": "${method}"}</arg> +<arg>ELSE IF</arg> +<arg>"${action}" == "intercept" and "${key}" == "ssl"</arg> +<arg>Set Variable</arg> +<arg>{"protocol":"SSL","keyring": ${keyring},"decryption":${decryption},"decrypt_mirror":${decrypt_mirror}}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>{"protocol":"HTTP"}</arg> +</arguments> +<assign> +<var>${userRegionStr}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"protocol":"${key}","method": "${method}","code":${code},"${messageKey}":${message}}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.585" endtime="20210602 14:11:37.586"></status> +</kw> +<msg timestamp="20210602 14:11:37.586" level="INFO">${userRegionStr} = {"protocol":"http","method": "block","code":403,"html_profile":2551}</msg> +<status status="PASS" starttime="20210602 14:11:37.584" endtime="20210602 14:11:37.586"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.581" endtime="20210602 14:11:37.587"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:37.580" endtime="20210602 14:11:37.587"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${appIdObjects}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"appIdObjects": [null]</arg> +<arg>"appIdObjects": ${appIdObjectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"appIdObjects": [null]</arg> +<arg>"appIdObjects": ${appIdObjectIds}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.588" endtime="20210602 14:11:37.588"></status> +</kw> +<msg timestamp="20210602 14:11:37.588" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestdeny", "policyType": "tsg_security", "action": "deny", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotes...</msg> +<status status="PASS" starttime="20210602 14:11:37.587" endtime="20210602 14:11:37.589"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"userRegion": null</arg> +<arg>"userRegion": ${userRegionStr}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<msg timestamp="20210602 14:11:37.589" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestdeny", "policyType": "tsg_security", "action": "deny", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotes...</msg> +<status status="PASS" starttime="20210602 14:11:37.589" endtime="20210602 14:11:37.589"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"userRegion": null</arg> +<arg>"userRegion": {}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<msg timestamp="20210602 14:11:37.590" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestdeny", "policyType": "tsg_security", "action": "deny", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotes...</msg> +<status status="PASS" starttime="20210602 14:11:37.590" endtime="20210602 14:11:37.590"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>appSelectorObjects</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${appSelectorObjects}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>appSelectorObjects</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.591" endtime="20210602 14:11:37.591"></status> +</kw> +<msg timestamp="20210602 14:11:37.592" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:37.592" level="INFO">${appSelectorObjects} = None</msg> +<status status="PASS" starttime="20210602 14:11:37.591" endtime="20210602 14:11:37.592"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL"</arg> +<arg>Set Variable</arg> +<arg>${appSelectorObjects}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${appSelectorObjects}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${appSelectorObjects}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.593" endtime="20210602 14:11:37.593"></status> +</kw> +<msg timestamp="20210602 14:11:37.593" level="INFO">${appSelectorObjects} = None</msg> +<status status="PASS" starttime="20210602 14:11:37.592" endtime="20210602 14:11:37.593"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${appSelectorObjects}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"appSelectorObjects": "add"</arg> +<arg>"appSelectorObjects": ${appSelectorObjects}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${policyJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.594" endtime="20210602 14:11:37.594"></status> +</kw> +<msg timestamp="20210602 14:11:37.595" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestdeny", "policyType": "tsg_security", "action": "deny", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotes...</msg> +<status status="PASS" starttime="20210602 14:11:37.594" endtime="20210602 14:11:37.595"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>isValid</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${isValid}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>isValid</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.595" endtime="20210602 14:11:37.596"></status> +</kw> +<msg timestamp="20210602 14:11:37.596" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:37.596" level="INFO">${isValid} = 1</msg> +<status status="PASS" starttime="20210602 14:11:37.595" endtime="20210602 14:11:37.596"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL"</arg> +<arg>Set Variable</arg> +<arg>${isValid}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${appSelectorObjects}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${isValid}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.597" endtime="20210602 14:11:37.597"></status> +</kw> +<msg timestamp="20210602 14:11:37.598" level="INFO">${appSelectorObjects} = 1</msg> +<status status="PASS" starttime="20210602 14:11:37.597" endtime="20210602 14:11:37.598"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${isValid}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"isValid": 1</arg> +<arg>"isValid": ${isValid}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"isValid": 1</arg> +<arg>"isValid": ${isValid}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.599" endtime="20210602 14:11:37.599"></status> +</kw> +<msg timestamp="20210602 14:11:37.599" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestdeny", "policyType": "tsg_security", "action": "deny", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotes...</msg> +<status status="PASS" starttime="20210602 14:11:37.598" endtime="20210602 14:11:37.599"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>scheduleId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${scheduleId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>scheduleId</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.600" endtime="20210602 14:11:37.601"></status> +</kw> +<msg timestamp="20210602 14:11:37.601" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:37.601" level="INFO">${scheduleId} = None</msg> +<status status="PASS" starttime="20210602 14:11:37.600" endtime="20210602 14:11:37.601"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL"</arg> +<arg>Set Variable</arg> +<arg>${scheduleId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${scheduleId}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${scheduleId}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.602" endtime="20210602 14:11:37.602"></status> +</kw> +<msg timestamp="20210602 14:11:37.603" level="INFO">${scheduleId} = None</msg> +<status status="PASS" starttime="20210602 14:11:37.602" endtime="20210602 14:11:37.603"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${scheduleId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"scheduleId": [null]</arg> +<arg>"scheduleId": ${scheduleId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${policyJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.604" endtime="20210602 14:11:37.604"></status> +</kw> +<msg timestamp="20210602 14:11:37.604" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestdeny", "policyType": "tsg_security", "action": "deny", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotes...</msg> +<status status="PASS" starttime="20210602 14:11:37.603" endtime="20210602 14:11:37.604"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<msg timestamp="20210602 14:11:37.605" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestdeny", "policyType": "tsg_security", "action": "deny", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotes...</msg> +<status status="PASS" starttime="20210602 14:11:37.605" endtime="20210602 14:11:37.605"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<msg timestamp="20210602 14:11:37.606" level="INFO">${policyJson} = {'opAction': 'add', 'returnData': '1', 'policyList': {'policyName': 'autotestdeny', 'policyType': 'tsg_security', 'action': 'deny', 'userTags': '', 'doBlacklist': 0, 'doLog': 1, 'policyDesc': 'autotes...</msg> +<status status="PASS" starttime="20210602 14:11:37.605" endtime="20210602 14:11:37.606"></status> +</kw> +<kw name="CreatePolilcy" library="policy"> +<doc>场景策略:secuiryt、proxy策略 +数据分离,测试数据来自对应的yaml文件 +参数 ${policyList}</doc> +<arguments> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数</arg> +<arg>${filepath}读取文件路径</arg> +<arg>${filename}读取文件名</arg> +<arg>${keywords}获取数据关键字</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.609" endtime="20210602 14:11:37.609"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建策略</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:37.610" endtime="20210602 14:11:37.610"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:37.610" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:37.610" endtime="20210602 14:11:37.610"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${policyList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:37.610" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestdeny", "policyType": "tsg_security", "action": "deny", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotes...</msg> +<status status="PASS" starttime="20210602 14:11:37.610" endtime="20210602 14:11:37.610"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${policyUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version2}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:37.612" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:37.611" endtime="20210602 14:11:37.612"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:37.612" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v2, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:37.612" endtime="20210602 14:11:37.613"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:37.614" level="INFO">POST Request using : uri=/policy/compile, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestdeny", "policyType": "tsg_security", "action": "deny", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "effectiveRange": {}, "userRegion": {"protocol": "http", "method": "block", "code": 403, "html_profile": 2551}, "source": [{"objectId": 107882, "protocolField": "TSG_SECURITY_SOURCE_ADDR"}, {"objectId": 107884, "protocolField": "TSG_SECURITY_SOURCE_LOCATION"}, {"objectId": 107885, "protocolField": "TSG_FILED_GTP_IMSI"}, {"objectId": 107886, "protocolField": "TSG_FILED_GTP_PHONE_NUMBER"}, {"objectId": 107887, "protocolField": "TSG_FILED_GTP_APN"}, {"objectId": 107888, "protocolField": "TSG_SECURITY_SOURCE_ADDR"}], "destination": [{"objectId": 107889, "protocolField": "TSG_SECURITY_DESTINATION_ADDR"}, {"objectId": 107890, "protocolField": "TSG_SECURITY_DESTINATION_LOCATION"}, {"objectId": 107891, "protocolField": "TSG_SECURITY_DESTINATION_ADDR"}], "filterList": [{"filter": [{"objectId": 107892, "protocolField": "TSG_FIELD_HTTP_URL"}]}, {"filter": [{"objectId": 107894, "protocolField": "TSG_FIELD_HTTP_HOST"}]}], "appIdObjects": [75744], "appSelectorObjects": [], "isValid": 1, "scheduleId": []}} +json=None</msg> +<msg timestamp="20210602 14:11:38.294" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:37.613" endtime="20210602 14:11:38.294"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:38.295" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:38.294" endtime="20210602 14:11:38.295"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:38.295" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:38.295" endtime="20210602 14:11:38.296"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:38.296" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "policyList" : [ { + "action" : "deny", + "appIdObjects" : [ 75744 ], + "appSelectorObjects" : [ ], + "destination" : [ { + "objectId" : 107889, + "protocolField" : "TSG_SECURITY_DESTINATION_ADDR" + }, { + "objectId" : 107890, + "protocolField" : "TSG_SECURITY_DESTINATION_LOCATION" + }, { + "objectId" : 107891, + "protocolField" : "TSG_SECURITY_DESTINATION_ADDR" + } ], + "doLog" : 1, + "effectiveRange" : { }, + "evaluationLayer" : "any_layer", + "evaluationOrder" : 0.0, + "evaluationStage" : 0, + "filterList" : [ { + "filter" : [ { + "objectId" : 107892, + "protocolField" : "TSG_FIELD_HTTP_URL" + } ] + }, { + "filter" : [ { + "objectId" : 107894, + "protocolField" : "TSG_FIELD_HTTP_HOST" + } ] + } ], + "isInitialize" : 0, + "isValid" : 1, + "opTime" : "2021-06-02 14:11:37", + "opUser" : 425, + "policyDesc" : "autotest", + "policyId" : 52341, + "policyName" : "autotestdeny", + "policyType" : "tsg_security", + "scheduleId" : [ ], + "source" : [ { + "objectId" : 107882, + "protocolField" : "TSG_SECURITY_SOURCE_ADDR" + }, { + "objectId" : 107884, + "protocolField" : "TSG_SECURITY_SOURCE_LOCATION" + }, { + "objectId" : 107885, + "protocolField" : "TSG_FILED_GTP_IMSI" + }, { + "objectId" : 107886, + "protocolField" : "TSG_FILED_GTP_PHONE_NUMBER" + }, { + "objectId" : 107887, + "protocolField" : "TSG_FILED_GTP_APN" + }, { + "objectId" : 107888, + "protocolField" : "TSG_SECURITY_SOURCE_ADDR" + } ], + "userRegion" : { + "protocol" : "HTTP", + "method" : "block", + "code" : 403, + "html_profile" : 2551 + }, + "userTags" : "" + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:38.296" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:38.297" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'policyList': [{'action': 'deny', 'appIdObjects': [75744], 'appSelectorObjects': [], 'destination': [{'objectId': 107889, 'protocolField': 'TSG_SECURITY_DESTIN...</msg> +<status status="PASS" starttime="20210602 14:11:38.296" endtime="20210602 14:11:38.297"></status> +</kw> +<msg timestamp="20210602 14:11:38.297" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'policyList': [{'action': 'deny', 'appIdObjects': [75744], 'appSelectorObjects': [], 'destination': [{'objectId': 107889, 'protocolField': 'TSG_SECURITY_DESTIN...</msg> +<status status="PASS" starttime="20210602 14:11:37.611" endtime="20210602 14:11:38.297"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>GetPolicyIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${policyIds}</var> +</assign> +<kw name="GetPolicyIds" library="process_policy_body"> +<doc>获取结果中的策略类型及ID +策略接口返回json串 +返回结果格式:[{'policyType': 'tsg_security', 'policyIds': [108480]}, {'policyType': 'tsg_security', 'policyIds': [108481]}, {'policyType': 'tsg_security', 'policyIds': [108482]}, {'policyType': 'tsg_security', 'policyIds': [108483]}, {'policyType': 'tsg_security', 'policyIds': [108484]}]</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${policyIds}</var> +</assign> +<msg timestamp="20210602 14:11:38.299" level="INFO">${policyIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:38.298" endtime="20210602 14:11:38.299"></status> +</kw> +<kw name="${policy} IN [ @{value['data']['policyList']} ]" type="for"> +<kw name="${policy} = {'action': 'deny', 'appIdObjects': [75744], 'appSelectorObjects': [], 'destination': [{'objectId': 107889, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}, {'objectId': 107890, 'protocolField': 'TSG..." type="foritem"> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<arguments> +<arg>${policy['policyId']}</arg> +</arguments> +<assign> +<var>${policyIdList}</var> +</assign> +<msg timestamp="20210602 14:11:38.300" level="INFO">${policyIdList} = [52341]</msg> +<status status="PASS" starttime="20210602 14:11:38.300" endtime="20210602 14:11:38.300"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>policyType=${policy['policyType']}</arg> +<arg>policyIds=${policyIdList}</arg> +</arguments> +<assign> +<var>${policyObj}</var> +</assign> +<msg timestamp="20210602 14:11:38.301" level="INFO">${policyObj} = {'policyType': 'tsg_security', 'policyIds': [52341]}</msg> +<status status="PASS" starttime="20210602 14:11:38.300" endtime="20210602 14:11:38.301"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${policyIds}</arg> +<arg>${policyObj}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.301" endtime="20210602 14:11:38.302"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.299" endtime="20210602 14:11:38.302"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.299" endtime="20210602 14:11:38.302"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>${policyIds}</arg> +</arguments> +<msg timestamp="20210602 14:11:38.303" level="INFO">[{'policyType': 'tsg_security', 'policyIds': [52341]}]</msg> +<status status="PASS" starttime="20210602 14:11:38.302" endtime="20210602 14:11:38.303"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.298" endtime="20210602 14:11:38.303"></status> +</kw> +<msg timestamp="20210602 14:11:38.303" level="INFO">${policyIds} = [{'policyType': 'tsg_security', 'policyIds': [52341]}]</msg> +<status status="PASS" starttime="20210602 14:11:38.298" endtime="20210602 14:11:38.303"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:38.304" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:38.304" endtime="20210602 14:11:38.304"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:38.305" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:38.305" endtime="20210602 14:11:38.305"></status> +</kw> +<msg timestamp="20210602 14:11:38.306" level="INFO">${policyIds} = [{'policyType': 'tsg_security', 'policyIds': [52341]}]</msg> +<status status="PASS" starttime="20210602 14:11:37.608" endtime="20210602 14:11:38.306"></status> +</kw> +<msg timestamp="20210602 14:11:38.306" level="INFO">${objectId} = [107882, 107883, 107884, 107885, 107886, 107887, 107888, 107889, 107890, 107891, 107892, 107893, 107894, 107895]</msg> +<msg timestamp="20210602 14:11:38.306" level="INFO">${policyId} = [{'policyType': 'tsg_security', 'policyIds': [52341]}]</msg> +<status status="PASS" starttime="20210602 14:11:31.529" endtime="20210602 14:11:38.306"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${objectId}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.317" endtime="20210602 14:11:38.317"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.317" endtime="20210602 14:11:38.317"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = 107882" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.318" endtime="20210602 14:11:38.318"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.318" endtime="20210602 14:11:38.319"></status> +</kw> +<kw name="${objdict} = 107883" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.319" endtime="20210602 14:11:38.319"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.319" endtime="20210602 14:11:38.320"></status> +</kw> +<kw name="${objdict} = 107884" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.320" endtime="20210602 14:11:38.320"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.320" endtime="20210602 14:11:38.321"></status> +</kw> +<kw name="${objdict} = 107885" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.321" endtime="20210602 14:11:38.321"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.321" endtime="20210602 14:11:38.321"></status> +</kw> +<kw name="${objdict} = 107886" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.322" endtime="20210602 14:11:38.322"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.322" endtime="20210602 14:11:38.322"></status> +</kw> +<kw name="${objdict} = 107887" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.323" endtime="20210602 14:11:38.323"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.323" endtime="20210602 14:11:38.323"></status> +</kw> +<kw name="${objdict} = 107888" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.324" endtime="20210602 14:11:38.324"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.324" endtime="20210602 14:11:38.324"></status> +</kw> +<kw name="${objdict} = 107889" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.325" endtime="20210602 14:11:38.325"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.325" endtime="20210602 14:11:38.325"></status> +</kw> +<kw name="${objdict} = 107890" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.326" endtime="20210602 14:11:38.327"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.326" endtime="20210602 14:11:38.327"></status> +</kw> +<kw name="${objdict} = 107891" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.328" endtime="20210602 14:11:38.328"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.327" endtime="20210602 14:11:38.328"></status> +</kw> +<kw name="${objdict} = 107892" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.329" endtime="20210602 14:11:38.329"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.328" endtime="20210602 14:11:38.329"></status> +</kw> +<kw name="${objdict} = 107893" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.330" endtime="20210602 14:11:38.330"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.330" endtime="20210602 14:11:38.331"></status> +</kw> +<kw name="${objdict} = 107894" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.331" endtime="20210602 14:11:38.332"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.331" endtime="20210602 14:11:38.332"></status> +</kw> +<kw name="${objdict} = 107895" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.332" endtime="20210602 14:11:38.333"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.332" endtime="20210602 14:11:38.333"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.318" endtime="20210602 14:11:38.333"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.316" endtime="20210602 14:11:38.333"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${policyIds}</arg> +<arg>${policyId}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.344" endtime="20210602 14:11:38.344"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.345" endtime="20210602 14:11:38.345"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'policyType': 'tsg_security', 'policyIds': [52341]}" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.346" endtime="20210602 14:11:38.346"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.345" endtime="20210602 14:11:38.346"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.345" endtime="20210602 14:11:38.346"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.343" endtime="20210602 14:11:38.347"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:31.522" endtime="20210602 14:11:38.347"></status> +</kw> +<kw name="${key} = {'opAction': 'add', 'returnData': 1, 'policyName': 'autotestintercept', 'policyType': 'tsg_security', 'action': 'intercept', 'keyring': 1, 'decryption': 1, 'decrypt_mirror': {'enable': 1, 'mirror_prof..." type="foritem"> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>passssssssss</arg> +</arguments> +<msg timestamp="20210602 14:11:38.348" level="INFO">passssssssss</msg> +<status status="PASS" starttime="20210602 14:11:38.347" endtime="20210602 14:11:38.348"></status> +</kw> +<kw name="CreatePolicysAndObjects" library="policy"> +<doc>组织单个策略数据${modleFilePath}策略模板文件路径 ${policyData}从数据文件中获取的单个策略数据</doc> +<arguments> +<arg>${key}</arg> +<arg>${keyword}</arg> +</arguments> +<assign> +<var>${objectId}</var> +<var>${policyId}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>获取模板</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.353" endtime="20210602 14:11:38.353"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${policyModeJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.353" endtime="20210602 14:11:38.354"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${policyModeJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<msg timestamp="20210602 14:11:38.354" level="INFO">${policyJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...</msg> +<status status="PASS" starttime="20210602 14:11:38.354" endtime="20210602 14:11:38.354"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>用data数据替换模板内容生成策略新增数据</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.355" endtime="20210602 14:11:38.355"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>condation</arg> +</arguments> +<assign> +<var>${condation}</var> +</assign> +<msg timestamp="20210602 14:11:38.355" level="INFO">${condation} = [{'protocolField': 'TSG_SECURITY_SOURCE_ADDR', 'objectType': 'ip', 'objectSubType': 'endpoint', 'objList': [{'addItemList': [{'ip': '255.255.255.255', 'port': '0-65535'}, {'ip': '255.255.255.255', 'po...</msg> +<status status="PASS" starttime="20210602 14:11:38.355" endtime="20210602 14:11:38.356"></status> +</kw> +<kw name="CreateCondation" library="policy"> +<doc>解析策略条件,根据key值判断其在source、destation、filter中</doc> +<arguments> +<arg>${condation}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${sourceList}</var> +<var>${destinationList}</var> +<var>${filterList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>循环读取对象list</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.356" endtime="20210602 14:11:38.357"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${sourceList}</var> +</assign> +<msg timestamp="20210602 14:11:38.357" level="INFO">${sourceList} = []</msg> +<status status="PASS" starttime="20210602 14:11:38.357" endtime="20210602 14:11:38.358"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${destinationList}</var> +</assign> +<msg timestamp="20210602 14:11:38.358" level="INFO">${destinationList} = []</msg> +<status status="PASS" starttime="20210602 14:11:38.358" endtime="20210602 14:11:38.358"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${filterList}</var> +</assign> +<msg timestamp="20210602 14:11:38.359" level="INFO">${filterList} = []</msg> +<status status="PASS" starttime="20210602 14:11:38.359" endtime="20210602 14:11:38.359"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIdsList}</var> +</assign> +<msg timestamp="20210602 14:11:38.360" level="INFO">${objectIdsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:38.359" endtime="20210602 14:11:38.360"></status> +</kw> +<kw name="${key} IN [ @{objectListData} ]" type="for"> +<kw name="${key} = {'protocolField': 'TSG_SECURITY_SOURCE_ADDR', 'objectType': 'ip', 'objectSubType': 'endpoint', 'objList': [{'addItemList': [{'ip': '255.255.255.255', 'port': '0-65535'}, {'ip': '255.255.255.255', 'por..." type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${key}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:38.361" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:38.360" endtime="20210602 14:11:38.361"></status> +</kw> +<kw name="CreateObjectList" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${key}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.362" endtime="20210602 14:11:38.362"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:38.363" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:38.362" endtime="20210602 14:11:38.363"></status> +</kw> +<kw name="CreateObjects" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.363" endtime="20210602 14:11:38.364"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:38.364" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:38.364" endtime="20210602 14:11:38.364"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objList</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:38.365" level="INFO">${objList} = [{'addItemList': [{'ip': '255.255.255.255', 'port': '0-65535'}, {'ip': '255.255.255.255', 'port': '1-65535'}]}, {'addItemList': [{'ip': '255.255.255.1-255.255.255.255', 'port': '0-65535'}, {'ip': '255...</msg> +<status status="PASS" starttime="20210602 14:11:38.365" endtime="20210602 14:11:38.365"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${objJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.365" endtime="20210602 14:11:38.366"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objModeJson}</arg> +</arguments> +<assign> +<var>${objJson}</var> +</assign> +<msg timestamp="20210602 14:11:38.366" level="INFO">${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:38.366" endtime="20210602 14:11:38.366"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objListMode}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:38.367" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:38.367" endtime="20210602 14:11:38.367"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.367" endtime="20210602 14:11:38.367"></status> +</kw> +<msg timestamp="20210602 14:11:38.367" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:38.369" level="INFO">${objectType} = ip</msg> +<status status="PASS" starttime="20210602 14:11:38.367" endtime="20210602 14:11:38.369"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.369" endtime="20210602 14:11:38.369"></status> +</kw> +<msg timestamp="20210602 14:11:38.369" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "s...</msg> +<status status="PASS" starttime="20210602 14:11:38.369" endtime="20210602 14:11:38.369"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectSubType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.370" endtime="20210602 14:11:38.370"></status> +</kw> +<msg timestamp="20210602 14:11:38.370" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:38.371" level="INFO">${objectSubType} = endpoint</msg> +<status status="PASS" starttime="20210602 14:11:38.369" endtime="20210602 14:11:38.371"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.372" endtime="20210602 14:11:38.373"></status> +</kw> +<msg timestamp="20210602 14:11:38.373" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...</msg> +<status status="PASS" starttime="20210602 14:11:38.371" endtime="20210602 14:11:38.373"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<msg timestamp="20210602 14:11:38.374" level="FAIL">Dictionary does not contain key 'objectId'.</msg> +<status status="FAIL" starttime="20210602 14:11:38.374" endtime="20210602 14:11:38.375"></status> +</kw> +<msg timestamp="20210602 14:11:38.375" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:38.375" level="INFO">${objectId} = Dictionary does not contain key 'objectId'.</msg> +<status status="PASS" starttime="20210602 14:11:38.373" endtime="20210602 14:11:38.375"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectId": null</arg> +<arg>"objectId":${objectId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.376" endtime="20210602 14:11:38.376"></status> +</kw> +<msg timestamp="20210602 14:11:38.376" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...</msg> +<status status="PASS" starttime="20210602 14:11:38.375" endtime="20210602 14:11:38.377"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"option": "update"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.377" endtime="20210602 14:11:38.378"></status> +</kw> +<msg timestamp="20210602 14:11:38.378" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...</msg> +<status status="PASS" starttime="20210602 14:11:38.377" endtime="20210602 14:11:38.378"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectJsonList}</var> +</assign> +<msg timestamp="20210602 14:11:38.379" level="INFO">${objectJsonList} = []</msg> +<status status="PASS" starttime="20210602 14:11:38.378" endtime="20210602 14:11:38.379"></status> +</kw> +<kw name="Evaluate" library="BuiltIn"> +<doc>Evaluates the given expression in Python and returns the results.</doc> +<arguments> +<arg>type(${objList})</arg> +</arguments> +<assign> +<var>${objListType}</var> +</assign> +<msg timestamp="20210602 14:11:38.379" level="INFO">${objListType} = <class 'list'></msg> +<status status="PASS" starttime="20210602 14:11:38.379" endtime="20210602 14:11:38.380"></status> +</kw> +<kw name="${obj} IN [ @{objList} ]" type="for"> +<kw name="${obj} = {'addItemList': [{'ip': '255.255.255.255', 'port': '0-65535'}, {'ip': '255.255.255.255', 'port': '1-65535'}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.381" endtime="20210602 14:11:38.381"></status> +</kw> +<msg timestamp="20210602 14:11:38.381" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:38.381" level="INFO">${addItemList} = [{'ip': '255.255.255.255', 'port': '0-65535'}, {'ip': '255.255.255.255', 'port': '1-65535'}]</msg> +<status status="PASS" starttime="20210602 14:11:38.380" endtime="20210602 14:11:38.381"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:38.382" level="INFO">${addItemList} = [{"ip": "255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.255", "port": "1-65535"}]</msg> +<status status="PASS" starttime="20210602 14:11:38.382" endtime="20210602 14:11:38.382"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.383" endtime="20210602 14:11:38.384"></status> +</kw> +<msg timestamp="20210602 14:11:38.384" level="INFO">${addItemList} = [{"ip": "255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.255", "port": "1-65535"}]</msg> +<status status="PASS" starttime="20210602 14:11:38.383" endtime="20210602 14:11:38.384"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.385" endtime="20210602 14:11:38.385"></status> +</kw> +<msg timestamp="20210602 14:11:38.385" level="INFO">${addItemList} = [{"ip": "255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.255", "port": "1-65535"}]</msg> +<status status="PASS" starttime="20210602 14:11:38.384" endtime="20210602 14:11:38.385"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.386" endtime="20210602 14:11:38.387"></status> +</kw> +<msg timestamp="20210602 14:11:38.387" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...</msg> +<status status="PASS" starttime="20210602 14:11:38.386" endtime="20210602 14:11:38.387"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:38.388" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...</msg> +<status status="PASS" starttime="20210602 14:11:38.387" endtime="20210602 14:11:38.388"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:38.388" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addIt...</msg> +<status status="PASS" starttime="20210602 14:11:38.388" endtime="20210602 14:11:38.389"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.400" endtime="20210602 14:11:38.400"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.401" endtime="20210602 14:11:38.401"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addIte..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.402" endtime="20210602 14:11:38.403"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.402" endtime="20210602 14:11:38.403"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.401" endtime="20210602 14:11:38.403"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.399" endtime="20210602 14:11:38.403"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.380" endtime="20210602 14:11:38.403"></status> +</kw> +<kw name="${obj} = {'addItemList': [{'ip': '255.255.255.1-255.255.255.255', 'port': '0-65535'}, {'ip': '255.255.255.2/24', 'port': '1-65535'}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.404" endtime="20210602 14:11:38.405"></status> +</kw> +<msg timestamp="20210602 14:11:38.405" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:38.405" level="INFO">${addItemList} = [{'ip': '255.255.255.1-255.255.255.255', 'port': '0-65535'}, {'ip': '255.255.255.2/24', 'port': '1-65535'}]</msg> +<status status="PASS" starttime="20210602 14:11:38.404" endtime="20210602 14:11:38.406"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:38.406" level="INFO">${addItemList} = [{"ip": "255.255.255.1-255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.2/24", "port": "1-65535"}]</msg> +<status status="PASS" starttime="20210602 14:11:38.406" endtime="20210602 14:11:38.406"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.408" endtime="20210602 14:11:38.408"></status> +</kw> +<msg timestamp="20210602 14:11:38.408" level="INFO">${addItemList} = [{"ip": "255.255.255.1-255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.2/24", "port": "1-65535"}]</msg> +<status status="PASS" starttime="20210602 14:11:38.407" endtime="20210602 14:11:38.408"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.409" endtime="20210602 14:11:38.410"></status> +</kw> +<msg timestamp="20210602 14:11:38.410" level="INFO">${addItemList} = [{"ip": "255.255.255.1-255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.2/24", "port": "1-65535"}]</msg> +<status status="PASS" starttime="20210602 14:11:38.409" endtime="20210602 14:11:38.410"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.411" endtime="20210602 14:11:38.411"></status> +</kw> +<msg timestamp="20210602 14:11:38.411" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...</msg> +<status status="PASS" starttime="20210602 14:11:38.410" endtime="20210602 14:11:38.412"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:38.412" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...</msg> +<status status="PASS" starttime="20210602 14:11:38.412" endtime="20210602 14:11:38.412"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:38.413" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addIt...</msg> +<status status="PASS" starttime="20210602 14:11:38.413" endtime="20210602 14:11:38.414"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.424" endtime="20210602 14:11:38.424"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.424" endtime="20210602 14:11:38.425"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addIte..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.425" endtime="20210602 14:11:38.426"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.425" endtime="20210602 14:11:38.426"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.425" endtime="20210602 14:11:38.426"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.423" endtime="20210602 14:11:38.426"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.404" endtime="20210602 14:11:38.426"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.380" endtime="20210602 14:11:38.427"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>opAction=add</arg> +<arg>returnData=1</arg> +<arg>objectList=${objectJsonList}</arg> +</arguments> +<assign> +<var>${objectData}</var> +</assign> +<msg timestamp="20210602 14:11:38.427" level="INFO">${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定...</msg> +<status status="PASS" starttime="20210602 14:11:38.427" endtime="20210602 14:11:38.428"></status> +</kw> +<kw name="createObject" library="object"> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${rescode}</var> +<var>${objectIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${ipList}对象dict</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.429" endtime="20210602 14:11:38.429"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建IP</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.429" endtime="20210602 14:11:38.429"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${ipList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:38.430" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:38.430" endtime="20210602 14:11:38.430"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${ipList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:38.431" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u535...</msg> +<status status="PASS" starttime="20210602 14:11:38.431" endtime="20210602 14:11:38.431"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${objectUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:38.432" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:38.432" endtime="20210602 14:11:38.432"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:38.433" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v1, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:38.433" endtime="20210602 14:11:38.434"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:38.434" level="INFO">POST Request using : uri=/policy/object, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"ip": "255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.255", "port": "1-65535"}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}, {"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"ip": "255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.255", "port": "1-65535"}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]} +json=None</msg> +<msg timestamp="20210602 14:11:38.862" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:38.434" endtime="20210602 14:11:38.863"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:38.866" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:38.865" endtime="20210602 14:11:38.867"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:38.871" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:38.868" endtime="20210602 14:11:38.872"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:38.874" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "objectList" : [ { + "addItemList" : [ { + "addrType" : 4, + "clientIp1" : "255.255.255.255", + "clientIp2" : "32", + "clientIpFormat" : "CIDR", + "clientPort1" : "0", + "clientPort2" : "65535", + "clientPortFormat" : "range", + "direction" : 0, + "ip" : "255.255.255.255", + "isInitialize" : 0, + "isSession" : "endpoint", + "isValid" : 1, + "itemDesc" : "{ \"ip\":\"255.255.255.255\" ,\"port\":\"0-65535\"}", + "itemId" : 10074719, + "itemName" : null, + "itemType" : "ip", + "objectId" : 107896, + "opTime" : "2021-06-02 14:11:38", + "opUser" : 425, + "port" : "0-65535", + "protocol" : 0, + "serverIp1" : "0.0.0.0", + "serverIp2" : "255.255.255.255", + "serverIpFormat" : "mask", + "serverPort1" : "0", + "serverPort2" : "65535", + "serverPortFormat" : "mask" + }, { + "addrType" : 4, + "clientIp1" : "255.255.255.255", + "clientIp2" : "32", + "clientIpFormat" : "CIDR", + "clientPort1" : "1", + "clientPort2" : "65535", + "clientPortFormat" : "range", + "direction" : 0, + "ip" : "255.255.255.255", + "isInitialize" : 0, + "isSession" : "endpoint", + "isValid" : 1, + "itemDesc" : "{ \"ip\":\"255.255.255.255\" ,\"port\":\"1-65535\"}", + "itemId" : 10074720, + "itemName" : null, + "itemType" : "ip", + "objectId" : 107896, + "opTime" : "2021-06-02 14:11:38", + "opUser" : 425, + "port" : "1-65535", + "protocol" : 0, + "serverIp1" : "0.0.0.0", + "serverIp2" : "255.255.255.255", + "serverIpFormat" : "mask", + "serverPort1" : "0", + "serverPort2" : "65535", + "serverPortFormat" : "mask" + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107896, + "objectName" : "auttest单ip指定端口", + "objectSubType" : "endpoint", + "objectType" : "ip", + "opTime" : "2021-06-02 14:11:37", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + }, { + "addItemList" : [ { + "addrType" : 4, + "clientIp1" : "255.255.255.255", + "clientIp2" : "32", + "clientIpFormat" : "CIDR", + "clientPort1" : "0", + "clientPort2" : "65535", + "clientPortFormat" : "range", + "direction" : 0, + "ip" : "255.255.255.255", + "isInitialize" : 0, + "isSession" : "endpoint", + "isValid" : 1, + "itemDesc" : "{ \"ip\":\"255.255.255.255\" ,\"port\":\"0-65535\"}", + "itemId" : 10074721, + "itemName" : null, + "itemType" : "ip", + "objectId" : 107897, + "opTime" : "2021-06-02 14:11:38", + "opUser" : 425, + "port" : "0-65535", + "protocol" : 0, + "serverIp1" : "0.0.0.0", + "serverIp2" : "255.255.255.255", + "serverIpFormat" : "mask", + "serverPort1" : "0", + "serverPort2" : "65535", + "serverPortFormat" : "mask" + }, { + "addrType" : 4, + "clientIp1" : "255.255.255.255", + "clientIp2" : "32", + "clientIpFormat" : "CIDR", + "clientPort1" : "1", + "clientPort2" : "65535", + "clientPortFormat" : "range", + "direction" : 0, + "ip" : "255.255.255.255", + "isInitialize" : 0, + "isSession" : "endpoint", + "isValid" : 1, + "itemDesc" : "{ \"ip\":\"255.255.255.255\" ,\"port\":\"1-65535\"}", + "itemId" : 10074722, + "itemName" : null, + "itemType" : "ip", + "objectId" : 107897, + "opTime" : "2021-06-02 14:11:38", + "opUser" : 425, + "port" : "1-65535", + "protocol" : 0, + "serverIp1" : "0.0.0.0", + "serverIp2" : "255.255.255.255", + "serverIpFormat" : "mask", + "serverPort1" : "0", + "serverPort2" : "65535", + "serverPortFormat" : "mask" + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107897, + "objectName" : "auttest单ip指定端口", + "objectSubType" : "endpoint", + "objectType" : "ip", + "opTime" : "2021-06-02 14:11:37", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:38.875" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:38.876" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.255', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '0', 'clientPort2':...</msg> +<status status="PASS" starttime="20210602 14:11:38.873" endtime="20210602 14:11:38.876"></status> +</kw> +<msg timestamp="20210602 14:11:38.877" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.255', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '0', 'clientPort2':...</msg> +<status status="PASS" starttime="20210602 14:11:38.431" endtime="20210602 14:11:38.877"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>getObjectListIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${objectIds}</var> +</assign> +<kw name="getObjectListIds" library="process_object_body"> +<doc>获取结果中的对象ID</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>Call Get-ObjectIds</arg> +</arguments> +<msg timestamp="20210602 14:11:38.881" level="INFO">Call Get-ObjectIds</msg> +<status status="PASS" starttime="20210602 14:11:38.880" endtime="20210602 14:11:38.881"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIds}</var> +</assign> +<msg timestamp="20210602 14:11:38.883" level="INFO">${objectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:38.882" endtime="20210602 14:11:38.883"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${objectIdsTemp}</var> +</assign> +<msg timestamp="20210602 14:11:38.884" level="INFO">${objectIdsTemp} = </msg> +<status status="PASS" starttime="20210602 14:11:38.883" endtime="20210602 14:11:38.884"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${data}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.886" endtime="20210602 14:11:38.886"></status> +</kw> +<msg timestamp="20210602 14:11:38.887" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:38.887" level="INFO">${data} = {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.255', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '0', 'clientPort2': '65535', 'clientPortFormat': 'range', '...</msg> +<status status="PASS" starttime="20210602 14:11:38.885" endtime="20210602 14:11:38.887"></status> +</kw> +<kw name="Return From Keyword If" library="BuiltIn"> +<doc>Returns from the enclosing user keyword if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"=="FAIL"</arg> +<arg>${objectIdsTemp}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.888" endtime="20210602 14:11:38.888"></status> +</kw> +<kw name="${object} IN [ @{value['data']['objectList']} ]" type="for"> +<kw name="${object} = {'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.255', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '0', 'clientPort2': '65535', 'clientPortFormat': 'range', 'direction': 0, '..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.889" endtime="20210602 14:11:38.890"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.889" endtime="20210602 14:11:38.890"></status> +</kw> +<kw name="${object} = {'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.255', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '0', 'clientPort2': '65535', 'clientPortFormat': 'range', 'direction': 0, '..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.891" endtime="20210602 14:11:38.892"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.891" endtime="20210602 14:11:38.892"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.888" endtime="20210602 14:11:38.892"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.879" endtime="20210602 14:11:38.892"></status> +</kw> +<msg timestamp="20210602 14:11:38.893" level="INFO">${objectIds} = [107896, 107897]</msg> +<status status="PASS" starttime="20210602 14:11:38.878" endtime="20210602 14:11:38.893"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:38.894" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:38.893" endtime="20210602 14:11:38.894"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:38.895" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:38.894" endtime="20210602 14:11:38.895"></status> +</kw> +<msg timestamp="20210602 14:11:38.895" level="INFO">${rescode} = 200</msg> +<msg timestamp="20210602 14:11:38.896" level="INFO">${objectIds} = [107896, 107897]</msg> +<status status="PASS" starttime="20210602 14:11:38.428" endtime="20210602 14:11:38.896"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:38.897" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:38.896" endtime="20210602 14:11:38.897"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${protocolField}</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${protocolField}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.898" endtime="20210602 14:11:38.898"></status> +</kw> +<msg timestamp="20210602 14:11:38.898" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:38.897" endtime="20210602 14:11:38.898"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectsList}</var> +</assign> +<msg timestamp="20210602 14:11:38.899" level="INFO">${objectsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:38.899" endtime="20210602 14:11:38.899"></status> +</kw> +<kw name="${obj} IN [ @{objectIds} ]" type="for"> +<kw name="${obj} = 107896" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:38.901" level="INFO">${objectList} = {'objectId': 107896, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:38.900" endtime="20210602 14:11:38.901"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.901" endtime="20210602 14:11:38.901"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.900" endtime="20210602 14:11:38.902"></status> +</kw> +<kw name="${obj} = 107897" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:38.903" level="INFO">${objectList} = {'objectId': 107896, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:38.902" endtime="20210602 14:11:38.903"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.903" endtime="20210602 14:11:38.903"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.902" endtime="20210602 14:11:38.903"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.899" endtime="20210602 14:11:38.904"></status> +</kw> +<msg timestamp="20210602 14:11:38.904" level="INFO">${objectIds} = [107896, 107897]</msg> +<msg timestamp="20210602 14:11:38.904" level="INFO">${objectList} = {'objectId': 107896, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:38.363" endtime="20210602 14:11:38.904"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>OrangeFilter</arg> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.905" endtime="20210602 14:11:38.906"></status> +</kw> +<msg timestamp="20210602 14:11:38.906" level="INFO">${objectList} = {'objectId': 107896, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:38.905" endtime="20210602 14:11:38.906"></status> +</kw> +<msg timestamp="20210602 14:11:38.906" level="INFO">${objectIds} = [107896, 107897]</msg> +<msg timestamp="20210602 14:11:38.907" level="INFO">${objectList} = {'objectId': 107896, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:38.361" endtime="20210602 14:11:38.907"></status> +</kw> +<kw name="Get Length" library="BuiltIn"> +<doc>Returns and logs the length of the given item as an integer.</doc> +<arguments> +<arg>${objectIdsList}</arg> +</arguments> +<assign> +<var>${len}</var> +</assign> +<msg timestamp="20210602 14:11:38.907" level="INFO">Length is 0</msg> +<msg timestamp="20210602 14:11:38.908" level="INFO">${len} = 0</msg> +<status status="PASS" starttime="20210602 14:11:38.907" endtime="20210602 14:11:38.908"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${len} != 0</arg> +<arg>AppendListToList</arg> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectIds}</arg> +</arguments> +<assign> +<var>${objectIdsList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectIds}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.908" endtime="20210602 14:11:38.909"></status> +</kw> +<msg timestamp="20210602 14:11:38.909" level="INFO">${objectIdsList} = [107896, 107897]</msg> +<status status="PASS" starttime="20210602 14:11:38.908" endtime="20210602 14:11:38.909"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Append To List</arg> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Append To List</arg> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>Append To List</arg> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.910" endtime="20210602 14:11:38.910"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.909" endtime="20210602 14:11:38.911"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.360" endtime="20210602 14:11:38.911"></status> +</kw> +<kw name="${key} = {'protocolField': 'TSG_SECURITY_SOURCE_LOCATION', 'objectType': 'ip', 'objectSubType': 'geo_location', 'objList': [{'addItemList': [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}..." type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${key}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:38.912" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_LOCATION</msg> +<status status="PASS" starttime="20210602 14:11:38.911" endtime="20210602 14:11:38.912"></status> +</kw> +<kw name="CreateObjectList" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${key}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.913" endtime="20210602 14:11:38.913"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:38.914" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_LOCATION</msg> +<status status="PASS" starttime="20210602 14:11:38.914" endtime="20210602 14:11:38.914"></status> +</kw> +<kw name="CreateObjects" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.915" endtime="20210602 14:11:38.915"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:38.916" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_LOCATION</msg> +<status status="PASS" starttime="20210602 14:11:38.915" endtime="20210602 14:11:38.916"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objList</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:38.916" level="INFO">${objList} = [{'addItemList': [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}, {'keywordArray': ['China.Duyun.*']}]}]</msg> +<status status="PASS" starttime="20210602 14:11:38.916" endtime="20210602 14:11:38.917"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${objJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.917" endtime="20210602 14:11:38.917"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objModeJson}</arg> +</arguments> +<assign> +<var>${objJson}</var> +</assign> +<msg timestamp="20210602 14:11:38.918" level="INFO">${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:38.917" endtime="20210602 14:11:38.918"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objListMode}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:38.919" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:38.918" endtime="20210602 14:11:38.919"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.919" endtime="20210602 14:11:38.920"></status> +</kw> +<msg timestamp="20210602 14:11:38.920" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:38.920" level="INFO">${objectType} = ip</msg> +<status status="PASS" starttime="20210602 14:11:38.919" endtime="20210602 14:11:38.920"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.921" endtime="20210602 14:11:38.921"></status> +</kw> +<msg timestamp="20210602 14:11:38.921" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "s...</msg> +<status status="PASS" starttime="20210602 14:11:38.920" endtime="20210602 14:11:38.922"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectSubType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.922" endtime="20210602 14:11:38.923"></status> +</kw> +<msg timestamp="20210602 14:11:38.923" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:38.923" level="INFO">${objectSubType} = geo_location</msg> +<status status="PASS" starttime="20210602 14:11:38.922" endtime="20210602 14:11:38.923"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.924" endtime="20210602 14:11:38.924"></status> +</kw> +<msg timestamp="20210602 14:11:38.925" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...</msg> +<status status="PASS" starttime="20210602 14:11:38.923" endtime="20210602 14:11:38.925"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<msg timestamp="20210602 14:11:38.926" level="FAIL">Dictionary does not contain key 'objectId'.</msg> +<status status="FAIL" starttime="20210602 14:11:38.925" endtime="20210602 14:11:38.926"></status> +</kw> +<msg timestamp="20210602 14:11:38.926" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:38.926" level="INFO">${objectId} = Dictionary does not contain key 'objectId'.</msg> +<status status="PASS" starttime="20210602 14:11:38.925" endtime="20210602 14:11:38.926"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectId": null</arg> +<arg>"objectId":${objectId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.927" endtime="20210602 14:11:38.927"></status> +</kw> +<msg timestamp="20210602 14:11:38.928" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...</msg> +<status status="PASS" starttime="20210602 14:11:38.927" endtime="20210602 14:11:38.928"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"option": "update"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.929" endtime="20210602 14:11:38.929"></status> +</kw> +<msg timestamp="20210602 14:11:38.929" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...</msg> +<status status="PASS" starttime="20210602 14:11:38.928" endtime="20210602 14:11:38.929"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectJsonList}</var> +</assign> +<msg timestamp="20210602 14:11:38.930" level="INFO">${objectJsonList} = []</msg> +<status status="PASS" starttime="20210602 14:11:38.930" endtime="20210602 14:11:38.930"></status> +</kw> +<kw name="Evaluate" library="BuiltIn"> +<doc>Evaluates the given expression in Python and returns the results.</doc> +<arguments> +<arg>type(${objList})</arg> +</arguments> +<assign> +<var>${objListType}</var> +</assign> +<msg timestamp="20210602 14:11:38.931" level="INFO">${objListType} = <class 'list'></msg> +<status status="PASS" starttime="20210602 14:11:38.931" endtime="20210602 14:11:38.931"></status> +</kw> +<kw name="${obj} IN [ @{objList} ]" type="for"> +<kw name="${obj} = {'addItemList': [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}, {'keywordArray': ['China.Duyun.*']}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.932" endtime="20210602 14:11:38.933"></status> +</kw> +<msg timestamp="20210602 14:11:38.933" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:38.933" level="INFO">${addItemList} = [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}, {'keywordArray': ['China.Duyun.*']}]</msg> +<status status="PASS" starttime="20210602 14:11:38.932" endtime="20210602 14:11:38.933"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:38.934" level="INFO">${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}, {"keywordArray": ["China.Duyun.*"]}]</msg> +<status status="PASS" starttime="20210602 14:11:38.933" endtime="20210602 14:11:38.934"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.935" endtime="20210602 14:11:38.935"></status> +</kw> +<msg timestamp="20210602 14:11:38.935" level="INFO">${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}, {"keywordArray": ["China.Duyun.*"]}]</msg> +<status status="PASS" starttime="20210602 14:11:38.934" endtime="20210602 14:11:38.935"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.936" endtime="20210602 14:11:38.937"></status> +</kw> +<msg timestamp="20210602 14:11:38.937" level="INFO">${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}, {"keywordArray": ["China.Duyun.*"]}]</msg> +<status status="PASS" starttime="20210602 14:11:38.936" endtime="20210602 14:11:38.937"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.938" endtime="20210602 14:11:38.938"></status> +</kw> +<msg timestamp="20210602 14:11:38.938" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...</msg> +<status status="PASS" starttime="20210602 14:11:38.937" endtime="20210602 14:11:38.939"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:38.939" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...</msg> +<status status="PASS" starttime="20210602 14:11:38.939" endtime="20210602 14:11:38.939"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:38.940" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'geo_location', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'a...</msg> +<status status="PASS" starttime="20210602 14:11:38.940" endtime="20210602 14:11:38.940"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.951" endtime="20210602 14:11:38.952"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.952" endtime="20210602 14:11:38.952"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'ip', 'objectSubType': 'geo_location', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'ad..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.953" endtime="20210602 14:11:38.953"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.953" endtime="20210602 14:11:38.954"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.952" endtime="20210602 14:11:38.954"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.951" endtime="20210602 14:11:38.954"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.932" endtime="20210602 14:11:38.954"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.931" endtime="20210602 14:11:38.954"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>opAction=add</arg> +<arg>returnData=1</arg> +<arg>objectList=${objectJsonList}</arg> +</arguments> +<assign> +<var>${objectData}</var> +</assign> +<msg timestamp="20210602 14:11:38.955" level="INFO">${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'geo_location', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单...</msg> +<status status="PASS" starttime="20210602 14:11:38.955" endtime="20210602 14:11:38.955"></status> +</kw> +<kw name="createObject" library="object"> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${rescode}</var> +<var>${objectIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${ipList}对象dict</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.956" endtime="20210602 14:11:38.956"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建IP</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:38.957" endtime="20210602 14:11:38.957"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${ipList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:38.958" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:38.957" endtime="20210602 14:11:38.958"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${ipList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:38.959" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\...</msg> +<status status="PASS" starttime="20210602 14:11:38.958" endtime="20210602 14:11:38.959"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${objectUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:38.960" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:38.959" endtime="20210602 14:11:38.960"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:38.961" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v1, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:38.960" endtime="20210602 14:11:38.961"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:38.962" level="INFO">POST Request using : uri=/policy/object, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}, {"keywordArray": ["China.Duyun.*"]}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]} +json=None</msg> +<msg timestamp="20210602 14:11:39.706" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:38.961" endtime="20210602 14:11:39.707"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:39.711" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:39.708" endtime="20210602 14:11:39.712"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:39.714" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:39.713" endtime="20210602 14:11:39.715"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:39.717" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "objectList" : [ { + "addItemList" : [ { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:38", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "Algeria." ], + "itemId" : 10074723, + "objectId" : 107898 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:38", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "China.Duyun." ], + "itemId" : 10074724, + "objectId" : 107898 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:38", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "China.Duyun." ], + "itemId" : 10074725, + "objectId" : 107898 + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107898, + "objectName" : "auttest单ip指定端口", + "objectSubType" : "geo_location", + "objectType" : "ip", + "opTime" : "2021-06-02 14:11:38", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:39.717" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:39.718" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:38', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:39.715" endtime="20210602 14:11:39.718"></status> +</kw> +<msg timestamp="20210602 14:11:39.719" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:38', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:38.959" endtime="20210602 14:11:39.719"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>getObjectListIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${objectIds}</var> +</assign> +<kw name="getObjectListIds" library="process_object_body"> +<doc>获取结果中的对象ID</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>Call Get-ObjectIds</arg> +</arguments> +<msg timestamp="20210602 14:11:39.723" level="INFO">Call Get-ObjectIds</msg> +<status status="PASS" starttime="20210602 14:11:39.722" endtime="20210602 14:11:39.723"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIds}</var> +</assign> +<msg timestamp="20210602 14:11:39.724" level="INFO">${objectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:39.723" endtime="20210602 14:11:39.724"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${objectIdsTemp}</var> +</assign> +<msg timestamp="20210602 14:11:39.725" level="INFO">${objectIdsTemp} = </msg> +<status status="PASS" starttime="20210602 14:11:39.725" endtime="20210602 14:11:39.726"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${data}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:39.727" endtime="20210602 14:11:39.728"></status> +</kw> +<msg timestamp="20210602 14:11:39.728" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:39.728" level="INFO">${data} = {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:38', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['A...</msg> +<status status="PASS" starttime="20210602 14:11:39.726" endtime="20210602 14:11:39.728"></status> +</kw> +<kw name="Return From Keyword If" library="BuiltIn"> +<doc>Returns from the enclosing user keyword if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"=="FAIL"</arg> +<arg>${objectIdsTemp}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:39.729" endtime="20210602 14:11:39.729"></status> +</kw> +<kw name="${object} IN [ @{value['data']['objectList']} ]" type="for"> +<kw name="${object} = {'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:38', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['Algeria.'], 'item..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:39.731" endtime="20210602 14:11:39.731"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:39.730" endtime="20210602 14:11:39.731"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:39.730" endtime="20210602 14:11:39.732"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:39.721" endtime="20210602 14:11:39.732"></status> +</kw> +<msg timestamp="20210602 14:11:39.732" level="INFO">${objectIds} = [107898]</msg> +<status status="PASS" starttime="20210602 14:11:39.720" endtime="20210602 14:11:39.733"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:39.734" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:39.733" endtime="20210602 14:11:39.734"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:39.734" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:39.734" endtime="20210602 14:11:39.735"></status> +</kw> +<msg timestamp="20210602 14:11:39.735" level="INFO">${rescode} = 200</msg> +<msg timestamp="20210602 14:11:39.735" level="INFO">${objectIds} = [107898]</msg> +<status status="PASS" starttime="20210602 14:11:38.956" endtime="20210602 14:11:39.735"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:39.736" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:39.736" endtime="20210602 14:11:39.736"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${protocolField}</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${protocolField}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:39.737" endtime="20210602 14:11:39.738"></status> +</kw> +<msg timestamp="20210602 14:11:39.738" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_LOCATION</msg> +<status status="PASS" starttime="20210602 14:11:39.737" endtime="20210602 14:11:39.738"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectsList}</var> +</assign> +<msg timestamp="20210602 14:11:39.739" level="INFO">${objectsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:39.739" endtime="20210602 14:11:39.739"></status> +</kw> +<kw name="${obj} IN [ @{objectIds} ]" type="for"> +<kw name="${obj} = 107898" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:39.740" level="INFO">${objectList} = {'objectId': 107898, 'protocolField': 'TSG_SECURITY_SOURCE_LOCATION'}</msg> +<status status="PASS" starttime="20210602 14:11:39.740" endtime="20210602 14:11:39.740"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:39.741" endtime="20210602 14:11:39.741"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:39.739" endtime="20210602 14:11:39.741"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:39.739" endtime="20210602 14:11:39.742"></status> +</kw> +<msg timestamp="20210602 14:11:39.742" level="INFO">${objectIds} = [107898]</msg> +<msg timestamp="20210602 14:11:39.742" level="INFO">${objectList} = {'objectId': 107898, 'protocolField': 'TSG_SECURITY_SOURCE_LOCATION'}</msg> +<status status="PASS" starttime="20210602 14:11:38.914" endtime="20210602 14:11:39.742"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>OrangeFilter</arg> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:39.743" endtime="20210602 14:11:39.744"></status> +</kw> +<msg timestamp="20210602 14:11:39.744" level="INFO">${objectList} = {'objectId': 107898, 'protocolField': 'TSG_SECURITY_SOURCE_LOCATION'}</msg> +<status status="PASS" starttime="20210602 14:11:39.743" endtime="20210602 14:11:39.744"></status> +</kw> +<msg timestamp="20210602 14:11:39.744" level="INFO">${objectIds} = [107898]</msg> +<msg timestamp="20210602 14:11:39.745" level="INFO">${objectList} = {'objectId': 107898, 'protocolField': 'TSG_SECURITY_SOURCE_LOCATION'}</msg> +<status status="PASS" starttime="20210602 14:11:38.912" endtime="20210602 14:11:39.745"></status> +</kw> +<kw name="Get Length" library="BuiltIn"> +<doc>Returns and logs the length of the given item as an integer.</doc> +<arguments> +<arg>${objectIdsList}</arg> +</arguments> +<assign> +<var>${len}</var> +</assign> +<msg timestamp="20210602 14:11:39.745" level="INFO">Length is 2</msg> +<msg timestamp="20210602 14:11:39.745" level="INFO">${len} = 2</msg> +<status status="PASS" starttime="20210602 14:11:39.745" endtime="20210602 14:11:39.746"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${len} != 0</arg> +<arg>AppendListToList</arg> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectIds}</arg> +</arguments> +<assign> +<var>${objectIdsList}</var> +</assign> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:39.756" endtime="20210602 14:11:39.757"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:39.757" endtime="20210602 14:11:39.758"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = 107898" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:39.758" endtime="20210602 14:11:39.759"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:39.758" endtime="20210602 14:11:39.759"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:39.758" endtime="20210602 14:11:39.759"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:39.756" endtime="20210602 14:11:39.760"></status> +</kw> +<msg timestamp="20210602 14:11:39.760" level="INFO">${objectIdsList} = [107896, 107897, 107898]</msg> +<status status="PASS" starttime="20210602 14:11:39.746" endtime="20210602 14:11:39.760"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Append To List</arg> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Append To List</arg> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>Append To List</arg> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:39.761" endtime="20210602 14:11:39.761"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:39.760" endtime="20210602 14:11:39.762"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.911" endtime="20210602 14:11:39.762"></status> +</kw> +<kw name="${key} = {'protocolField': 'TSG_FILED_GTP_IMSI', 'objectType': 'mobile_identity', 'objectSubType': 'imsi', 'objList': [{'addItemList': [{'keywordArray': ['123*']}, {'keywordArray': ['456*']}, {'keywordArray': ..." type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${key}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:39.763" level="INFO">${protocolField} = TSG_FILED_GTP_IMSI</msg> +<status status="PASS" starttime="20210602 14:11:39.762" endtime="20210602 14:11:39.763"></status> +</kw> +<kw name="CreateObjectList" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${key}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:39.763" endtime="20210602 14:11:39.764"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:39.764" level="INFO">${protocolField} = TSG_FILED_GTP_IMSI</msg> +<status status="PASS" starttime="20210602 14:11:39.764" endtime="20210602 14:11:39.765"></status> +</kw> +<kw name="CreateObjects" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:39.765" endtime="20210602 14:11:39.766"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:39.766" level="INFO">${protocolField} = TSG_FILED_GTP_IMSI</msg> +<status status="PASS" starttime="20210602 14:11:39.766" endtime="20210602 14:11:39.766"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objList</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:39.767" level="INFO">${objList} = [{'addItemList': [{'keywordArray': ['123*']}, {'keywordArray': ['456*']}, {'keywordArray': ['12345678912345*']}]}]</msg> +<status status="PASS" starttime="20210602 14:11:39.767" endtime="20210602 14:11:39.767"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${objJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:39.767" endtime="20210602 14:11:39.768"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objModeJson}</arg> +</arguments> +<assign> +<var>${objJson}</var> +</assign> +<msg timestamp="20210602 14:11:39.768" level="INFO">${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:39.768" endtime="20210602 14:11:39.768"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objListMode}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:39.769" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:39.769" endtime="20210602 14:11:39.769"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:39.770" endtime="20210602 14:11:39.770"></status> +</kw> +<msg timestamp="20210602 14:11:39.770" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:39.771" level="INFO">${objectType} = mobile_identity</msg> +<status status="PASS" starttime="20210602 14:11:39.769" endtime="20210602 14:11:39.771"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:39.771" endtime="20210602 14:11:39.772"></status> +</kw> +<msg timestamp="20210602 14:11:39.772" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc...</msg> +<status status="PASS" starttime="20210602 14:11:39.771" endtime="20210602 14:11:39.772"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectSubType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:39.773" endtime="20210602 14:11:39.774"></status> +</kw> +<msg timestamp="20210602 14:11:39.774" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:39.774" level="INFO">${objectSubType} = imsi</msg> +<status status="PASS" starttime="20210602 14:11:39.773" endtime="20210602 14:11:39.774"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:39.775" endtime="20210602 14:11:39.775"></status> +</kw> +<msg timestamp="20210602 14:11:39.776" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "t...</msg> +<status status="PASS" starttime="20210602 14:11:39.774" endtime="20210602 14:11:39.776"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<msg timestamp="20210602 14:11:39.777" level="FAIL">Dictionary does not contain key 'objectId'.</msg> +<status status="FAIL" starttime="20210602 14:11:39.777" endtime="20210602 14:11:39.777"></status> +</kw> +<msg timestamp="20210602 14:11:39.777" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:39.778" level="INFO">${objectId} = Dictionary does not contain key 'objectId'.</msg> +<status status="PASS" starttime="20210602 14:11:39.776" endtime="20210602 14:11:39.778"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectId": null</arg> +<arg>"objectId":${objectId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:39.778" endtime="20210602 14:11:39.779"></status> +</kw> +<msg timestamp="20210602 14:11:39.779" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "t...</msg> +<status status="PASS" starttime="20210602 14:11:39.778" endtime="20210602 14:11:39.779"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"option": "update"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:39.780" endtime="20210602 14:11:39.780"></status> +</kw> +<msg timestamp="20210602 14:11:39.781" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "t...</msg> +<status status="PASS" starttime="20210602 14:11:39.779" endtime="20210602 14:11:39.781"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectJsonList}</var> +</assign> +<msg timestamp="20210602 14:11:39.781" level="INFO">${objectJsonList} = []</msg> +<status status="PASS" starttime="20210602 14:11:39.781" endtime="20210602 14:11:39.781"></status> +</kw> +<kw name="Evaluate" library="BuiltIn"> +<doc>Evaluates the given expression in Python and returns the results.</doc> +<arguments> +<arg>type(${objList})</arg> +</arguments> +<assign> +<var>${objListType}</var> +</assign> +<msg timestamp="20210602 14:11:39.782" level="INFO">${objListType} = <class 'list'></msg> +<status status="PASS" starttime="20210602 14:11:39.782" endtime="20210602 14:11:39.782"></status> +</kw> +<kw name="${obj} IN [ @{objList} ]" type="for"> +<kw name="${obj} = {'addItemList': [{'keywordArray': ['123*']}, {'keywordArray': ['456*']}, {'keywordArray': ['12345678912345*']}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:39.783" endtime="20210602 14:11:39.784"></status> +</kw> +<msg timestamp="20210602 14:11:39.784" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:39.784" level="INFO">${addItemList} = [{'keywordArray': ['123*']}, {'keywordArray': ['456*']}, {'keywordArray': ['12345678912345*']}]</msg> +<status status="PASS" starttime="20210602 14:11:39.783" endtime="20210602 14:11:39.784"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:39.785" level="INFO">${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["456*"]}, {"keywordArray": ["12345678912345*"]}]</msg> +<status status="PASS" starttime="20210602 14:11:39.785" endtime="20210602 14:11:39.785"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:39.786" endtime="20210602 14:11:39.786"></status> +</kw> +<msg timestamp="20210602 14:11:39.787" level="INFO">${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["456*"]}, {"keywordArray": ["12345678912345*"]}]</msg> +<status status="PASS" starttime="20210602 14:11:39.785" endtime="20210602 14:11:39.787"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:39.787" endtime="20210602 14:11:39.788"></status> +</kw> +<msg timestamp="20210602 14:11:39.788" level="INFO">${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["456*"]}, {"keywordArray": ["12345678912345*"]}]</msg> +<status status="PASS" starttime="20210602 14:11:39.787" endtime="20210602 14:11:39.788"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:39.789" endtime="20210602 14:11:39.790"></status> +</kw> +<msg timestamp="20210602 14:11:39.790" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "t...</msg> +<status status="PASS" starttime="20210602 14:11:39.789" endtime="20210602 14:11:39.790"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:39.791" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "t...</msg> +<status status="PASS" starttime="20210602 14:11:39.790" endtime="20210602 14:11:39.791"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:39.792" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'mobile_identity', 'objectSubType': 'imsi', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [...</msg> +<status status="PASS" starttime="20210602 14:11:39.791" endtime="20210602 14:11:39.792"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:39.803" endtime="20210602 14:11:39.803"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:39.803" endtime="20210602 14:11:39.803"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'mobile_identity', 'objectSubType': 'imsi', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': []..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:39.804" endtime="20210602 14:11:39.805"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:39.804" endtime="20210602 14:11:39.805"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:39.804" endtime="20210602 14:11:39.805"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:39.802" endtime="20210602 14:11:39.806"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:39.783" endtime="20210602 14:11:39.806"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:39.782" endtime="20210602 14:11:39.806"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>opAction=add</arg> +<arg>returnData=1</arg> +<arg>objectList=${objectJsonList}</arg> +</arguments> +<assign> +<var>${objectData}</var> +</assign> +<msg timestamp="20210602 14:11:39.807" level="INFO">${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'mobile_identity', 'objectSubType': 'imsi', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'aut...</msg> +<status status="PASS" starttime="20210602 14:11:39.806" endtime="20210602 14:11:39.807"></status> +</kw> +<kw name="createObject" library="object"> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${rescode}</var> +<var>${objectIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${ipList}对象dict</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:39.808" endtime="20210602 14:11:39.808"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建IP</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:39.808" endtime="20210602 14:11:39.808"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${ipList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:39.809" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:39.809" endtime="20210602 14:11:39.809"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${ipList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:39.810" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "mobile_identity", "objectSubType": "imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "aut...</msg> +<status status="PASS" starttime="20210602 14:11:39.809" endtime="20210602 14:11:39.810"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${objectUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:39.811" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:39.811" endtime="20210602 14:11:39.811"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:39.812" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v1, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:39.811" endtime="20210602 14:11:39.812"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:39.813" level="INFO">POST Request using : uri=/policy/object, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "mobile_identity", "objectSubType": "imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"keywordArray": ["123*"]}, {"keywordArray": ["456*"]}, {"keywordArray": ["12345678912345*"]}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]} +json=None</msg> +<msg timestamp="20210602 14:11:40.018" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:39.813" endtime="20210602 14:11:40.018"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:40.019" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:40.018" endtime="20210602 14:11:40.019"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:40.020" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:40.019" endtime="20210602 14:11:40.020"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:40.021" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "objectList" : [ { + "addItemList" : [ { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:39", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "123" ], + "itemId" : 10074726, + "objectId" : 107899 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:39", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "456" ], + "itemId" : 10074727, + "objectId" : 107899 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:39", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "12345678912345" ], + "itemId" : 10074728, + "objectId" : 107899 + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107899, + "objectName" : "auttest单ip指定端口", + "objectSubType" : "imsi", + "objectType" : "mobile_identity", + "opTime" : "2021-06-02 14:11:39", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:40.021" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:40.021" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:39', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:40.020" endtime="20210602 14:11:40.021"></status> +</kw> +<msg timestamp="20210602 14:11:40.022" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:39', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:39.810" endtime="20210602 14:11:40.022"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>getObjectListIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${objectIds}</var> +</assign> +<kw name="getObjectListIds" library="process_object_body"> +<doc>获取结果中的对象ID</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>Call Get-ObjectIds</arg> +</arguments> +<msg timestamp="20210602 14:11:40.024" level="INFO">Call Get-ObjectIds</msg> +<status status="PASS" starttime="20210602 14:11:40.024" endtime="20210602 14:11:40.024"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIds}</var> +</assign> +<msg timestamp="20210602 14:11:40.025" level="INFO">${objectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:40.025" endtime="20210602 14:11:40.026"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${objectIdsTemp}</var> +</assign> +<msg timestamp="20210602 14:11:40.026" level="INFO">${objectIdsTemp} = </msg> +<status status="PASS" starttime="20210602 14:11:40.026" endtime="20210602 14:11:40.026"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${data}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:40.027" endtime="20210602 14:11:40.028"></status> +</kw> +<msg timestamp="20210602 14:11:40.028" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:40.028" level="INFO">${data} = {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:39', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['1...</msg> +<status status="PASS" starttime="20210602 14:11:40.027" endtime="20210602 14:11:40.028"></status> +</kw> +<kw name="Return From Keyword If" library="BuiltIn"> +<doc>Returns from the enclosing user keyword if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"=="FAIL"</arg> +<arg>${objectIdsTemp}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:40.029" endtime="20210602 14:11:40.029"></status> +</kw> +<kw name="${object} IN [ @{value['data']['objectList']} ]" type="for"> +<kw name="${object} = {'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:39', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['123'], 'itemId': ..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:40.030" endtime="20210602 14:11:40.030"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:40.030" endtime="20210602 14:11:40.030"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:40.029" endtime="20210602 14:11:40.031"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:40.023" endtime="20210602 14:11:40.031"></status> +</kw> +<msg timestamp="20210602 14:11:40.031" level="INFO">${objectIds} = [107899]</msg> +<status status="PASS" starttime="20210602 14:11:40.022" endtime="20210602 14:11:40.031"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:40.032" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:40.032" endtime="20210602 14:11:40.032"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:40.033" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:40.033" endtime="20210602 14:11:40.033"></status> +</kw> +<msg timestamp="20210602 14:11:40.033" level="INFO">${rescode} = 200</msg> +<msg timestamp="20210602 14:11:40.034" level="INFO">${objectIds} = [107899]</msg> +<status status="PASS" starttime="20210602 14:11:39.807" endtime="20210602 14:11:40.034"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:40.034" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:40.034" endtime="20210602 14:11:40.034"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${protocolField}</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${protocolField}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:40.035" endtime="20210602 14:11:40.036"></status> +</kw> +<msg timestamp="20210602 14:11:40.036" level="INFO">${protocolField} = TSG_FILED_GTP_IMSI</msg> +<status status="PASS" starttime="20210602 14:11:40.035" endtime="20210602 14:11:40.036"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectsList}</var> +</assign> +<msg timestamp="20210602 14:11:40.036" level="INFO">${objectsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:40.036" endtime="20210602 14:11:40.037"></status> +</kw> +<kw name="${obj} IN [ @{objectIds} ]" type="for"> +<kw name="${obj} = 107899" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:40.038" level="INFO">${objectList} = {'objectId': 107899, 'protocolField': 'TSG_FILED_GTP_IMSI'}</msg> +<status status="PASS" starttime="20210602 14:11:40.037" endtime="20210602 14:11:40.038"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:40.038" endtime="20210602 14:11:40.038"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:40.037" endtime="20210602 14:11:40.039"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:40.037" endtime="20210602 14:11:40.039"></status> +</kw> +<msg timestamp="20210602 14:11:40.039" level="INFO">${objectIds} = [107899]</msg> +<msg timestamp="20210602 14:11:40.039" level="INFO">${objectList} = {'objectId': 107899, 'protocolField': 'TSG_FILED_GTP_IMSI'}</msg> +<status status="PASS" starttime="20210602 14:11:39.765" endtime="20210602 14:11:40.039"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>OrangeFilter</arg> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:40.040" endtime="20210602 14:11:40.041"></status> +</kw> +<msg timestamp="20210602 14:11:40.041" level="INFO">${objectList} = {'objectId': 107899, 'protocolField': 'TSG_FILED_GTP_IMSI'}</msg> +<status status="PASS" starttime="20210602 14:11:40.040" endtime="20210602 14:11:40.042"></status> +</kw> +<msg timestamp="20210602 14:11:40.042" level="INFO">${objectIds} = [107899]</msg> +<msg timestamp="20210602 14:11:40.042" level="INFO">${objectList} = {'objectId': 107899, 'protocolField': 'TSG_FILED_GTP_IMSI'}</msg> +<status status="PASS" starttime="20210602 14:11:39.763" endtime="20210602 14:11:40.043"></status> +</kw> +<kw name="Get Length" library="BuiltIn"> +<doc>Returns and logs the length of the given item as an integer.</doc> +<arguments> +<arg>${objectIdsList}</arg> +</arguments> +<assign> +<var>${len}</var> +</assign> +<msg timestamp="20210602 14:11:40.044" level="INFO">Length is 3</msg> +<msg timestamp="20210602 14:11:40.044" level="INFO">${len} = 3</msg> +<status status="PASS" starttime="20210602 14:11:40.043" endtime="20210602 14:11:40.044"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${len} != 0</arg> +<arg>AppendListToList</arg> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectIds}</arg> +</arguments> +<assign> +<var>${objectIdsList}</var> +</assign> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:40.056" endtime="20210602 14:11:40.056"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:40.057" endtime="20210602 14:11:40.057"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = 107899" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:40.058" endtime="20210602 14:11:40.058"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:40.057" endtime="20210602 14:11:40.058"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:40.057" endtime="20210602 14:11:40.059"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:40.056" endtime="20210602 14:11:40.059"></status> +</kw> +<msg timestamp="20210602 14:11:40.059" level="INFO">${objectIdsList} = [107896, 107897, 107898, 107899]</msg> +<status status="PASS" starttime="20210602 14:11:40.044" endtime="20210602 14:11:40.060"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Append To List</arg> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Append To List</arg> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>Append To List</arg> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:40.061" endtime="20210602 14:11:40.061"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:40.060" endtime="20210602 14:11:40.061"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:39.762" endtime="20210602 14:11:40.062"></status> +</kw> +<kw name="${key} = {'protocolField': 'TSG_FILED_GTP_PHONE_NUMBER', 'objectType': 'mobile_identity', 'objectSubType': 'phone_number', 'objList': [{'addItemList': [{'keywordArray': ['123*']}, {'keywordArray': ['$123456789..." type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${key}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:40.062" level="INFO">${protocolField} = TSG_FILED_GTP_PHONE_NUMBER</msg> +<status status="PASS" starttime="20210602 14:11:40.062" endtime="20210602 14:11:40.063"></status> +</kw> +<kw name="CreateObjectList" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${key}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:40.063" endtime="20210602 14:11:40.064"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:40.064" level="INFO">${protocolField} = TSG_FILED_GTP_PHONE_NUMBER</msg> +<status status="PASS" starttime="20210602 14:11:40.064" endtime="20210602 14:11:40.064"></status> +</kw> +<kw name="CreateObjects" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:40.065" endtime="20210602 14:11:40.065"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:40.066" level="INFO">${protocolField} = TSG_FILED_GTP_PHONE_NUMBER</msg> +<status status="PASS" starttime="20210602 14:11:40.066" endtime="20210602 14:11:40.066"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objList</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:40.067" level="INFO">${objList} = [{'addItemList': [{'keywordArray': ['123*']}, {'keywordArray': ['$123456789012345']}, {'keywordArray': ['12345']}]}]</msg> +<status status="PASS" starttime="20210602 14:11:40.066" endtime="20210602 14:11:40.067"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${objJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:40.067" endtime="20210602 14:11:40.067"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objModeJson}</arg> +</arguments> +<assign> +<var>${objJson}</var> +</assign> +<msg timestamp="20210602 14:11:40.068" level="INFO">${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:40.068" endtime="20210602 14:11:40.068"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objListMode}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:40.069" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:40.068" endtime="20210602 14:11:40.069"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:40.070" endtime="20210602 14:11:40.070"></status> +</kw> +<msg timestamp="20210602 14:11:40.070" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:40.070" level="INFO">${objectType} = mobile_identity</msg> +<status status="PASS" starttime="20210602 14:11:40.069" endtime="20210602 14:11:40.070"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:40.071" endtime="20210602 14:11:40.072"></status> +</kw> +<msg timestamp="20210602 14:11:40.072" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc...</msg> +<status status="PASS" starttime="20210602 14:11:40.071" endtime="20210602 14:11:40.072"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectSubType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:40.073" endtime="20210602 14:11:40.073"></status> +</kw> +<msg timestamp="20210602 14:11:40.073" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:40.073" level="INFO">${objectSubType} = phone_number</msg> +<status status="PASS" starttime="20210602 14:11:40.072" endtime="20210602 14:11:40.074"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:40.074" endtime="20210602 14:11:40.075"></status> +</kw> +<msg timestamp="20210602 14:11:40.075" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectD...</msg> +<status status="PASS" starttime="20210602 14:11:40.074" endtime="20210602 14:11:40.075"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<msg timestamp="20210602 14:11:40.077" level="FAIL">Dictionary does not contain key 'objectId'.</msg> +<status status="FAIL" starttime="20210602 14:11:40.076" endtime="20210602 14:11:40.077"></status> +</kw> +<msg timestamp="20210602 14:11:40.077" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:40.077" level="INFO">${objectId} = Dictionary does not contain key 'objectId'.</msg> +<status status="PASS" starttime="20210602 14:11:40.076" endtime="20210602 14:11:40.078"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectId": null</arg> +<arg>"objectId":${objectId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:40.079" endtime="20210602 14:11:40.079"></status> +</kw> +<msg timestamp="20210602 14:11:40.079" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectD...</msg> +<status status="PASS" starttime="20210602 14:11:40.078" endtime="20210602 14:11:40.079"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"option": "update"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:40.080" endtime="20210602 14:11:40.080"></status> +</kw> +<msg timestamp="20210602 14:11:40.081" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectD...</msg> +<status status="PASS" starttime="20210602 14:11:40.080" endtime="20210602 14:11:40.081"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectJsonList}</var> +</assign> +<msg timestamp="20210602 14:11:40.081" level="INFO">${objectJsonList} = []</msg> +<status status="PASS" starttime="20210602 14:11:40.081" endtime="20210602 14:11:40.081"></status> +</kw> +<kw name="Evaluate" library="BuiltIn"> +<doc>Evaluates the given expression in Python and returns the results.</doc> +<arguments> +<arg>type(${objList})</arg> +</arguments> +<assign> +<var>${objListType}</var> +</assign> +<msg timestamp="20210602 14:11:40.082" level="INFO">${objListType} = <class 'list'></msg> +<status status="PASS" starttime="20210602 14:11:40.082" endtime="20210602 14:11:40.082"></status> +</kw> +<kw name="${obj} IN [ @{objList} ]" type="for"> +<kw name="${obj} = {'addItemList': [{'keywordArray': ['123*']}, {'keywordArray': ['$123456789012345']}, {'keywordArray': ['12345']}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:40.083" endtime="20210602 14:11:40.084"></status> +</kw> +<msg timestamp="20210602 14:11:40.084" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:40.084" level="INFO">${addItemList} = [{'keywordArray': ['123*']}, {'keywordArray': ['$123456789012345']}, {'keywordArray': ['12345']}]</msg> +<status status="PASS" starttime="20210602 14:11:40.083" endtime="20210602 14:11:40.084"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:40.085" level="INFO">${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["$123456789012345"]}, {"keywordArray": ["12345"]}]</msg> +<status status="PASS" starttime="20210602 14:11:40.085" endtime="20210602 14:11:40.085"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:40.086" endtime="20210602 14:11:40.086"></status> +</kw> +<msg timestamp="20210602 14:11:40.087" level="INFO">${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["$123456789012345"]}, {"keywordArray": ["12345"]}]</msg> +<status status="PASS" starttime="20210602 14:11:40.085" endtime="20210602 14:11:40.087"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:40.087" endtime="20210602 14:11:40.088"></status> +</kw> +<msg timestamp="20210602 14:11:40.088" level="INFO">${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["$123456789012345"]}, {"keywordArray": ["12345"]}]</msg> +<status status="PASS" starttime="20210602 14:11:40.087" endtime="20210602 14:11:40.089"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:40.090" endtime="20210602 14:11:40.090"></status> +</kw> +<msg timestamp="20210602 14:11:40.091" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectD...</msg> +<status status="PASS" starttime="20210602 14:11:40.089" endtime="20210602 14:11:40.091"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:40.091" level="INFO">${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectD...</msg> +<status status="PASS" starttime="20210602 14:11:40.091" endtime="20210602 14:11:40.092"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:40.092" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'mobile_identity', 'objectSubType': 'phone_number', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjec...</msg> +<status status="PASS" starttime="20210602 14:11:40.092" endtime="20210602 14:11:40.092"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:40.107" endtime="20210602 14:11:40.107"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:40.107" endtime="20210602 14:11:40.107"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'mobile_identity', 'objectSubType': 'phone_number', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObject..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:40.108" endtime="20210602 14:11:40.109"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:40.108" endtime="20210602 14:11:40.109"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:40.108" endtime="20210602 14:11:40.109"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:40.106" endtime="20210602 14:11:40.109"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:40.083" endtime="20210602 14:11:40.109"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:40.083" endtime="20210602 14:11:40.110"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>opAction=add</arg> +<arg>returnData=1</arg> +<arg>objectList=${objectJsonList}</arg> +</arguments> +<assign> +<var>${objectData}</var> +</assign> +<msg timestamp="20210602 14:11:40.110" level="INFO">${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'mobile_identity', 'objectSubType': 'phone_number', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectNam...</msg> +<status status="PASS" starttime="20210602 14:11:40.110" endtime="20210602 14:11:40.110"></status> +</kw> +<kw name="createObject" library="object"> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${rescode}</var> +<var>${objectIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${ipList}对象dict</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:40.111" endtime="20210602 14:11:40.112"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建IP</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:40.112" endtime="20210602 14:11:40.112"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${ipList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:40.113" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:40.112" endtime="20210602 14:11:40.113"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${ipList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:40.114" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "mobile_identity", "objectSubType": "phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectNam...</msg> +<status status="PASS" starttime="20210602 14:11:40.113" endtime="20210602 14:11:40.114"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${objectUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:40.115" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:40.114" endtime="20210602 14:11:40.115"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:40.116" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v1, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:40.115" endtime="20210602 14:11:40.116"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:40.117" level="INFO">POST Request using : uri=/policy/object, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "mobile_identity", "objectSubType": "phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"keywordArray": ["123*"]}, {"keywordArray": ["$123456789012345"]}, {"keywordArray": ["12345"]}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]} +json=None</msg> +<msg timestamp="20210602 14:11:41.019" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:40.116" endtime="20210602 14:11:41.020"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:41.024" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:41.022" endtime="20210602 14:11:41.025"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:41.028" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:41.027" endtime="20210602 14:11:41.028"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:41.030" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "objectList" : [ { + "addItemList" : [ { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:39", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "123" ], + "itemId" : 10074729, + "objectId" : 107900 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:39", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "123456789012345" ], + "itemId" : 10074730, + "objectId" : 107900 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:39", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "12345" ], + "itemId" : 10074731, + "objectId" : 107900 + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107900, + "objectName" : "auttest单ip指定端口", + "objectSubType" : "phone_number", + "objectType" : "mobile_identity", + "opTime" : "2021-06-02 14:11:39", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:41.031" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:41.032" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:39', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:41.029" endtime="20210602 14:11:41.032"></status> +</kw> +<msg timestamp="20210602 14:11:41.033" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:39', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:40.114" endtime="20210602 14:11:41.033"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>getObjectListIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${objectIds}</var> +</assign> +<kw name="getObjectListIds" library="process_object_body"> +<doc>获取结果中的对象ID</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>Call Get-ObjectIds</arg> +</arguments> +<msg timestamp="20210602 14:11:41.037" level="INFO">Call Get-ObjectIds</msg> +<status status="PASS" starttime="20210602 14:11:41.036" endtime="20210602 14:11:41.037"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIds}</var> +</assign> +<msg timestamp="20210602 14:11:41.038" level="INFO">${objectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:41.038" endtime="20210602 14:11:41.039"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${objectIdsTemp}</var> +</assign> +<msg timestamp="20210602 14:11:41.040" level="INFO">${objectIdsTemp} = </msg> +<status status="PASS" starttime="20210602 14:11:41.039" endtime="20210602 14:11:41.040"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${data}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.041" endtime="20210602 14:11:41.042"></status> +</kw> +<msg timestamp="20210602 14:11:41.042" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:41.043" level="INFO">${data} = {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:39', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['1...</msg> +<status status="PASS" starttime="20210602 14:11:41.041" endtime="20210602 14:11:41.043"></status> +</kw> +<kw name="Return From Keyword If" library="BuiltIn"> +<doc>Returns from the enclosing user keyword if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"=="FAIL"</arg> +<arg>${objectIdsTemp}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.043" endtime="20210602 14:11:41.044"></status> +</kw> +<kw name="${object} IN [ @{value['data']['objectList']} ]" type="for"> +<kw name="${object} = {'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:39', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['123'], 'itemId': ..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.045" endtime="20210602 14:11:41.046"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.045" endtime="20210602 14:11:41.046"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.044" endtime="20210602 14:11:41.046"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.035" endtime="20210602 14:11:41.047"></status> +</kw> +<msg timestamp="20210602 14:11:41.047" level="INFO">${objectIds} = [107900]</msg> +<status status="PASS" starttime="20210602 14:11:41.034" endtime="20210602 14:11:41.047"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:41.048" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:41.047" endtime="20210602 14:11:41.048"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:41.049" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:41.049" endtime="20210602 14:11:41.049"></status> +</kw> +<msg timestamp="20210602 14:11:41.050" level="INFO">${rescode} = 200</msg> +<msg timestamp="20210602 14:11:41.050" level="INFO">${objectIds} = [107900]</msg> +<status status="PASS" starttime="20210602 14:11:40.111" endtime="20210602 14:11:41.050"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:41.051" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:41.050" endtime="20210602 14:11:41.051"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${protocolField}</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${protocolField}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.052" endtime="20210602 14:11:41.052"></status> +</kw> +<msg timestamp="20210602 14:11:41.053" level="INFO">${protocolField} = TSG_FILED_GTP_PHONE_NUMBER</msg> +<status status="PASS" starttime="20210602 14:11:41.051" endtime="20210602 14:11:41.053"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectsList}</var> +</assign> +<msg timestamp="20210602 14:11:41.053" level="INFO">${objectsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:41.053" endtime="20210602 14:11:41.054"></status> +</kw> +<kw name="${obj} IN [ @{objectIds} ]" type="for"> +<kw name="${obj} = 107900" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:41.055" level="INFO">${objectList} = {'objectId': 107900, 'protocolField': 'TSG_FILED_GTP_PHONE_NUMBER'}</msg> +<status status="PASS" starttime="20210602 14:11:41.054" endtime="20210602 14:11:41.055"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.055" endtime="20210602 14:11:41.056"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.054" endtime="20210602 14:11:41.056"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.054" endtime="20210602 14:11:41.056"></status> +</kw> +<msg timestamp="20210602 14:11:41.057" level="INFO">${objectIds} = [107900]</msg> +<msg timestamp="20210602 14:11:41.057" level="INFO">${objectList} = {'objectId': 107900, 'protocolField': 'TSG_FILED_GTP_PHONE_NUMBER'}</msg> +<status status="PASS" starttime="20210602 14:11:40.065" endtime="20210602 14:11:41.057"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>OrangeFilter</arg> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.058" endtime="20210602 14:11:41.058"></status> +</kw> +<msg timestamp="20210602 14:11:41.059" level="INFO">${objectList} = {'objectId': 107900, 'protocolField': 'TSG_FILED_GTP_PHONE_NUMBER'}</msg> +<status status="PASS" starttime="20210602 14:11:41.057" endtime="20210602 14:11:41.059"></status> +</kw> +<msg timestamp="20210602 14:11:41.059" level="INFO">${objectIds} = [107900]</msg> +<msg timestamp="20210602 14:11:41.059" level="INFO">${objectList} = {'objectId': 107900, 'protocolField': 'TSG_FILED_GTP_PHONE_NUMBER'}</msg> +<status status="PASS" starttime="20210602 14:11:40.063" endtime="20210602 14:11:41.059"></status> +</kw> +<kw name="Get Length" library="BuiltIn"> +<doc>Returns and logs the length of the given item as an integer.</doc> +<arguments> +<arg>${objectIdsList}</arg> +</arguments> +<assign> +<var>${len}</var> +</assign> +<msg timestamp="20210602 14:11:41.060" level="INFO">Length is 4</msg> +<msg timestamp="20210602 14:11:41.060" level="INFO">${len} = 4</msg> +<status status="PASS" starttime="20210602 14:11:41.060" endtime="20210602 14:11:41.060"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${len} != 0</arg> +<arg>AppendListToList</arg> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectIds}</arg> +</arguments> +<assign> +<var>${objectIdsList}</var> +</assign> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.074" endtime="20210602 14:11:41.074"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.075" endtime="20210602 14:11:41.075"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = 107900" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.076" endtime="20210602 14:11:41.076"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.075" endtime="20210602 14:11:41.076"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.075" endtime="20210602 14:11:41.077"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.073" endtime="20210602 14:11:41.077"></status> +</kw> +<msg timestamp="20210602 14:11:41.077" level="INFO">${objectIdsList} = [107896, 107897, 107898, 107899, 107900]</msg> +<status status="PASS" starttime="20210602 14:11:41.061" endtime="20210602 14:11:41.077"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Append To List</arg> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Append To List</arg> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>Append To List</arg> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.078" endtime="20210602 14:11:41.079"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.077" endtime="20210602 14:11:41.079"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:40.062" endtime="20210602 14:11:41.079"></status> +</kw> +<kw name="${key} = {'protocolField': 'TSG_FILED_GTP_APN', 'objectType': 'apn', 'objectSubType': '', 'objList': [{'addItemList': [{'keywordArray': ['*uawei.org']}, {'keywordArray': ['$huawei.com']}, {'keywordArray': ['$w..." type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${key}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:41.080" level="INFO">${protocolField} = TSG_FILED_GTP_APN</msg> +<status status="PASS" starttime="20210602 14:11:41.080" endtime="20210602 14:11:41.080"></status> +</kw> +<kw name="CreateObjectList" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${key}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.081" endtime="20210602 14:11:41.081"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:41.082" level="INFO">${protocolField} = TSG_FILED_GTP_APN</msg> +<status status="PASS" starttime="20210602 14:11:41.081" endtime="20210602 14:11:41.082"></status> +</kw> +<kw name="CreateObjects" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.083" endtime="20210602 14:11:41.083"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:41.083" level="INFO">${protocolField} = TSG_FILED_GTP_APN</msg> +<status status="PASS" starttime="20210602 14:11:41.083" endtime="20210602 14:11:41.084"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objList</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:41.084" level="INFO">${objList} = [{'addItemList': [{'keywordArray': ['*uawei.org']}, {'keywordArray': ['$huawei.com']}, {'keywordArray': ['$www.huawei.com']}]}]</msg> +<status status="PASS" starttime="20210602 14:11:41.084" endtime="20210602 14:11:41.084"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${objJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.085" endtime="20210602 14:11:41.085"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objModeJson}</arg> +</arguments> +<assign> +<var>${objJson}</var> +</assign> +<msg timestamp="20210602 14:11:41.086" level="INFO">${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:41.086" endtime="20210602 14:11:41.086"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objListMode}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:41.087" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:41.087" endtime="20210602 14:11:41.087"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.088" endtime="20210602 14:11:41.088"></status> +</kw> +<msg timestamp="20210602 14:11:41.088" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:41.088" level="INFO">${objectType} = apn</msg> +<status status="PASS" starttime="20210602 14:11:41.087" endtime="20210602 14:11:41.089"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.089" endtime="20210602 14:11:41.090"></status> +</kw> +<msg timestamp="20210602 14:11:41.090" level="INFO">${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:41.089" endtime="20210602 14:11:41.090"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectSubType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.091" endtime="20210602 14:11:41.091"></status> +</kw> +<msg timestamp="20210602 14:11:41.091" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:41.091" level="INFO">${objectSubType} = </msg> +<status status="PASS" starttime="20210602 14:11:41.090" endtime="20210602 14:11:41.092"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.093" endtime="20210602 14:11:41.093"></status> +</kw> +<msg timestamp="20210602 14:11:41.093" level="INFO">${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...</msg> +<status status="PASS" starttime="20210602 14:11:41.092" endtime="20210602 14:11:41.093"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<msg timestamp="20210602 14:11:41.094" level="FAIL">Dictionary does not contain key 'objectId'.</msg> +<status status="FAIL" starttime="20210602 14:11:41.094" endtime="20210602 14:11:41.095"></status> +</kw> +<msg timestamp="20210602 14:11:41.095" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:41.095" level="INFO">${objectId} = Dictionary does not contain key 'objectId'.</msg> +<status status="PASS" starttime="20210602 14:11:41.094" endtime="20210602 14:11:41.096"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectId": null</arg> +<arg>"objectId":${objectId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.096" endtime="20210602 14:11:41.097"></status> +</kw> +<msg timestamp="20210602 14:11:41.097" level="INFO">${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...</msg> +<status status="PASS" starttime="20210602 14:11:41.096" endtime="20210602 14:11:41.097"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"option": "update"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.098" endtime="20210602 14:11:41.098"></status> +</kw> +<msg timestamp="20210602 14:11:41.098" level="INFO">${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...</msg> +<status status="PASS" starttime="20210602 14:11:41.097" endtime="20210602 14:11:41.099"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectJsonList}</var> +</assign> +<msg timestamp="20210602 14:11:41.099" level="INFO">${objectJsonList} = []</msg> +<status status="PASS" starttime="20210602 14:11:41.099" endtime="20210602 14:11:41.099"></status> +</kw> +<kw name="Evaluate" library="BuiltIn"> +<doc>Evaluates the given expression in Python and returns the results.</doc> +<arguments> +<arg>type(${objList})</arg> +</arguments> +<assign> +<var>${objListType}</var> +</assign> +<msg timestamp="20210602 14:11:41.100" level="INFO">${objListType} = <class 'list'></msg> +<status status="PASS" starttime="20210602 14:11:41.099" endtime="20210602 14:11:41.101"></status> +</kw> +<kw name="${obj} IN [ @{objList} ]" type="for"> +<kw name="${obj} = {'addItemList': [{'keywordArray': ['*uawei.org']}, {'keywordArray': ['$huawei.com']}, {'keywordArray': ['$www.huawei.com']}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.102" endtime="20210602 14:11:41.102"></status> +</kw> +<msg timestamp="20210602 14:11:41.102" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:41.102" level="INFO">${addItemList} = [{'keywordArray': ['*uawei.org']}, {'keywordArray': ['$huawei.com']}, {'keywordArray': ['$www.huawei.com']}]</msg> +<status status="PASS" starttime="20210602 14:11:41.101" endtime="20210602 14:11:41.102"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:41.103" level="INFO">${addItemList} = [{"keywordArray": ["*uawei.org"]}, {"keywordArray": ["$huawei.com"]}, {"keywordArray": ["$www.huawei.com"]}]</msg> +<status status="PASS" starttime="20210602 14:11:41.103" endtime="20210602 14:11:41.103"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.104" endtime="20210602 14:11:41.104"></status> +</kw> +<msg timestamp="20210602 14:11:41.105" level="INFO">${addItemList} = [{"keywordArray": ["*uawei.org"]}, {"keywordArray": ["$huawei.com"]}, {"keywordArray": ["$www.huawei.com"]}]</msg> +<status status="PASS" starttime="20210602 14:11:41.103" endtime="20210602 14:11:41.105"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.105" endtime="20210602 14:11:41.106"></status> +</kw> +<msg timestamp="20210602 14:11:41.106" level="INFO">${addItemList} = [{"keywordArray": ["*uawei.org"]}, {"keywordArray": ["$huawei.com"]}, {"keywordArray": ["$www.huawei.com"]}]</msg> +<status status="PASS" starttime="20210602 14:11:41.105" endtime="20210602 14:11:41.106"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.107" endtime="20210602 14:11:41.107"></status> +</kw> +<msg timestamp="20210602 14:11:41.108" level="INFO">${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...</msg> +<status status="PASS" starttime="20210602 14:11:41.106" endtime="20210602 14:11:41.108"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:41.108" level="INFO">${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...</msg> +<status status="PASS" starttime="20210602 14:11:41.108" endtime="20210602 14:11:41.109"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:41.109" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'apn', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addItemList'...</msg> +<status status="PASS" starttime="20210602 14:11:41.109" endtime="20210602 14:11:41.109"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.120" endtime="20210602 14:11:41.120"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.120" endtime="20210602 14:11:41.121"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'apn', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addItemList':..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.121" endtime="20210602 14:11:41.122"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.121" endtime="20210602 14:11:41.122"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.121" endtime="20210602 14:11:41.122"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.119" endtime="20210602 14:11:41.123"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.101" endtime="20210602 14:11:41.123"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.101" endtime="20210602 14:11:41.123"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>opAction=add</arg> +<arg>returnData=1</arg> +<arg>objectList=${objectJsonList}</arg> +</arguments> +<assign> +<var>${objectData}</var> +</assign> +<msg timestamp="20210602 14:11:41.124" level="INFO">${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'apn', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'o...</msg> +<status status="PASS" starttime="20210602 14:11:41.123" endtime="20210602 14:11:41.124"></status> +</kw> +<kw name="createObject" library="object"> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${rescode}</var> +<var>${objectIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${ipList}对象dict</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.125" endtime="20210602 14:11:41.125"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建IP</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.125" endtime="20210602 14:11:41.126"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${ipList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:41.126" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:41.126" endtime="20210602 14:11:41.126"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${ipList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:41.127" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "apn", "objectSubType": "", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u63...</msg> +<status status="PASS" starttime="20210602 14:11:41.127" endtime="20210602 14:11:41.127"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${objectUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:41.128" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:41.128" endtime="20210602 14:11:41.128"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:41.129" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v1, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:41.129" endtime="20210602 14:11:41.130"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:41.130" level="INFO">POST Request using : uri=/policy/object, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "apn", "objectSubType": "", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"keywordArray": ["*uawei.org"]}, {"keywordArray": ["$huawei.com"]}, {"keywordArray": ["$www.huawei.com"]}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]} +json=None</msg> +<msg timestamp="20210602 14:11:41.250" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:41.130" endtime="20210602 14:11:41.250"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:41.251" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:41.250" endtime="20210602 14:11:41.251"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:41.251" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:41.251" endtime="20210602 14:11:41.252"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:41.252" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "objectList" : [ { + "addItemList" : [ { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:40", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "uawei.org" ], + "itemId" : 10074732, + "objectId" : 107901 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:40", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "huawei.com" ], + "itemId" : 10074733, + "objectId" : 107901 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:40", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "www.huawei.com" ], + "itemId" : 10074734, + "objectId" : 107901 + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107901, + "objectName" : "auttest单ip指定端口", + "objectType" : "apn", + "opTime" : "2021-06-02 14:11:40", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:41.253" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:41.253" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:40', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:41.252" endtime="20210602 14:11:41.253"></status> +</kw> +<msg timestamp="20210602 14:11:41.253" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:40', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:41.127" endtime="20210602 14:11:41.253"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>getObjectListIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${objectIds}</var> +</assign> +<kw name="getObjectListIds" library="process_object_body"> +<doc>获取结果中的对象ID</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>Call Get-ObjectIds</arg> +</arguments> +<msg timestamp="20210602 14:11:41.255" level="INFO">Call Get-ObjectIds</msg> +<status status="PASS" starttime="20210602 14:11:41.255" endtime="20210602 14:11:41.255"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIds}</var> +</assign> +<msg timestamp="20210602 14:11:41.256" level="INFO">${objectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:41.255" endtime="20210602 14:11:41.256"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${objectIdsTemp}</var> +</assign> +<msg timestamp="20210602 14:11:41.256" level="INFO">${objectIdsTemp} = </msg> +<status status="PASS" starttime="20210602 14:11:41.256" endtime="20210602 14:11:41.256"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${data}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.257" endtime="20210602 14:11:41.257"></status> +</kw> +<msg timestamp="20210602 14:11:41.258" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:41.258" level="INFO">${data} = {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:40', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['u...</msg> +<status status="PASS" starttime="20210602 14:11:41.257" endtime="20210602 14:11:41.258"></status> +</kw> +<kw name="Return From Keyword If" library="BuiltIn"> +<doc>Returns from the enclosing user keyword if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"=="FAIL"</arg> +<arg>${objectIdsTemp}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.258" endtime="20210602 14:11:41.259"></status> +</kw> +<kw name="${object} IN [ @{value['data']['objectList']} ]" type="for"> +<kw name="${object} = {'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:40', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['uawei.org'], 'ite..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.259" endtime="20210602 14:11:41.260"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.259" endtime="20210602 14:11:41.260"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.259" endtime="20210602 14:11:41.260"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.254" endtime="20210602 14:11:41.260"></status> +</kw> +<msg timestamp="20210602 14:11:41.261" level="INFO">${objectIds} = [107901]</msg> +<status status="PASS" starttime="20210602 14:11:41.254" endtime="20210602 14:11:41.261"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:41.261" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:41.261" endtime="20210602 14:11:41.262"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:41.262" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:41.262" endtime="20210602 14:11:41.262"></status> +</kw> +<msg timestamp="20210602 14:11:41.263" level="INFO">${rescode} = 200</msg> +<msg timestamp="20210602 14:11:41.263" level="INFO">${objectIds} = [107901]</msg> +<status status="PASS" starttime="20210602 14:11:41.124" endtime="20210602 14:11:41.263"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:41.263" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:41.263" endtime="20210602 14:11:41.264"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${protocolField}</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${protocolField}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.264" endtime="20210602 14:11:41.265"></status> +</kw> +<msg timestamp="20210602 14:11:41.265" level="INFO">${protocolField} = TSG_FILED_GTP_APN</msg> +<status status="PASS" starttime="20210602 14:11:41.264" endtime="20210602 14:11:41.265"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectsList}</var> +</assign> +<msg timestamp="20210602 14:11:41.266" level="INFO">${objectsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:41.265" endtime="20210602 14:11:41.266"></status> +</kw> +<kw name="${obj} IN [ @{objectIds} ]" type="for"> +<kw name="${obj} = 107901" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:41.267" level="INFO">${objectList} = {'objectId': 107901, 'protocolField': 'TSG_FILED_GTP_APN'}</msg> +<status status="PASS" starttime="20210602 14:11:41.266" endtime="20210602 14:11:41.267"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.267" endtime="20210602 14:11:41.268"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.266" endtime="20210602 14:11:41.268"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.266" endtime="20210602 14:11:41.268"></status> +</kw> +<msg timestamp="20210602 14:11:41.268" level="INFO">${objectIds} = [107901]</msg> +<msg timestamp="20210602 14:11:41.269" level="INFO">${objectList} = {'objectId': 107901, 'protocolField': 'TSG_FILED_GTP_APN'}</msg> +<status status="PASS" starttime="20210602 14:11:41.082" endtime="20210602 14:11:41.269"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>OrangeFilter</arg> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.270" endtime="20210602 14:11:41.270"></status> +</kw> +<msg timestamp="20210602 14:11:41.270" level="INFO">${objectList} = {'objectId': 107901, 'protocolField': 'TSG_FILED_GTP_APN'}</msg> +<status status="PASS" starttime="20210602 14:11:41.269" endtime="20210602 14:11:41.271"></status> +</kw> +<msg timestamp="20210602 14:11:41.271" level="INFO">${objectIds} = [107901]</msg> +<msg timestamp="20210602 14:11:41.271" level="INFO">${objectList} = {'objectId': 107901, 'protocolField': 'TSG_FILED_GTP_APN'}</msg> +<status status="PASS" starttime="20210602 14:11:41.080" endtime="20210602 14:11:41.271"></status> +</kw> +<kw name="Get Length" library="BuiltIn"> +<doc>Returns and logs the length of the given item as an integer.</doc> +<arguments> +<arg>${objectIdsList}</arg> +</arguments> +<assign> +<var>${len}</var> +</assign> +<msg timestamp="20210602 14:11:41.272" level="INFO">Length is 5</msg> +<msg timestamp="20210602 14:11:41.272" level="INFO">${len} = 5</msg> +<status status="PASS" starttime="20210602 14:11:41.271" endtime="20210602 14:11:41.272"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${len} != 0</arg> +<arg>AppendListToList</arg> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectIds}</arg> +</arguments> +<assign> +<var>${objectIdsList}</var> +</assign> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.284" endtime="20210602 14:11:41.284"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.285" endtime="20210602 14:11:41.285"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = 107901" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.285" endtime="20210602 14:11:41.286"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.285" endtime="20210602 14:11:41.286"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.285" endtime="20210602 14:11:41.286"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.283" endtime="20210602 14:11:41.286"></status> +</kw> +<msg timestamp="20210602 14:11:41.287" level="INFO">${objectIdsList} = [107896, 107897, 107898, 107899, 107900, 107901]</msg> +<status status="PASS" starttime="20210602 14:11:41.272" endtime="20210602 14:11:41.287"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Append To List</arg> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Append To List</arg> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>Append To List</arg> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.288" endtime="20210602 14:11:41.288"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.287" endtime="20210602 14:11:41.288"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.079" endtime="20210602 14:11:41.288"></status> +</kw> +<kw name="${key} = {'protocolField': 'TSG_SECURITY_SOURCE_ADDR', 'objectType': 'ip', 'objectSubType': 'ip_learning', 'objList': [{'addItemList': [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', ..." type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${key}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:41.289" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:41.289" endtime="20210602 14:11:41.289"></status> +</kw> +<kw name="CreateObjectList" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${key}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.290" endtime="20210602 14:11:41.291"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:41.291" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:41.291" endtime="20210602 14:11:41.291"></status> +</kw> +<kw name="CreateObjects" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.292" endtime="20210602 14:11:41.292"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:41.293" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:41.293" endtime="20210602 14:11:41.293"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objList</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:41.294" level="INFO">${objList} = [{'addItemList': [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'learningDepth': '2', 'agingTime': '12', 'voteClientNum': '10', 'learnedIpLimit': '1000'}]}]</msg> +<status status="PASS" starttime="20210602 14:11:41.293" endtime="20210602 14:11:41.294"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${objJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.294" endtime="20210602 14:11:41.294"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objModeJson}</arg> +</arguments> +<assign> +<var>${objJson}</var> +</assign> +<msg timestamp="20210602 14:11:41.295" level="INFO">${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:41.295" endtime="20210602 14:11:41.295"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objListMode}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:41.296" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:41.295" endtime="20210602 14:11:41.296"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.297" endtime="20210602 14:11:41.297"></status> +</kw> +<msg timestamp="20210602 14:11:41.297" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:41.297" level="INFO">${objectType} = ip</msg> +<status status="PASS" starttime="20210602 14:11:41.296" endtime="20210602 14:11:41.297"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.298" endtime="20210602 14:11:41.298"></status> +</kw> +<msg timestamp="20210602 14:11:41.299" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "s...</msg> +<status status="PASS" starttime="20210602 14:11:41.298" endtime="20210602 14:11:41.299"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectSubType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.299" endtime="20210602 14:11:41.300"></status> +</kw> +<msg timestamp="20210602 14:11:41.300" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:41.300" level="INFO">${objectSubType} = ip_learning</msg> +<status status="PASS" starttime="20210602 14:11:41.299" endtime="20210602 14:11:41.300"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.301" endtime="20210602 14:11:41.302"></status> +</kw> +<msg timestamp="20210602 14:11:41.302" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", ...</msg> +<status status="PASS" starttime="20210602 14:11:41.300" endtime="20210602 14:11:41.302"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<msg timestamp="20210602 14:11:41.303" level="FAIL">Dictionary does not contain key 'objectId'.</msg> +<status status="FAIL" starttime="20210602 14:11:41.303" endtime="20210602 14:11:41.303"></status> +</kw> +<msg timestamp="20210602 14:11:41.303" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:41.304" level="INFO">${objectId} = Dictionary does not contain key 'objectId'.</msg> +<status status="PASS" starttime="20210602 14:11:41.302" endtime="20210602 14:11:41.304"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectId": null</arg> +<arg>"objectId":${objectId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.305" endtime="20210602 14:11:41.305"></status> +</kw> +<msg timestamp="20210602 14:11:41.305" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", ...</msg> +<status status="PASS" starttime="20210602 14:11:41.304" endtime="20210602 14:11:41.305"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"option": "update"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.306" endtime="20210602 14:11:41.306"></status> +</kw> +<msg timestamp="20210602 14:11:41.307" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", ...</msg> +<status status="PASS" starttime="20210602 14:11:41.306" endtime="20210602 14:11:41.307"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectJsonList}</var> +</assign> +<msg timestamp="20210602 14:11:41.307" level="INFO">${objectJsonList} = []</msg> +<status status="PASS" starttime="20210602 14:11:41.307" endtime="20210602 14:11:41.307"></status> +</kw> +<kw name="Evaluate" library="BuiltIn"> +<doc>Evaluates the given expression in Python and returns the results.</doc> +<arguments> +<arg>type(${objList})</arg> +</arguments> +<assign> +<var>${objListType}</var> +</assign> +<msg timestamp="20210602 14:11:41.308" level="INFO">${objListType} = <class 'list'></msg> +<status status="PASS" starttime="20210602 14:11:41.308" endtime="20210602 14:11:41.308"></status> +</kw> +<kw name="${obj} IN [ @{objList} ]" type="for"> +<kw name="${obj} = {'addItemList': [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'learningDepth': '2', 'agingTime': '12', 'voteClientNum': '10', 'learnedIpLimit': '1000'}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.310" endtime="20210602 14:11:41.310"></status> +</kw> +<msg timestamp="20210602 14:11:41.310" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:41.310" level="INFO">${addItemList} = [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'learningDepth': '2', 'agingTime': '12', 'voteClientNum': '10', 'learnedIpLimit': '1000'}]</msg> +<status status="PASS" starttime="20210602 14:11:41.309" endtime="20210602 14:11:41.310"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:41.311" level="INFO">${addItemList} = [{"fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"}]</msg> +<status status="PASS" starttime="20210602 14:11:41.311" endtime="20210602 14:11:41.311"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.312" endtime="20210602 14:11:41.312"></status> +</kw> +<msg timestamp="20210602 14:11:41.312" level="INFO">${addItemList} = "fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"}]</msg> +<status status="PASS" starttime="20210602 14:11:41.311" endtime="20210602 14:11:41.313"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.313" endtime="20210602 14:11:41.314"></status> +</kw> +<msg timestamp="20210602 14:11:41.314" level="INFO">${addItemList} = "fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"</msg> +<status status="PASS" starttime="20210602 14:11:41.313" endtime="20210602 14:11:41.314"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.315" endtime="20210602 14:11:41.315"></status> +</kw> +<msg timestamp="20210602 14:11:41.316" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", ...</msg> +<status status="PASS" starttime="20210602 14:11:41.314" endtime="20210602 14:11:41.316"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:41.316" level="INFO">${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", ...</msg> +<status status="PASS" starttime="20210602 14:11:41.316" endtime="20210602 14:11:41.317"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:41.317" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'ip_learning', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'ad...</msg> +<status status="PASS" starttime="20210602 14:11:41.317" endtime="20210602 14:11:41.317"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.329" endtime="20210602 14:11:41.329"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.330" endtime="20210602 14:11:41.330"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'ip', 'objectSubType': 'ip_learning', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'add..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.331" endtime="20210602 14:11:41.331"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.331" endtime="20210602 14:11:41.331"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.330" endtime="20210602 14:11:41.332"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.328" endtime="20210602 14:11:41.332"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.309" endtime="20210602 14:11:41.332"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.309" endtime="20210602 14:11:41.332"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>opAction=add</arg> +<arg>returnData=1</arg> +<arg>objectList=${objectJsonList}</arg> +</arguments> +<assign> +<var>${objectData}</var> +</assign> +<msg timestamp="20210602 14:11:41.333" level="INFO">${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'ip_learning', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单i...</msg> +<status status="PASS" starttime="20210602 14:11:41.332" endtime="20210602 14:11:41.333"></status> +</kw> +<kw name="createObject" library="object"> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${rescode}</var> +<var>${objectIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${ipList}对象dict</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.334" endtime="20210602 14:11:41.334"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建IP</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.335" endtime="20210602 14:11:41.335"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${ipList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:41.336" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:41.335" endtime="20210602 14:11:41.336"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${ipList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:41.336" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u...</msg> +<status status="PASS" starttime="20210602 14:11:41.336" endtime="20210602 14:11:41.336"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${objectUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:41.338" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:41.337" endtime="20210602 14:11:41.338"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:41.339" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v1, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:41.338" endtime="20210602 14:11:41.339"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:41.340" level="INFO">POST Request using : uri=/policy/object, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [], "fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000", "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]} +json=None</msg> +<msg timestamp="20210602 14:11:41.370" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:41.339" endtime="20210602 14:11:41.370"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:41.371" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:41.370" endtime="20210602 14:11:41.371"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:41.372" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:41.371" endtime="20210602 14:11:41.372"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:41.373" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "objectList" : [ { + "addItemList" : [ ], + "agingTime" : 12, + "deleteItemIds" : [ ], + "fromFqdns" : [ "$www.baidu.com", "*jd.com" ], + "fromProtocol" : "HTTP,SSL", + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "learnedIpLimit" : 1000, + "learningDepth" : "2", + "memberType" : 3, + "objectDesc" : "test", + "objectId" : 107902, + "objectName" : "auttest单ip指定端口", + "objectSubType" : "ip_learning", + "objectType" : "ip", + "opTime" : "2021-06-02 14:11:40", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ], + "voteClientNum" : 10 + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:41.373" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:41.373" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '...</msg> +<status status="PASS" starttime="20210602 14:11:41.373" endtime="20210602 14:11:41.373"></status> +</kw> +<msg timestamp="20210602 14:11:41.374" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '...</msg> +<status status="PASS" starttime="20210602 14:11:41.337" endtime="20210602 14:11:41.374"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>getObjectListIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${objectIds}</var> +</assign> +<kw name="getObjectListIds" library="process_object_body"> +<doc>获取结果中的对象ID</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>Call Get-ObjectIds</arg> +</arguments> +<msg timestamp="20210602 14:11:41.375" level="INFO">Call Get-ObjectIds</msg> +<status status="PASS" starttime="20210602 14:11:41.375" endtime="20210602 14:11:41.376"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIds}</var> +</assign> +<msg timestamp="20210602 14:11:41.376" level="INFO">${objectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:41.376" endtime="20210602 14:11:41.376"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${objectIdsTemp}</var> +</assign> +<msg timestamp="20210602 14:11:41.377" level="INFO">${objectIdsTemp} = </msg> +<status status="PASS" starttime="20210602 14:11:41.377" endtime="20210602 14:11:41.377"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${data}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.378" endtime="20210602 14:11:41.378"></status> +</kw> +<msg timestamp="20210602 14:11:41.378" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:41.379" level="INFO">${data} = {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '#31739C', 'isDisplay': None, 'isExclusio...</msg> +<status status="PASS" starttime="20210602 14:11:41.377" endtime="20210602 14:11:41.379"></status> +</kw> +<kw name="Return From Keyword If" library="BuiltIn"> +<doc>Returns from the enclosing user keyword if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"=="FAIL"</arg> +<arg>${objectIdsTemp}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.379" endtime="20210602 14:11:41.379"></status> +</kw> +<kw name="${object} IN [ @{value['data']['objectList']} ]" type="for"> +<kw name="${object} = {'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '#31739C', 'isDisplay': None, 'isExclusion': 0, 'isInitia..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.380" endtime="20210602 14:11:41.381"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.380" endtime="20210602 14:11:41.381"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.380" endtime="20210602 14:11:41.381"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.375" endtime="20210602 14:11:41.381"></status> +</kw> +<msg timestamp="20210602 14:11:41.381" level="INFO">${objectIds} = [107902]</msg> +<status status="PASS" starttime="20210602 14:11:41.374" endtime="20210602 14:11:41.381"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:41.382" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:41.382" endtime="20210602 14:11:41.382"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:41.383" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:41.383" endtime="20210602 14:11:41.383"></status> +</kw> +<msg timestamp="20210602 14:11:41.383" level="INFO">${rescode} = 200</msg> +<msg timestamp="20210602 14:11:41.384" level="INFO">${objectIds} = [107902]</msg> +<status status="PASS" starttime="20210602 14:11:41.333" endtime="20210602 14:11:41.384"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:41.384" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:41.384" endtime="20210602 14:11:41.384"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${protocolField}</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${protocolField}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.385" endtime="20210602 14:11:41.386"></status> +</kw> +<msg timestamp="20210602 14:11:41.386" level="INFO">${protocolField} = TSG_SECURITY_SOURCE_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:41.385" endtime="20210602 14:11:41.386"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectsList}</var> +</assign> +<msg timestamp="20210602 14:11:41.386" level="INFO">${objectsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:41.386" endtime="20210602 14:11:41.387"></status> +</kw> +<kw name="${obj} IN [ @{objectIds} ]" type="for"> +<kw name="${obj} = 107902" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:41.388" level="INFO">${objectList} = {'objectId': 107902, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:41.387" endtime="20210602 14:11:41.388"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.388" endtime="20210602 14:11:41.389"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.387" endtime="20210602 14:11:41.389"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.387" endtime="20210602 14:11:41.389"></status> +</kw> +<msg timestamp="20210602 14:11:41.389" level="INFO">${objectIds} = [107902]</msg> +<msg timestamp="20210602 14:11:41.390" level="INFO">${objectList} = {'objectId': 107902, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:41.292" endtime="20210602 14:11:41.390"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>OrangeFilter</arg> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.391" endtime="20210602 14:11:41.391"></status> +</kw> +<msg timestamp="20210602 14:11:41.391" level="INFO">${objectList} = {'objectId': 107902, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:41.390" endtime="20210602 14:11:41.391"></status> +</kw> +<msg timestamp="20210602 14:11:41.392" level="INFO">${objectIds} = [107902]</msg> +<msg timestamp="20210602 14:11:41.392" level="INFO">${objectList} = {'objectId': 107902, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:41.290" endtime="20210602 14:11:41.392"></status> +</kw> +<kw name="Get Length" library="BuiltIn"> +<doc>Returns and logs the length of the given item as an integer.</doc> +<arguments> +<arg>${objectIdsList}</arg> +</arguments> +<assign> +<var>${len}</var> +</assign> +<msg timestamp="20210602 14:11:41.393" level="INFO">Length is 6</msg> +<msg timestamp="20210602 14:11:41.393" level="INFO">${len} = 6</msg> +<status status="PASS" starttime="20210602 14:11:41.392" endtime="20210602 14:11:41.393"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${len} != 0</arg> +<arg>AppendListToList</arg> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectIds}</arg> +</arguments> +<assign> +<var>${objectIdsList}</var> +</assign> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.404" endtime="20210602 14:11:41.405"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.405" endtime="20210602 14:11:41.405"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = 107902" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.406" endtime="20210602 14:11:41.406"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.406" endtime="20210602 14:11:41.407"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.406" endtime="20210602 14:11:41.407"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.404" endtime="20210602 14:11:41.407"></status> +</kw> +<msg timestamp="20210602 14:11:41.407" level="INFO">${objectIdsList} = [107896, 107897, 107898, 107899, 107900, 107901, 107902]</msg> +<status status="PASS" starttime="20210602 14:11:41.393" endtime="20210602 14:11:41.407"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Append To List</arg> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Append To List</arg> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>Append To List</arg> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.409" endtime="20210602 14:11:41.409"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.408" endtime="20210602 14:11:41.409"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.289" endtime="20210602 14:11:41.409"></status> +</kw> +<kw name="${key} = {'protocolField': 'TSG_SECURITY_DESTINATION_ADDR', 'objList': [{'addItemList': [{'ip': '255.255.255.254', 'port': '65535'}, {'ip': '255.255.255.254', 'port': '1'}]}]}" type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${key}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:41.410" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:41.410" endtime="20210602 14:11:41.410"></status> +</kw> +<kw name="CreateObjectList" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${key}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.411" endtime="20210602 14:11:41.411"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:41.412" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:41.412" endtime="20210602 14:11:41.412"></status> +</kw> +<kw name="CreateObjects" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.413" endtime="20210602 14:11:41.413"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:41.414" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:41.414" endtime="20210602 14:11:41.414"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objList</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:41.415" level="INFO">${objList} = [{'addItemList': [{'ip': '255.255.255.254', 'port': '65535'}, {'ip': '255.255.255.254', 'port': '1'}]}]</msg> +<status status="PASS" starttime="20210602 14:11:41.414" endtime="20210602 14:11:41.415"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${objJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.415" endtime="20210602 14:11:41.415"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objModeJson}</arg> +</arguments> +<assign> +<var>${objJson}</var> +</assign> +<msg timestamp="20210602 14:11:41.416" level="INFO">${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:41.415" endtime="20210602 14:11:41.416"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objListMode}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:41.416" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:41.416" endtime="20210602 14:11:41.417"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<msg timestamp="20210602 14:11:41.418" level="FAIL">Dictionary does not contain key 'objectType'.</msg> +<status status="FAIL" starttime="20210602 14:11:41.417" endtime="20210602 14:11:41.418"></status> +</kw> +<msg timestamp="20210602 14:11:41.418" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:41.418" level="INFO">${objectType} = Dictionary does not contain key 'objectType'.</msg> +<status status="PASS" starttime="20210602 14:11:41.417" endtime="20210602 14:11:41.418"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.419" endtime="20210602 14:11:41.420"></status> +</kw> +<msg timestamp="20210602 14:11:41.420" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:41.419" endtime="20210602 14:11:41.420"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectSubType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<msg timestamp="20210602 14:11:41.421" level="FAIL">Dictionary does not contain key 'objectSubType'.</msg> +<status status="FAIL" starttime="20210602 14:11:41.421" endtime="20210602 14:11:41.421"></status> +</kw> +<msg timestamp="20210602 14:11:41.421" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:41.422" level="INFO">${objectSubType} = Dictionary does not contain key 'objectSubType'.</msg> +<status status="PASS" starttime="20210602 14:11:41.420" endtime="20210602 14:11:41.422"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.423" endtime="20210602 14:11:41.423"></status> +</kw> +<msg timestamp="20210602 14:11:41.423" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:41.422" endtime="20210602 14:11:41.423"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<msg timestamp="20210602 14:11:41.425" level="FAIL">Dictionary does not contain key 'objectId'.</msg> +<status status="FAIL" starttime="20210602 14:11:41.424" endtime="20210602 14:11:41.425"></status> +</kw> +<msg timestamp="20210602 14:11:41.425" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:41.425" level="INFO">${objectId} = Dictionary does not contain key 'objectId'.</msg> +<status status="PASS" starttime="20210602 14:11:41.424" endtime="20210602 14:11:41.425"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectId": null</arg> +<arg>"objectId":${objectId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.426" endtime="20210602 14:11:41.426"></status> +</kw> +<msg timestamp="20210602 14:11:41.427" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:41.426" endtime="20210602 14:11:41.427"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"option": "update"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.428" endtime="20210602 14:11:41.428"></status> +</kw> +<msg timestamp="20210602 14:11:41.429" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:41.427" endtime="20210602 14:11:41.429"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectJsonList}</var> +</assign> +<msg timestamp="20210602 14:11:41.429" level="INFO">${objectJsonList} = []</msg> +<status status="PASS" starttime="20210602 14:11:41.429" endtime="20210602 14:11:41.429"></status> +</kw> +<kw name="Evaluate" library="BuiltIn"> +<doc>Evaluates the given expression in Python and returns the results.</doc> +<arguments> +<arg>type(${objList})</arg> +</arguments> +<assign> +<var>${objListType}</var> +</assign> +<msg timestamp="20210602 14:11:41.430" level="INFO">${objListType} = <class 'list'></msg> +<status status="PASS" starttime="20210602 14:11:41.430" endtime="20210602 14:11:41.430"></status> +</kw> +<kw name="${obj} IN [ @{objList} ]" type="for"> +<kw name="${obj} = {'addItemList': [{'ip': '255.255.255.254', 'port': '65535'}, {'ip': '255.255.255.254', 'port': '1'}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.431" endtime="20210602 14:11:41.432"></status> +</kw> +<msg timestamp="20210602 14:11:41.432" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:41.432" level="INFO">${addItemList} = [{'ip': '255.255.255.254', 'port': '65535'}, {'ip': '255.255.255.254', 'port': '1'}]</msg> +<status status="PASS" starttime="20210602 14:11:41.431" endtime="20210602 14:11:41.432"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:41.433" level="INFO">${addItemList} = [{"ip": "255.255.255.254", "port": "65535"}, {"ip": "255.255.255.254", "port": "1"}]</msg> +<status status="PASS" starttime="20210602 14:11:41.432" endtime="20210602 14:11:41.433"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.434" endtime="20210602 14:11:41.434"></status> +</kw> +<msg timestamp="20210602 14:11:41.434" level="INFO">${addItemList} = [{"ip": "255.255.255.254", "port": "65535"}, {"ip": "255.255.255.254", "port": "1"}]</msg> +<status status="PASS" starttime="20210602 14:11:41.433" endtime="20210602 14:11:41.434"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.436" endtime="20210602 14:11:41.436"></status> +</kw> +<msg timestamp="20210602 14:11:41.436" level="INFO">${addItemList} = [{"ip": "255.255.255.254", "port": "65535"}, {"ip": "255.255.255.254", "port": "1"}]</msg> +<status status="PASS" starttime="20210602 14:11:41.435" endtime="20210602 14:11:41.436"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.437" endtime="20210602 14:11:41.438"></status> +</kw> +<msg timestamp="20210602 14:11:41.438" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:41.437" endtime="20210602 14:11:41.438"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:41.439" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:41.438" endtime="20210602 14:11:41.439"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:41.439" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addIt...</msg> +<status status="PASS" starttime="20210602 14:11:41.439" endtime="20210602 14:11:41.439"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.451" endtime="20210602 14:11:41.451"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.451" endtime="20210602 14:11:41.451"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addIte..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.452" endtime="20210602 14:11:41.452"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.452" endtime="20210602 14:11:41.453"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.452" endtime="20210602 14:11:41.453"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.450" endtime="20210602 14:11:41.453"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.431" endtime="20210602 14:11:41.453"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.430" endtime="20210602 14:11:41.453"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>opAction=add</arg> +<arg>returnData=1</arg> +<arg>objectList=${objectJsonList}</arg> +</arguments> +<assign> +<var>${objectData}</var> +</assign> +<msg timestamp="20210602 14:11:41.454" level="INFO">${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定...</msg> +<status status="PASS" starttime="20210602 14:11:41.454" endtime="20210602 14:11:41.455"></status> +</kw> +<kw name="createObject" library="object"> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${rescode}</var> +<var>${objectIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${ipList}对象dict</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.455" endtime="20210602 14:11:41.456"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建IP</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:41.456" endtime="20210602 14:11:41.456"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${ipList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:41.457" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:41.457" endtime="20210602 14:11:41.457"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${ipList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:41.458" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u535...</msg> +<status status="PASS" starttime="20210602 14:11:41.458" endtime="20210602 14:11:41.458"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${objectUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:41.460" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:41.459" endtime="20210602 14:11:41.460"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:41.461" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v1, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:41.460" endtime="20210602 14:11:41.461"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:41.462" level="INFO">POST Request using : uri=/policy/object, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"ip": "255.255.255.254", "port": "65535"}, {"ip": "255.255.255.254", "port": "1"}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]} +json=None</msg> +<msg timestamp="20210602 14:11:42.022" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:41.461" endtime="20210602 14:11:42.023"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:42.027" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:42.025" endtime="20210602 14:11:42.028"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:42.031" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:42.029" endtime="20210602 14:11:42.032"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:42.034" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "objectList" : [ { + "addItemList" : [ { + "addrType" : 4, + "clientIp1" : "255.255.255.254", + "clientIp2" : "32", + "clientIpFormat" : "CIDR", + "clientPort1" : "65535", + "clientPort2" : "65535", + "clientPortFormat" : "range", + "direction" : 0, + "ip" : "255.255.255.254", + "isInitialize" : 0, + "isSession" : "endpoint", + "isValid" : 1, + "itemDesc" : "{ \"ip\":\"255.255.255.254\" ,\"port\":\"65535\"}", + "itemId" : 10074735, + "itemName" : null, + "itemType" : "ip", + "objectId" : 107903, + "opTime" : "2021-06-02 14:11:41", + "opUser" : 425, + "port" : "65535", + "protocol" : 0, + "serverIp1" : "0.0.0.0", + "serverIp2" : "255.255.255.255", + "serverIpFormat" : "mask", + "serverPort1" : "0", + "serverPort2" : "65535", + "serverPortFormat" : "mask" + }, { + "addrType" : 4, + "clientIp1" : "255.255.255.254", + "clientIp2" : "32", + "clientIpFormat" : "CIDR", + "clientPort1" : "1", + "clientPort2" : "1", + "clientPortFormat" : "range", + "direction" : 0, + "ip" : "255.255.255.254", + "isInitialize" : 0, + "isSession" : "endpoint", + "isValid" : 1, + "itemDesc" : "{ \"ip\":\"255.255.255.254\" ,\"port\":\"1\"}", + "itemId" : 10074736, + "itemName" : null, + "itemType" : "ip", + "objectId" : 107903, + "opTime" : "2021-06-02 14:11:41", + "opUser" : 425, + "port" : "1", + "protocol" : 0, + "serverIp1" : "0.0.0.0", + "serverIp2" : "255.255.255.255", + "serverIpFormat" : "mask", + "serverPort1" : "0", + "serverPort2" : "65535", + "serverPortFormat" : "mask" + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107903, + "objectName" : "auttest单ip指定端口", + "objectSubType" : "endpoint", + "objectType" : "ip", + "opTime" : "2021-06-02 14:11:40", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:42.035" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:42.035" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.254', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '65535', 'clientPor...</msg> +<status status="PASS" starttime="20210602 14:11:42.033" endtime="20210602 14:11:42.036"></status> +</kw> +<msg timestamp="20210602 14:11:42.037" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.254', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '65535', 'clientPor...</msg> +<status status="PASS" starttime="20210602 14:11:41.458" endtime="20210602 14:11:42.037"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>getObjectListIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${objectIds}</var> +</assign> +<kw name="getObjectListIds" library="process_object_body"> +<doc>获取结果中的对象ID</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>Call Get-ObjectIds</arg> +</arguments> +<msg timestamp="20210602 14:11:42.041" level="INFO">Call Get-ObjectIds</msg> +<status status="PASS" starttime="20210602 14:11:42.040" endtime="20210602 14:11:42.041"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIds}</var> +</assign> +<msg timestamp="20210602 14:11:42.043" level="INFO">${objectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:42.042" endtime="20210602 14:11:42.043"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${objectIdsTemp}</var> +</assign> +<msg timestamp="20210602 14:11:42.044" level="INFO">${objectIdsTemp} = </msg> +<status status="PASS" starttime="20210602 14:11:42.044" endtime="20210602 14:11:42.044"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${data}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:42.046" endtime="20210602 14:11:42.047"></status> +</kw> +<msg timestamp="20210602 14:11:42.047" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:42.047" level="INFO">${data} = {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.254', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '65535', 'clientPort2': '65535', 'clientPortFormat': 'range...</msg> +<status status="PASS" starttime="20210602 14:11:42.045" endtime="20210602 14:11:42.048"></status> +</kw> +<kw name="Return From Keyword If" library="BuiltIn"> +<doc>Returns from the enclosing user keyword if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"=="FAIL"</arg> +<arg>${objectIdsTemp}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:42.048" endtime="20210602 14:11:42.048"></status> +</kw> +<kw name="${object} IN [ @{value['data']['objectList']} ]" type="for"> +<kw name="${object} = {'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.254', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '65535', 'clientPort2': '65535', 'clientPortFormat': 'range', 'direction': ..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:42.050" endtime="20210602 14:11:42.050"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:42.049" endtime="20210602 14:11:42.051"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:42.049" endtime="20210602 14:11:42.051"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:42.039" endtime="20210602 14:11:42.051"></status> +</kw> +<msg timestamp="20210602 14:11:42.052" level="INFO">${objectIds} = [107903]</msg> +<status status="PASS" starttime="20210602 14:11:42.038" endtime="20210602 14:11:42.052"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:42.053" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:42.052" endtime="20210602 14:11:42.053"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:42.054" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:42.053" endtime="20210602 14:11:42.054"></status> +</kw> +<msg timestamp="20210602 14:11:42.055" level="INFO">${rescode} = 200</msg> +<msg timestamp="20210602 14:11:42.055" level="INFO">${objectIds} = [107903]</msg> +<status status="PASS" starttime="20210602 14:11:41.455" endtime="20210602 14:11:42.055"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:42.056" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:42.056" endtime="20210602 14:11:42.056"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${protocolField}</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${protocolField}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:42.057" endtime="20210602 14:11:42.058"></status> +</kw> +<msg timestamp="20210602 14:11:42.058" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:42.057" endtime="20210602 14:11:42.058"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectsList}</var> +</assign> +<msg timestamp="20210602 14:11:42.059" level="INFO">${objectsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:42.058" endtime="20210602 14:11:42.059"></status> +</kw> +<kw name="${obj} IN [ @{objectIds} ]" type="for"> +<kw name="${obj} = 107903" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:42.060" level="INFO">${objectList} = {'objectId': 107903, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:42.060" endtime="20210602 14:11:42.061"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:42.061" endtime="20210602 14:11:42.061"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:42.059" endtime="20210602 14:11:42.062"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:42.059" endtime="20210602 14:11:42.062"></status> +</kw> +<msg timestamp="20210602 14:11:42.062" level="INFO">${objectIds} = [107903]</msg> +<msg timestamp="20210602 14:11:42.062" level="INFO">${objectList} = {'objectId': 107903, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:41.412" endtime="20210602 14:11:42.062"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>OrangeFilter</arg> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:42.064" endtime="20210602 14:11:42.064"></status> +</kw> +<msg timestamp="20210602 14:11:42.064" level="INFO">${objectList} = {'objectId': 107903, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:42.063" endtime="20210602 14:11:42.064"></status> +</kw> +<msg timestamp="20210602 14:11:42.065" level="INFO">${objectIds} = [107903]</msg> +<msg timestamp="20210602 14:11:42.065" level="INFO">${objectList} = {'objectId': 107903, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:41.410" endtime="20210602 14:11:42.065"></status> +</kw> +<kw name="Get Length" library="BuiltIn"> +<doc>Returns and logs the length of the given item as an integer.</doc> +<arguments> +<arg>${objectIdsList}</arg> +</arguments> +<assign> +<var>${len}</var> +</assign> +<msg timestamp="20210602 14:11:42.066" level="INFO">Length is 7</msg> +<msg timestamp="20210602 14:11:42.066" level="INFO">${len} = 7</msg> +<status status="PASS" starttime="20210602 14:11:42.065" endtime="20210602 14:11:42.066"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${len} != 0</arg> +<arg>AppendListToList</arg> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectIds}</arg> +</arguments> +<assign> +<var>${objectIdsList}</var> +</assign> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:42.077" endtime="20210602 14:11:42.077"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:42.078" endtime="20210602 14:11:42.078"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = 107903" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:42.079" endtime="20210602 14:11:42.079"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:42.078" endtime="20210602 14:11:42.079"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:42.078" endtime="20210602 14:11:42.079"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:42.076" endtime="20210602 14:11:42.080"></status> +</kw> +<msg timestamp="20210602 14:11:42.080" level="INFO">${objectIdsList} = [107896, 107897, 107898, 107899, 107900, 107901, 107902, 107903]</msg> +<status status="PASS" starttime="20210602 14:11:42.066" endtime="20210602 14:11:42.080"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Append To List</arg> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Append To List</arg> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>Append To List</arg> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:42.081" endtime="20210602 14:11:42.082"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:42.081" endtime="20210602 14:11:42.082"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:41.409" endtime="20210602 14:11:42.082"></status> +</kw> +<kw name="${key} = {'protocolField': 'TSG_SECURITY_DESTINATION_LOCATION', 'objectSubType': 'geo_location', 'objList': [{'addItemList': [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}]}]}" type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${key}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:42.083" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_LOCATION</msg> +<status status="PASS" starttime="20210602 14:11:42.083" endtime="20210602 14:11:42.083"></status> +</kw> +<kw name="CreateObjectList" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${key}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:42.084" endtime="20210602 14:11:42.085"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:42.085" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_LOCATION</msg> +<status status="PASS" starttime="20210602 14:11:42.085" endtime="20210602 14:11:42.085"></status> +</kw> +<kw name="CreateObjects" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:42.087" endtime="20210602 14:11:42.087"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:42.088" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_LOCATION</msg> +<status status="PASS" starttime="20210602 14:11:42.087" endtime="20210602 14:11:42.088"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objList</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:42.089" level="INFO">${objList} = [{'addItemList': [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}]}]</msg> +<status status="PASS" starttime="20210602 14:11:42.088" endtime="20210602 14:11:42.089"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${objJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:42.089" endtime="20210602 14:11:42.090"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objModeJson}</arg> +</arguments> +<assign> +<var>${objJson}</var> +</assign> +<msg timestamp="20210602 14:11:42.090" level="INFO">${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:42.090" endtime="20210602 14:11:42.090"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objListMode}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:42.091" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:42.091" endtime="20210602 14:11:42.091"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<msg timestamp="20210602 14:11:42.092" level="FAIL">Dictionary does not contain key 'objectType'.</msg> +<status status="FAIL" starttime="20210602 14:11:42.092" endtime="20210602 14:11:42.092"></status> +</kw> +<msg timestamp="20210602 14:11:42.093" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:42.093" level="INFO">${objectType} = Dictionary does not contain key 'objectType'.</msg> +<status status="PASS" starttime="20210602 14:11:42.091" endtime="20210602 14:11:42.093"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:42.094" endtime="20210602 14:11:42.094"></status> +</kw> +<msg timestamp="20210602 14:11:42.095" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:42.093" endtime="20210602 14:11:42.095"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectSubType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:42.096" endtime="20210602 14:11:42.096"></status> +</kw> +<msg timestamp="20210602 14:11:42.096" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:42.096" level="INFO">${objectSubType} = geo_location</msg> +<status status="PASS" starttime="20210602 14:11:42.095" endtime="20210602 14:11:42.096"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:42.097" endtime="20210602 14:11:42.097"></status> +</kw> +<msg timestamp="20210602 14:11:42.097" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test"...</msg> +<status status="PASS" starttime="20210602 14:11:42.097" endtime="20210602 14:11:42.097"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<msg timestamp="20210602 14:11:42.098" level="FAIL">Dictionary does not contain key 'objectId'.</msg> +<status status="FAIL" starttime="20210602 14:11:42.098" endtime="20210602 14:11:42.098"></status> +</kw> +<msg timestamp="20210602 14:11:42.098" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:42.099" level="INFO">${objectId} = Dictionary does not contain key 'objectId'.</msg> +<status status="PASS" starttime="20210602 14:11:42.097" endtime="20210602 14:11:42.099"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectId": null</arg> +<arg>"objectId":${objectId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:42.099" endtime="20210602 14:11:42.101"></status> +</kw> +<msg timestamp="20210602 14:11:42.101" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test"...</msg> +<status status="PASS" starttime="20210602 14:11:42.099" endtime="20210602 14:11:42.101"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"option": "update"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:42.101" endtime="20210602 14:11:42.103"></status> +</kw> +<msg timestamp="20210602 14:11:42.103" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test"...</msg> +<status status="PASS" starttime="20210602 14:11:42.101" endtime="20210602 14:11:42.103"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectJsonList}</var> +</assign> +<msg timestamp="20210602 14:11:42.103" level="INFO">${objectJsonList} = []</msg> +<status status="PASS" starttime="20210602 14:11:42.103" endtime="20210602 14:11:42.103"></status> +</kw> +<kw name="Evaluate" library="BuiltIn"> +<doc>Evaluates the given expression in Python and returns the results.</doc> +<arguments> +<arg>type(${objList})</arg> +</arguments> +<assign> +<var>${objListType}</var> +</assign> +<msg timestamp="20210602 14:11:42.104" level="INFO">${objListType} = <class 'list'></msg> +<status status="PASS" starttime="20210602 14:11:42.103" endtime="20210602 14:11:42.104"></status> +</kw> +<kw name="${obj} IN [ @{objList} ]" type="for"> +<kw name="${obj} = {'addItemList': [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:42.105" endtime="20210602 14:11:42.105"></status> +</kw> +<msg timestamp="20210602 14:11:42.105" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:42.105" level="INFO">${addItemList} = [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}]</msg> +<status status="PASS" starttime="20210602 14:11:42.104" endtime="20210602 14:11:42.106"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:42.106" level="INFO">${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}]</msg> +<status status="PASS" starttime="20210602 14:11:42.106" endtime="20210602 14:11:42.106"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:42.107" endtime="20210602 14:11:42.107"></status> +</kw> +<msg timestamp="20210602 14:11:42.108" level="INFO">${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}]</msg> +<status status="PASS" starttime="20210602 14:11:42.107" endtime="20210602 14:11:42.108"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:42.109" endtime="20210602 14:11:42.109"></status> +</kw> +<msg timestamp="20210602 14:11:42.109" level="INFO">${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}]</msg> +<status status="PASS" starttime="20210602 14:11:42.108" endtime="20210602 14:11:42.109"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:42.110" endtime="20210602 14:11:42.111"></status> +</kw> +<msg timestamp="20210602 14:11:42.111" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test"...</msg> +<status status="PASS" starttime="20210602 14:11:42.110" endtime="20210602 14:11:42.111"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:42.112" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test"...</msg> +<status status="PASS" starttime="20210602 14:11:42.112" endtime="20210602 14:11:42.112"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:42.113" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'geo_location', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'a...</msg> +<status status="PASS" starttime="20210602 14:11:42.112" endtime="20210602 14:11:42.113"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:42.124" endtime="20210602 14:11:42.124"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:42.124" endtime="20210602 14:11:42.125"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'ip', 'objectSubType': 'geo_location', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'ad..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:42.125" endtime="20210602 14:11:42.126"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:42.125" endtime="20210602 14:11:42.126"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:42.125" endtime="20210602 14:11:42.126"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:42.123" endtime="20210602 14:11:42.126"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:42.104" endtime="20210602 14:11:42.127"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:42.104" endtime="20210602 14:11:42.127"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>opAction=add</arg> +<arg>returnData=1</arg> +<arg>objectList=${objectJsonList}</arg> +</arguments> +<assign> +<var>${objectData}</var> +</assign> +<msg timestamp="20210602 14:11:42.128" level="INFO">${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'geo_location', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单...</msg> +<status status="PASS" starttime="20210602 14:11:42.127" endtime="20210602 14:11:42.128"></status> +</kw> +<kw name="createObject" library="object"> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${rescode}</var> +<var>${objectIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${ipList}对象dict</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:42.128" endtime="20210602 14:11:42.129"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建IP</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:42.129" endtime="20210602 14:11:42.129"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${ipList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:42.130" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:42.130" endtime="20210602 14:11:42.130"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${ipList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:42.131" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\...</msg> +<status status="PASS" starttime="20210602 14:11:42.130" endtime="20210602 14:11:42.131"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${objectUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:42.132" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:42.131" endtime="20210602 14:11:42.132"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:42.133" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v1, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:42.132" endtime="20210602 14:11:42.133"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:42.134" level="INFO">POST Request using : uri=/policy/object, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]} +json=None</msg> +<msg timestamp="20210602 14:11:43.668" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:42.134" endtime="20210602 14:11:43.669"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:43.671" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:43.670" endtime="20210602 14:11:43.672"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:43.675" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:43.673" endtime="20210602 14:11:43.676"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:43.678" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "objectList" : [ { + "addItemList" : [ { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:42", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "Algeria." ], + "itemId" : 10074738, + "objectId" : 107904 + }, { + "isValid" : 1, + "opUser" : 425, + "opTime" : "2021-06-02 14:11:42", + "isInitialize" : 0, + "itemName" : null, + "itemDesc" : null, + "exprType" : 0, + "isHexbin" : 0, + "keywordArray" : [ "China.Duyun." ], + "itemId" : 10074739, + "objectId" : 107904 + } ], + "deleteItemIds" : [ ], + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "memberType" : 1, + "objectDesc" : "test", + "objectId" : 107904, + "objectName" : "auttest单ip指定端口", + "objectSubType" : "geo_location", + "objectType" : "ip", + "opTime" : "2021-06-02 14:11:41", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ] + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:43.678" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:43.679" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:42', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:43.677" endtime="20210602 14:11:43.680"></status> +</kw> +<msg timestamp="20210602 14:11:43.680" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:42', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType...</msg> +<status status="PASS" starttime="20210602 14:11:42.131" endtime="20210602 14:11:43.681"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>getObjectListIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${objectIds}</var> +</assign> +<kw name="getObjectListIds" library="process_object_body"> +<doc>获取结果中的对象ID</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>Call Get-ObjectIds</arg> +</arguments> +<msg timestamp="20210602 14:11:43.685" level="INFO">Call Get-ObjectIds</msg> +<status status="PASS" starttime="20210602 14:11:43.684" endtime="20210602 14:11:43.685"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIds}</var> +</assign> +<msg timestamp="20210602 14:11:43.686" level="INFO">${objectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:43.686" endtime="20210602 14:11:43.687"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${objectIdsTemp}</var> +</assign> +<msg timestamp="20210602 14:11:43.688" level="INFO">${objectIdsTemp} = </msg> +<status status="PASS" starttime="20210602 14:11:43.687" endtime="20210602 14:11:43.688"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${data}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:43.689" endtime="20210602 14:11:43.690"></status> +</kw> +<msg timestamp="20210602 14:11:43.690" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:43.690" level="INFO">${data} = {'objectList': [{'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:42', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['A...</msg> +<status status="PASS" starttime="20210602 14:11:43.688" endtime="20210602 14:11:43.691"></status> +</kw> +<kw name="Return From Keyword If" library="BuiltIn"> +<doc>Returns from the enclosing user keyword if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"=="FAIL"</arg> +<arg>${objectIdsTemp}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:43.691" endtime="20210602 14:11:43.692"></status> +</kw> +<kw name="${object} IN [ @{value['data']['objectList']} ]" type="for"> +<kw name="${object} = {'addItemList': [{'isValid': 1, 'opUser': 425, 'opTime': '2021-06-02 14:11:42', 'isInitialize': 0, 'itemName': None, 'itemDesc': None, 'exprType': 0, 'isHexbin': 0, 'keywordArray': ['Algeria.'], 'item..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:43.693" endtime="20210602 14:11:43.693"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:43.692" endtime="20210602 14:11:43.694"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:43.692" endtime="20210602 14:11:43.694"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:43.683" endtime="20210602 14:11:43.694"></status> +</kw> +<msg timestamp="20210602 14:11:43.695" level="INFO">${objectIds} = [107904]</msg> +<status status="PASS" starttime="20210602 14:11:43.682" endtime="20210602 14:11:43.695"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:43.696" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:43.695" endtime="20210602 14:11:43.696"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:43.697" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:43.696" endtime="20210602 14:11:43.697"></status> +</kw> +<msg timestamp="20210602 14:11:43.698" level="INFO">${rescode} = 200</msg> +<msg timestamp="20210602 14:11:43.698" level="INFO">${objectIds} = [107904]</msg> +<status status="PASS" starttime="20210602 14:11:42.128" endtime="20210602 14:11:43.698"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:43.699" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:43.698" endtime="20210602 14:11:43.699"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${protocolField}</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${protocolField}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:43.700" endtime="20210602 14:11:43.700"></status> +</kw> +<msg timestamp="20210602 14:11:43.701" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_LOCATION</msg> +<status status="PASS" starttime="20210602 14:11:43.699" endtime="20210602 14:11:43.701"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectsList}</var> +</assign> +<msg timestamp="20210602 14:11:43.701" level="INFO">${objectsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:43.701" endtime="20210602 14:11:43.702"></status> +</kw> +<kw name="${obj} IN [ @{objectIds} ]" type="for"> +<kw name="${obj} = 107904" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:43.703" level="INFO">${objectList} = {'objectId': 107904, 'protocolField': 'TSG_SECURITY_DESTINATION_LOCATION'}</msg> +<status status="PASS" starttime="20210602 14:11:43.702" endtime="20210602 14:11:43.703"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:43.704" endtime="20210602 14:11:43.704"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:43.702" endtime="20210602 14:11:43.704"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:43.702" endtime="20210602 14:11:43.704"></status> +</kw> +<msg timestamp="20210602 14:11:43.705" level="INFO">${objectIds} = [107904]</msg> +<msg timestamp="20210602 14:11:43.705" level="INFO">${objectList} = {'objectId': 107904, 'protocolField': 'TSG_SECURITY_DESTINATION_LOCATION'}</msg> +<status status="PASS" starttime="20210602 14:11:42.086" endtime="20210602 14:11:43.705"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>OrangeFilter</arg> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:43.706" endtime="20210602 14:11:43.707"></status> +</kw> +<msg timestamp="20210602 14:11:43.707" level="INFO">${objectList} = {'objectId': 107904, 'protocolField': 'TSG_SECURITY_DESTINATION_LOCATION'}</msg> +<status status="PASS" starttime="20210602 14:11:43.705" endtime="20210602 14:11:43.707"></status> +</kw> +<msg timestamp="20210602 14:11:43.707" level="INFO">${objectIds} = [107904]</msg> +<msg timestamp="20210602 14:11:43.707" level="INFO">${objectList} = {'objectId': 107904, 'protocolField': 'TSG_SECURITY_DESTINATION_LOCATION'}</msg> +<status status="PASS" starttime="20210602 14:11:42.084" endtime="20210602 14:11:43.708"></status> +</kw> +<kw name="Get Length" library="BuiltIn"> +<doc>Returns and logs the length of the given item as an integer.</doc> +<arguments> +<arg>${objectIdsList}</arg> +</arguments> +<assign> +<var>${len}</var> +</assign> +<msg timestamp="20210602 14:11:43.708" level="INFO">Length is 8</msg> +<msg timestamp="20210602 14:11:43.708" level="INFO">${len} = 8</msg> +<status status="PASS" starttime="20210602 14:11:43.708" endtime="20210602 14:11:43.708"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${len} != 0</arg> +<arg>AppendListToList</arg> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectIds}</arg> +</arguments> +<assign> +<var>${objectIdsList}</var> +</assign> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:43.722" endtime="20210602 14:11:43.722"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:43.723" endtime="20210602 14:11:43.723"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = 107904" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:43.723" endtime="20210602 14:11:43.724"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:43.723" endtime="20210602 14:11:43.724"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:43.723" endtime="20210602 14:11:43.724"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:43.721" endtime="20210602 14:11:43.724"></status> +</kw> +<msg timestamp="20210602 14:11:43.725" level="INFO">${objectIdsList} = [107896, 107897, 107898, 107899, 107900, 107901, 107902, 107903, 107904]</msg> +<status status="PASS" starttime="20210602 14:11:43.709" endtime="20210602 14:11:43.725"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Append To List</arg> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Append To List</arg> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>Append To List</arg> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:43.726" endtime="20210602 14:11:43.727"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:43.725" endtime="20210602 14:11:43.727"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:42.083" endtime="20210602 14:11:43.727"></status> +</kw> +<kw name="${key} = {'protocolField': 'TSG_SECURITY_DESTINATION_ADDR', 'objectSubType': 'ip_learning', 'objList': [{'addItemList': [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'learningDepth'..." type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${key}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:43.728" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:43.728" endtime="20210602 14:11:43.728"></status> +</kw> +<kw name="CreateObjectList" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${key}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:43.729" endtime="20210602 14:11:43.730"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:43.730" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:43.730" endtime="20210602 14:11:43.730"></status> +</kw> +<kw name="CreateObjects" library="object"> +<doc>处理对象</doc> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${objectIds}</var> +<var>${objectList}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>针对位置进行处理</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:43.732" endtime="20210602 14:11:43.732"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>protocolField</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<msg timestamp="20210602 14:11:43.732" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:43.732" endtime="20210602 14:11:43.733"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objList</arg> +</arguments> +<assign> +<var>${objList}</var> +</assign> +<msg timestamp="20210602 14:11:43.733" level="INFO">${objList} = [{'addItemList': [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'learningDepth': '2', 'agingTime': '12', 'voteClientNum': '10', 'learnedIpLimit': '1000'}]}]</msg> +<status status="PASS" starttime="20210602 14:11:43.733" endtime="20210602 14:11:43.733"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>${objJson}对象模板取自全局变量</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:43.734" endtime="20210602 14:11:43.734"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objModeJson}</arg> +</arguments> +<assign> +<var>${objJson}</var> +</assign> +<msg timestamp="20210602 14:11:43.735" level="INFO">${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...</msg> +<status status="PASS" starttime="20210602 14:11:43.734" endtime="20210602 14:11:43.735"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objListMode}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:43.735" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:43.735" endtime="20210602 14:11:43.735"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectType</arg> +</arguments> +<msg timestamp="20210602 14:11:43.736" level="FAIL">Dictionary does not contain key 'objectType'.</msg> +<status status="FAIL" starttime="20210602 14:11:43.736" endtime="20210602 14:11:43.737"></status> +</kw> +<msg timestamp="20210602 14:11:43.737" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:43.737" level="INFO">${objectType} = Dictionary does not contain key 'objectType'.</msg> +<status status="PASS" starttime="20210602 14:11:43.736" endtime="20210602 14:11:43.737"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectType": "ip"</arg> +<arg>"objectType":"${objectType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:43.738" endtime="20210602 14:11:43.738"></status> +</kw> +<msg timestamp="20210602 14:11:43.738" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...</msg> +<status status="PASS" starttime="20210602 14:11:43.737" endtime="20210602 14:11:43.738"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectSubType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectSubType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:43.739" endtime="20210602 14:11:43.740"></status> +</kw> +<msg timestamp="20210602 14:11:43.740" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:43.740" level="INFO">${objectSubType} = ip_learning</msg> +<status status="PASS" starttime="20210602 14:11:43.739" endtime="20210602 14:11:43.740"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"objectSubType": "endpoint"</arg> +<arg>"objectSubType":"${objectSubType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:43.741" endtime="20210602 14:11:43.741"></status> +</kw> +<msg timestamp="20210602 14:11:43.741" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...</msg> +<status status="PASS" starttime="20210602 14:11:43.740" endtime="20210602 14:11:43.742"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${objectId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objectData}</arg> +<arg>objectId</arg> +</arguments> +<msg timestamp="20210602 14:11:43.743" level="FAIL">Dictionary does not contain key 'objectId'.</msg> +<status status="FAIL" starttime="20210602 14:11:43.742" endtime="20210602 14:11:43.743"></status> +</kw> +<msg timestamp="20210602 14:11:43.743" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:43.743" level="INFO">${objectId} = Dictionary does not contain key 'objectId'.</msg> +<status status="PASS" starttime="20210602 14:11:43.742" endtime="20210602 14:11:43.743"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"objectId": null</arg> +<arg>"objectId":${objectId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:43.744" endtime="20210602 14:11:43.745"></status> +</kw> +<msg timestamp="20210602 14:11:43.745" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...</msg> +<status status="PASS" starttime="20210602 14:11:43.744" endtime="20210602 14:11:43.745"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"option": "update"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:43.746" endtime="20210602 14:11:43.747"></status> +</kw> +<msg timestamp="20210602 14:11:43.747" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...</msg> +<status status="PASS" starttime="20210602 14:11:43.746" endtime="20210602 14:11:43.747"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectJsonList}</var> +</assign> +<msg timestamp="20210602 14:11:43.748" level="INFO">${objectJsonList} = []</msg> +<status status="PASS" starttime="20210602 14:11:43.747" endtime="20210602 14:11:43.748"></status> +</kw> +<kw name="Evaluate" library="BuiltIn"> +<doc>Evaluates the given expression in Python and returns the results.</doc> +<arguments> +<arg>type(${objList})</arg> +</arguments> +<assign> +<var>${objListType}</var> +</assign> +<msg timestamp="20210602 14:11:43.749" level="INFO">${objListType} = <class 'list'></msg> +<status status="PASS" starttime="20210602 14:11:43.749" endtime="20210602 14:11:43.749"></status> +</kw> +<kw name="${obj} IN [ @{objList} ]" type="for"> +<kw name="${obj} = {'addItemList': [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'learningDepth': '2', 'agingTime': '12', 'voteClientNum': '10', 'learnedIpLimit': '1000'}]}" type="foritem"> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${addItemList}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${obj}</arg> +<arg>addItemList</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:43.751" endtime="20210602 14:11:43.751"></status> +</kw> +<msg timestamp="20210602 14:11:43.751" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:43.751" level="INFO">${addItemList} = [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'learningDepth': '2', 'agingTime': '12', 'voteClientNum': '10', 'learnedIpLimit': '1000'}]</msg> +<status status="PASS" starttime="20210602 14:11:43.750" endtime="20210602 14:11:43.752"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<msg timestamp="20210602 14:11:43.752" level="INFO">${addItemList} = [{"fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"}]</msg> +<status status="PASS" starttime="20210602 14:11:43.752" endtime="20210602 14:11:43.752"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${addItemList}</arg> +<arg>[{"</arg> +<arg>"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:43.753" endtime="20210602 14:11:43.754"></status> +</kw> +<msg timestamp="20210602 14:11:43.754" level="INFO">${addItemList} = "fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"}]</msg> +<status status="PASS" starttime="20210602 14:11:43.753" endtime="20210602 14:11:43.754"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${addItemList}</arg> +</arguments> +<assign> +<var>${addItemList}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${addItemList}</arg> +<arg>"}]</arg> +<arg>"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:43.755" endtime="20210602 14:11:43.755"></status> +</kw> +<msg timestamp="20210602 14:11:43.756" level="INFO">${addItemList} = "fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"</msg> +<status status="PASS" starttime="20210602 14:11:43.755" endtime="20210602 14:11:43.756"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +<arg>ELSE IF</arg> +<arg>"${return}"!="FAIL"</arg> +<arg>Replace String</arg> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": ${addItemList}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>"addItemList": [null]</arg> +<arg>"addItemList": [], ${addItemList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:43.757" endtime="20210602 14:11:43.757"></status> +</kw> +<msg timestamp="20210602 14:11:43.757" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...</msg> +<status status="PASS" starttime="20210602 14:11:43.756" endtime="20210602 14:11:43.757"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${objectJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${objectJson}</var> +</assign> +<msg timestamp="20210602 14:11:43.758" level="INFO">${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...</msg> +<status status="PASS" starttime="20210602 14:11:43.758" endtime="20210602 14:11:43.759"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${objectJson}</arg> +</arguments> +<assign> +<var>${objDictionary}</var> +</assign> +<msg timestamp="20210602 14:11:43.759" level="INFO">${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'ip_learning', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'ad...</msg> +<status status="PASS" starttime="20210602 14:11:43.759" endtime="20210602 14:11:43.759"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectJsonList}</arg> +<arg>${objDictionary}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:43.776" endtime="20210602 14:11:43.776"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:43.777" endtime="20210602 14:11:43.777"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'objectId': None, 'objectType': 'ip', 'objectSubType': 'ip_learning', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'add..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:43.778" endtime="20210602 14:11:43.778"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:43.777" endtime="20210602 14:11:43.778"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:43.777" endtime="20210602 14:11:43.779"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:43.775" endtime="20210602 14:11:43.779"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:43.750" endtime="20210602 14:11:43.779"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:43.750" endtime="20210602 14:11:43.779"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>opAction=add</arg> +<arg>returnData=1</arg> +<arg>objectList=${objectJsonList}</arg> +</arguments> +<assign> +<var>${objectData}</var> +</assign> +<msg timestamp="20210602 14:11:43.780" level="INFO">${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'ip_learning', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单i...</msg> +<status status="PASS" starttime="20210602 14:11:43.780" endtime="20210602 14:11:43.780"></status> +</kw> +<kw name="createObject" library="object"> +<arguments> +<arg>${objectData}</arg> +</arguments> +<assign> +<var>${rescode}</var> +<var>${objectIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${ipList}对象dict</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:43.781" endtime="20210602 14:11:43.781"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建IP</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:43.782" endtime="20210602 14:11:43.782"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${ipList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:43.783" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:43.782" endtime="20210602 14:11:43.783"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${ipList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:43.783" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u...</msg> +<status status="PASS" starttime="20210602 14:11:43.783" endtime="20210602 14:11:43.784"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${objectUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:43.785" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:43.784" endtime="20210602 14:11:43.785"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:43.786" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v1, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:43.785" endtime="20210602 14:11:43.786"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:43.787" level="INFO">POST Request using : uri=/policy/object, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjectIds": [], "addItemList": [], "fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000", "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]} +json=None</msg> +<msg timestamp="20210602 14:11:44.368" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:43.786" endtime="20210602 14:11:44.368"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:44.369" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:44.369" endtime="20210602 14:11:44.370"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:44.370" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:44.370" endtime="20210602 14:11:44.371"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:44.372" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "objectList" : [ { + "addItemList" : [ ], + "agingTime" : 12, + "deleteItemIds" : [ ], + "fromFqdns" : [ "$www.baidu.com", "*jd.com" ], + "fromProtocol" : "HTTP,SSL", + "iconColor" : "#31739C", + "isDisplay" : null, + "isExclusion" : 0, + "isInitialize" : 0, + "isValid" : 1, + "learnedIpLimit" : 1000, + "learningDepth" : "2", + "memberType" : 3, + "objectDesc" : "test", + "objectId" : 107905, + "objectName" : "auttest单ip指定端口", + "objectSubType" : "ip_learning", + "objectType" : "ip", + "opTime" : "2021-06-02 14:11:43", + "opUser" : 425, + "subObjectIds" : [ ], + "updateItemList" : [ ], + "voteClientNum" : 10 + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:44.372" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:44.372" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '...</msg> +<status status="PASS" starttime="20210602 14:11:44.371" endtime="20210602 14:11:44.372"></status> +</kw> +<msg timestamp="20210602 14:11:44.373" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '...</msg> +<status status="PASS" starttime="20210602 14:11:43.784" endtime="20210602 14:11:44.373"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>getObjectListIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${objectIds}</var> +</assign> +<kw name="getObjectListIds" library="process_object_body"> +<doc>获取结果中的对象ID</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>Call Get-ObjectIds</arg> +</arguments> +<msg timestamp="20210602 14:11:44.374" level="INFO">Call Get-ObjectIds</msg> +<status status="PASS" starttime="20210602 14:11:44.374" endtime="20210602 14:11:44.374"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectIds}</var> +</assign> +<msg timestamp="20210602 14:11:44.375" level="INFO">${objectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:44.375" endtime="20210602 14:11:44.375"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${objectIdsTemp}</var> +</assign> +<msg timestamp="20210602 14:11:44.376" level="INFO">${objectIdsTemp} = </msg> +<status status="PASS" starttime="20210602 14:11:44.375" endtime="20210602 14:11:44.376"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${data}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${value}</arg> +<arg>data</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.377" endtime="20210602 14:11:44.377"></status> +</kw> +<msg timestamp="20210602 14:11:44.377" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:44.377" level="INFO">${data} = {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '#31739C', 'isDisplay': None, 'isExclusio...</msg> +<status status="PASS" starttime="20210602 14:11:44.376" endtime="20210602 14:11:44.377"></status> +</kw> +<kw name="Return From Keyword If" library="BuiltIn"> +<doc>Returns from the enclosing user keyword if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"=="FAIL"</arg> +<arg>${objectIdsTemp}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.378" endtime="20210602 14:11:44.378"></status> +</kw> +<kw name="${object} IN [ @{value['data']['objectList']} ]" type="for"> +<kw name="${object} = {'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '#31739C', 'isDisplay': None, 'isExclusion': 0, 'isInitia..." type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${object['objectId']}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.379" endtime="20210602 14:11:44.379"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:44.379" endtime="20210602 14:11:44.379"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:44.378" endtime="20210602 14:11:44.380"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:44.374" endtime="20210602 14:11:44.380"></status> +</kw> +<msg timestamp="20210602 14:11:44.380" level="INFO">${objectIds} = [107905]</msg> +<status status="PASS" starttime="20210602 14:11:44.373" endtime="20210602 14:11:44.380"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:44.381" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:44.380" endtime="20210602 14:11:44.381"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:44.382" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:44.382" endtime="20210602 14:11:44.382"></status> +</kw> +<msg timestamp="20210602 14:11:44.382" level="INFO">${rescode} = 200</msg> +<msg timestamp="20210602 14:11:44.383" level="INFO">${objectIds} = [107905]</msg> +<status status="PASS" starttime="20210602 14:11:43.781" endtime="20210602 14:11:44.383"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:44.383" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:44.383" endtime="20210602 14:11:44.384"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${protocolField}</arg> +</arguments> +<assign> +<var>${protocolField}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${protocolField}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.384" endtime="20210602 14:11:44.385"></status> +</kw> +<msg timestamp="20210602 14:11:44.385" level="INFO">${protocolField} = TSG_SECURITY_DESTINATION_ADDR</msg> +<status status="PASS" starttime="20210602 14:11:44.384" endtime="20210602 14:11:44.385"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${objectsList}</var> +</assign> +<msg timestamp="20210602 14:11:44.386" level="INFO">${objectsList} = []</msg> +<status status="PASS" starttime="20210602 14:11:44.385" endtime="20210602 14:11:44.386"></status> +</kw> +<kw name="${obj} IN [ @{objectIds} ]" type="for"> +<kw name="${obj} = 107905" type="foritem"> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>objectId=${objectIds}[0]</arg> +<arg>protocolField=${protocolField}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<msg timestamp="20210602 14:11:44.387" level="INFO">${objectList} = {'objectId': 107905, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:44.386" endtime="20210602 14:11:44.387"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${objectsList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.387" endtime="20210602 14:11:44.388"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:44.386" endtime="20210602 14:11:44.388"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:44.386" endtime="20210602 14:11:44.388"></status> +</kw> +<msg timestamp="20210602 14:11:44.388" level="INFO">${objectIds} = [107905]</msg> +<msg timestamp="20210602 14:11:44.388" level="INFO">${objectList} = {'objectId': 107905, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:43.731" endtime="20210602 14:11:44.388"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Set Variable</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>OrangeFilter</arg> +<arg>${objectList}</arg> +</arguments> +<assign> +<var>${objectList}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.389" endtime="20210602 14:11:44.390"></status> +</kw> +<msg timestamp="20210602 14:11:44.390" level="INFO">${objectList} = {'objectId': 107905, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:44.389" endtime="20210602 14:11:44.390"></status> +</kw> +<msg timestamp="20210602 14:11:44.390" level="INFO">${objectIds} = [107905]</msg> +<msg timestamp="20210602 14:11:44.391" level="INFO">${objectList} = {'objectId': 107905, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}</msg> +<status status="PASS" starttime="20210602 14:11:43.729" endtime="20210602 14:11:44.391"></status> +</kw> +<kw name="Get Length" library="BuiltIn"> +<doc>Returns and logs the length of the given item as an integer.</doc> +<arguments> +<arg>${objectIdsList}</arg> +</arguments> +<assign> +<var>${len}</var> +</assign> +<msg timestamp="20210602 14:11:44.391" level="INFO">Length is 9</msg> +<msg timestamp="20210602 14:11:44.391" level="INFO">${len} = 9</msg> +<status status="PASS" starttime="20210602 14:11:44.391" endtime="20210602 14:11:44.392"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${len} != 0</arg> +<arg>AppendListToList</arg> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${objectIds}</arg> +</arguments> +<assign> +<var>${objectIdsList}</var> +</assign> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectIdsList}</arg> +<arg>${objectIds}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.403" endtime="20210602 14:11:44.403"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.403" endtime="20210602 14:11:44.404"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = 107905" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.404" endtime="20210602 14:11:44.405"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:44.404" endtime="20210602 14:11:44.405"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:44.404" endtime="20210602 14:11:44.405"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:44.402" endtime="20210602 14:11:44.405"></status> +</kw> +<msg timestamp="20210602 14:11:44.406" level="INFO">${objectIdsList} = [107896, 107897, 107898, 107899, 107900, 107901, 107902, 107903, 107904, 107905]</msg> +<status status="PASS" starttime="20210602 14:11:44.392" endtime="20210602 14:11:44.406"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${protocolField}" == "TSG_SECURITY_SOURCE_ADDR" or "${protocolField}" == "None" or "${protocolField}" == "TSG_SECURITY_SOURCE_LOCATION" or "${protocolField}" == "TSG_SECURITY_SOURCE_ASN" or "${protocolField}" == "TSG_FILED_GTP_IMSI" or "${protocolField}" == "TSG_FILED_GTP_PHONE_NUMBER" or "${protocolField}" == "TSG_FILED_GTP_APN"</arg> +<arg>Append To List</arg> +<arg>${sourceList}</arg> +<arg>${objectList}</arg> +<arg>ELSE IF</arg> +<arg>"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"</arg> +<arg>Append To List</arg> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +<arg>ELSE</arg> +<arg>Append To List</arg> +<arg>${filterList}</arg> +<arg>${objectList}</arg> +</arguments> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${destinationList}</arg> +<arg>${objectList}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.407" endtime="20210602 14:11:44.407"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:44.406" endtime="20210602 14:11:44.408"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:43.728" endtime="20210602 14:11:44.408"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.360" endtime="20210602 14:11:44.408"></status> +</kw> +<msg timestamp="20210602 14:11:44.408" level="INFO">${objectIds} = [107896, 107897, 107898, 107899, 107900, 107901, 107902, 107903, 107904, 107905]</msg> +<msg timestamp="20210602 14:11:44.408" level="INFO">${sourceList} = [{'objectId': 107896, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}, {'objectId': 107898, 'protocolField': 'TSG_SECURITY_SOURCE_LOCATION'}, {'objectId': 107899, 'protocolField': 'TSG_FILED_GTP_IMSI'}, ...</msg> +<msg timestamp="20210602 14:11:44.409" level="INFO">${destinationList} = [{'objectId': 107903, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}, {'objectId': 107904, 'protocolField': 'TSG_SECURITY_DESTINATION_LOCATION'}, {'objectId': 107905, 'protocolField': 'TSG_SECURITY...</msg> +<msg timestamp="20210602 14:11:44.409" level="INFO">${filterList} = []</msg> +<status status="PASS" starttime="20210602 14:11:38.356" endtime="20210602 14:11:44.409"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${sourceList}</arg> +</arguments> +<assign> +<var>${sourceList}</var> +</assign> +<msg timestamp="20210602 14:11:44.410" level="INFO">${sourceList} = [{"objectId": 107896, "protocolField": "TSG_SECURITY_SOURCE_ADDR"}, {"objectId": 107898, "protocolField": "TSG_SECURITY_SOURCE_LOCATION"}, {"objectId": 107899, "protocolField": "TSG_FILED_GTP_IMSI"}, ...</msg> +<status status="PASS" starttime="20210602 14:11:44.409" endtime="20210602 14:11:44.410"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${destinationList}</arg> +</arguments> +<assign> +<var>${destinationList}</var> +</assign> +<msg timestamp="20210602 14:11:44.410" level="INFO">${destinationList} = [{"objectId": 107903, "protocolField": "TSG_SECURITY_DESTINATION_ADDR"}, {"objectId": 107904, "protocolField": "TSG_SECURITY_DESTINATION_LOCATION"}, {"objectId": 107905, "protocolField": "TSG_SECURITY...</msg> +<status status="PASS" starttime="20210602 14:11:44.410" endtime="20210602 14:11:44.411"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${filterList}</arg> +</arguments> +<assign> +<var>${filterList}</var> +</assign> +<msg timestamp="20210602 14:11:44.411" level="INFO">${filterList} = []</msg> +<status status="PASS" starttime="20210602 14:11:44.411" endtime="20210602 14:11:44.411"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"source": null</arg> +<arg>"source":${sourceList}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<msg timestamp="20210602 14:11:44.412" level="INFO">${policyJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...</msg> +<status status="PASS" starttime="20210602 14:11:44.412" endtime="20210602 14:11:44.412"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"destination": null</arg> +<arg>"destination":${destinationList}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<msg timestamp="20210602 14:11:44.414" level="INFO">${policyJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...</msg> +<status status="PASS" starttime="20210602 14:11:44.413" endtime="20210602 14:11:44.414"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"filterList": null</arg> +<arg>"filterList":${filterList}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<msg timestamp="20210602 14:11:44.415" level="INFO">${policyJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...</msg> +<status status="PASS" starttime="20210602 14:11:44.415" endtime="20210602 14:11:44.415"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>处理策略数据:</arg> +<arg>"opAction": "add"</arg> +<arg>"returnData": 1</arg> +<arg>"policyName": "autotest"</arg> +<arg>"policyType": "tsg_security"</arg> +<arg>"action": "allow"</arg> +<arg>"userTags": ""</arg> +<arg>"doBlacklist": 0</arg> +<arg>"doLog": 1</arg> +<arg>"policyDesc": "autotest"</arg> +<arg>"effectiveRange":</arg> +<arg>"userRegion":</arg> +<arg>"appIdObjects":</arg> +<arg>"appSelectorObjects":</arg> +<arg>"isValid": 1</arg> +<arg>"scheduleId":</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.416" endtime="20210602 14:11:44.416"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>opAction</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${opAction}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>opAction</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.417" endtime="20210602 14:11:44.417"></status> +</kw> +<msg timestamp="20210602 14:11:44.417" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:44.417" level="INFO">${opAction} = add</msg> +<status status="PASS" starttime="20210602 14:11:44.416" endtime="20210602 14:11:44.418"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${opAction}" != "${EMPTY}"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"opAction": "${opAction}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"opAction": "add"</arg> +<arg>"opAction": "${opAction}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.419" endtime="20210602 14:11:44.419"></status> +</kw> +<msg timestamp="20210602 14:11:44.419" level="INFO">${policyJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...</msg> +<status status="PASS" starttime="20210602 14:11:44.418" endtime="20210602 14:11:44.419"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${returnData}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>returnData</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.420" endtime="20210602 14:11:44.420"></status> +</kw> +<msg timestamp="20210602 14:11:44.420" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:44.421" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:44.419" endtime="20210602 14:11:44.421"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${returnData}" != "${EMPTY}"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"returnData": 1</arg> +<arg>"returnData": "${returnData}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"returnData": 1</arg> +<arg>"returnData": "${returnData}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.421" endtime="20210602 14:11:44.422"></status> +</kw> +<msg timestamp="20210602 14:11:44.422" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest",...</msg> +<status status="PASS" starttime="20210602 14:11:44.421" endtime="20210602 14:11:44.422"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>policyName</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${policyName}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>policyName</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.423" endtime="20210602 14:11:44.423"></status> +</kw> +<msg timestamp="20210602 14:11:44.423" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:44.424" level="INFO">${policyName} = autotestintercept</msg> +<status status="PASS" starttime="20210602 14:11:44.423" endtime="20210602 14:11:44.424"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${policyName}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"policyName": "autotest"</arg> +<arg>"policyName": "${policyName}"</arg> +<arg>ELSE</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"policyName": "autotest"</arg> +<arg>"policyName": "${testName}"</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"policyName": "autotest"</arg> +<arg>"policyName": "${policyName}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.425" endtime="20210602 14:11:44.425"></status> +</kw> +<msg timestamp="20210602 14:11:44.425" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestintercept", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "a...</msg> +<status status="PASS" starttime="20210602 14:11:44.424" endtime="20210602 14:11:44.425"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>policyType</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${policyType}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>policyType</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.426" endtime="20210602 14:11:44.426"></status> +</kw> +<msg timestamp="20210602 14:11:44.427" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:44.427" level="INFO">${policyType} = tsg_security</msg> +<status status="PASS" starttime="20210602 14:11:44.426" endtime="20210602 14:11:44.427"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${policyType}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"policyType": "tsg_security"</arg> +<arg>"policyType": "${policyType}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"policyType": "tsg_security"</arg> +<arg>"policyType": "${policyType}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.428" endtime="20210602 14:11:44.428"></status> +</kw> +<msg timestamp="20210602 14:11:44.428" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestintercept", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "a...</msg> +<status status="PASS" starttime="20210602 14:11:44.427" endtime="20210602 14:11:44.429"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>action</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${action}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>action</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.429" endtime="20210602 14:11:44.430"></status> +</kw> +<msg timestamp="20210602 14:11:44.430" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:44.430" level="INFO">${action} = intercept</msg> +<status status="PASS" starttime="20210602 14:11:44.429" endtime="20210602 14:11:44.430"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${action}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"action": "allow"</arg> +<arg>"action": "${action}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"action": "allow"</arg> +<arg>"action": "${action}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.431" endtime="20210602 14:11:44.431"></status> +</kw> +<msg timestamp="20210602 14:11:44.432" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestintercept", "policyType": "tsg_security", "action": "intercept", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc"...</msg> +<status status="PASS" starttime="20210602 14:11:44.430" endtime="20210602 14:11:44.432"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>method</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${method}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>method</arg> +</arguments> +<msg timestamp="20210602 14:11:44.433" level="FAIL">Dictionary does not contain key 'method'.</msg> +<status status="FAIL" starttime="20210602 14:11:44.432" endtime="20210602 14:11:44.433"></status> +</kw> +<msg timestamp="20210602 14:11:44.433" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:44.433" level="INFO">${method} = Dictionary does not contain key 'method'.</msg> +<status status="PASS" starttime="20210602 14:11:44.432" endtime="20210602 14:11:44.433"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>userTags</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${userTags}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>userTags</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.434" endtime="20210602 14:11:44.434"></status> +</kw> +<msg timestamp="20210602 14:11:44.435" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:44.435" level="INFO">${userTags} = </msg> +<status status="PASS" starttime="20210602 14:11:44.434" endtime="20210602 14:11:44.435"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${userTags}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"userTags": null</arg> +<arg>"userTags": ${userTags}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"userTags": null</arg> +<arg>"userTags": ${userTags}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.436" endtime="20210602 14:11:44.436"></status> +</kw> +<msg timestamp="20210602 14:11:44.436" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestintercept", "policyType": "tsg_security", "action": "intercept", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc"...</msg> +<status status="PASS" starttime="20210602 14:11:44.435" endtime="20210602 14:11:44.437"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>doBlacklist</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${doBlacklist}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>doBlacklist</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.437" endtime="20210602 14:11:44.438"></status> +</kw> +<msg timestamp="20210602 14:11:44.438" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:44.438" level="INFO">${doBlacklist} = 0</msg> +<status status="PASS" starttime="20210602 14:11:44.437" endtime="20210602 14:11:44.438"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${doBlacklist}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"doBlacklist": 0</arg> +<arg>"doBlacklist": ${doBlacklist}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"doBlacklist": 0</arg> +<arg>"doBlacklist": ${doBlacklist}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.439" endtime="20210602 14:11:44.439"></status> +</kw> +<msg timestamp="20210602 14:11:44.439" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestintercept", "policyType": "tsg_security", "action": "intercept", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc"...</msg> +<status status="PASS" starttime="20210602 14:11:44.438" endtime="20210602 14:11:44.440"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>doLog</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${doLog}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>doLog</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.440" endtime="20210602 14:11:44.441"></status> +</kw> +<msg timestamp="20210602 14:11:44.441" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:44.441" level="INFO">${doLog} = 1</msg> +<status status="PASS" starttime="20210602 14:11:44.440" endtime="20210602 14:11:44.441"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${doLog}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"doLog": 1</arg> +<arg>"doLog": ${doLog}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"doLog": 1</arg> +<arg>"doLog": ${doLog}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.442" endtime="20210602 14:11:44.442"></status> +</kw> +<msg timestamp="20210602 14:11:44.443" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestintercept", "policyType": "tsg_security", "action": "intercept", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc"...</msg> +<status status="PASS" starttime="20210602 14:11:44.441" endtime="20210602 14:11:44.443"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>policyDesc</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${policyDesc}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>policyDesc</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.443" endtime="20210602 14:11:44.444"></status> +</kw> +<msg timestamp="20210602 14:11:44.444" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:44.444" level="INFO">${policyDesc} = autotest</msg> +<status status="PASS" starttime="20210602 14:11:44.443" endtime="20210602 14:11:44.444"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${policyDesc}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"policyDesc": "autotest"</arg> +<arg>"policyDesc": "${policyDesc}"</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"policyDesc": "autotest"</arg> +<arg>"policyDesc": "${policyDesc}"</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.445" endtime="20210602 14:11:44.445"></status> +</kw> +<msg timestamp="20210602 14:11:44.446" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestintercept", "policyType": "tsg_security", "action": "intercept", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc"...</msg> +<status status="PASS" starttime="20210602 14:11:44.445" endtime="20210602 14:11:44.446"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>effectiveRange</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${effectiveRange}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>effectiveRange</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.446" endtime="20210602 14:11:44.447"></status> +</kw> +<msg timestamp="20210602 14:11:44.447" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:44.447" level="INFO">${effectiveRange} = None</msg> +<status status="PASS" starttime="20210602 14:11:44.446" endtime="20210602 14:11:44.447"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${effectiveRange}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"effectiveRange": null</arg> +<arg>"effectiveRange": ${effectiveRange}</arg> +<arg>ELSE</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"effectiveRange": null</arg> +<arg>"effectiveRange": {}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"effectiveRange": null</arg> +<arg>"effectiveRange": {}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.448" endtime="20210602 14:11:44.449"></status> +</kw> +<msg timestamp="20210602 14:11:44.449" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestintercept", "policyType": "tsg_security", "action": "intercept", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc"...</msg> +<status status="PASS" starttime="20210602 14:11:44.448" endtime="20210602 14:11:44.449"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>userRegion</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${userRegion}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>userRegion</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.450" endtime="20210602 14:11:44.450"></status> +</kw> +<msg timestamp="20210602 14:11:44.450" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:44.450" level="INFO">${userRegion} = None</msg> +<status status="PASS" starttime="20210602 14:11:44.449" endtime="20210602 14:11:44.450"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>code</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${code}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>code</arg> +</arguments> +<msg timestamp="20210602 14:11:44.451" level="FAIL">Dictionary does not contain key 'code'.</msg> +<status status="FAIL" starttime="20210602 14:11:44.451" endtime="20210602 14:11:44.452"></status> +</kw> +<msg timestamp="20210602 14:11:44.452" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:44.452" level="INFO">${code} = Dictionary does not contain key 'code'.</msg> +<status status="PASS" starttime="20210602 14:11:44.451" endtime="20210602 14:11:44.452"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>message</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${message}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>message</arg> +</arguments> +<msg timestamp="20210602 14:11:44.453" level="FAIL">Dictionary does not contain key 'message'.</msg> +<status status="FAIL" starttime="20210602 14:11:44.453" endtime="20210602 14:11:44.453"></status> +</kw> +<msg timestamp="20210602 14:11:44.454" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:44.454" level="INFO">${message} = Dictionary does not contain key 'message'.</msg> +<status status="PASS" starttime="20210602 14:11:44.452" endtime="20210602 14:11:44.454"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>html_profile</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${html_profile}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>html_profile</arg> +</arguments> +<msg timestamp="20210602 14:11:44.455" level="FAIL">Dictionary does not contain key 'html_profile'.</msg> +<status status="FAIL" starttime="20210602 14:11:44.455" endtime="20210602 14:11:44.455"></status> +</kw> +<msg timestamp="20210602 14:11:44.456" level="INFO">${return} = FAIL</msg> +<msg timestamp="20210602 14:11:44.456" level="INFO">${html_profile} = Dictionary does not contain key 'html_profile'.</msg> +<status status="PASS" starttime="20210602 14:11:44.454" endtime="20210602 14:11:44.456"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${html_profile}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${html_profile}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${message}</arg> +</arguments> +<assign> +<var>${message}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${message}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.457" endtime="20210602 14:11:44.457"></status> +</kw> +<msg timestamp="20210602 14:11:44.458" level="INFO">${message} = Dictionary does not contain key 'message'.</msg> +<status status="PASS" starttime="20210602 14:11:44.456" endtime="20210602 14:11:44.458"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${html_profile}" != "None"</arg> +<arg>Set Variable</arg> +<arg>html_profile</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>message</arg> +</arguments> +<assign> +<var>${messageKey}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>message</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.459" endtime="20210602 14:11:44.459"></status> +</kw> +<msg timestamp="20210602 14:11:44.459" level="INFO">${messageKey} = message</msg> +<status status="PASS" starttime="20210602 14:11:44.458" endtime="20210602 14:11:44.460"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>keyring</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${keyring}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>keyring</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.460" endtime="20210602 14:11:44.461"></status> +</kw> +<msg timestamp="20210602 14:11:44.461" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:44.461" level="INFO">${keyring} = 1</msg> +<status status="PASS" starttime="20210602 14:11:44.460" endtime="20210602 14:11:44.461"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${keyring}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${keyring}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>""</arg> +</arguments> +<assign> +<var>${keyring}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${keyring}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.462" endtime="20210602 14:11:44.463"></status> +</kw> +<msg timestamp="20210602 14:11:44.463" level="INFO">${keyring} = 1</msg> +<status status="PASS" starttime="20210602 14:11:44.462" endtime="20210602 14:11:44.463"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>decryption</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${decryption}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>decryption</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.464" endtime="20210602 14:11:44.464"></status> +</kw> +<msg timestamp="20210602 14:11:44.465" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:44.465" level="INFO">${decryption} = 1</msg> +<status status="PASS" starttime="20210602 14:11:44.464" endtime="20210602 14:11:44.465"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${decryption}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${decryption}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>""</arg> +</arguments> +<assign> +<var>${decryption}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${decryption}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.466" endtime="20210602 14:11:44.466"></status> +</kw> +<msg timestamp="20210602 14:11:44.466" level="INFO">${decryption} = 1</msg> +<status status="PASS" starttime="20210602 14:11:44.465" endtime="20210602 14:11:44.467"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>decrypt_mirror</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${decrypt_mirror}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>decrypt_mirror</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.467" endtime="20210602 14:11:44.468"></status> +</kw> +<msg timestamp="20210602 14:11:44.468" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:44.468" level="INFO">${decrypt_mirror} = {'enable': 1, 'mirror_profile': 493}</msg> +<status status="PASS" starttime="20210602 14:11:44.467" endtime="20210602 14:11:44.468"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${decrypt_mirror}" != "None"</arg> +<arg>Set Variable</arg> +<arg>${decrypt_mirror}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>""</arg> +</arguments> +<assign> +<var>${decrypt_mirror}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${decrypt_mirror}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.469" endtime="20210602 14:11:44.470"></status> +</kw> +<msg timestamp="20210602 14:11:44.470" level="INFO">${decrypt_mirror} = {'enable': 1, 'mirror_profile': 493}</msg> +<status status="PASS" starttime="20210602 14:11:44.469" endtime="20210602 14:11:44.470"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${decrypt_mirror}</arg> +</arguments> +<assign> +<var>${decrypt_mirror}</var> +</assign> +<msg timestamp="20210602 14:11:44.471" level="INFO">${decrypt_mirror} = {"enable": 1, "mirror_profile": 493}</msg> +<status status="PASS" starttime="20210602 14:11:44.470" endtime="20210602 14:11:44.471"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>appIdObjects</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${appIdObjects}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>appIdObjects</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.472" endtime="20210602 14:11:44.472"></status> +</kw> +<msg timestamp="20210602 14:11:44.472" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:44.472" level="INFO">${appIdObjects} = ['http', 'ssl']</msg> +<status status="PASS" starttime="20210602 14:11:44.471" endtime="20210602 14:11:44.473"></status> +</kw> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${appIdObjectIds}</var> +</assign> +<msg timestamp="20210602 14:11:44.473" level="INFO">${appIdObjectIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:44.473" endtime="20210602 14:11:44.473"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>userRegionStr由:动作,协议,动作参数等决定,待完成;userregion在allow,monitor动作时多个协议为空;deny,多个协议时为子动作;Intercept,多个协议为空;http为,ssl为,判断appid对象的个数。</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.474" endtime="20210602 14:11:44.474"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<assign> +<var>${userRegionStr}</var> +</assign> +<msg timestamp="20210602 14:11:44.475" level="INFO">${userRegionStr} = </msg> +<status status="PASS" starttime="20210602 14:11:44.474" endtime="20210602 14:11:44.475"></status> +</kw> +<kw name="${key} IN [ @{appIdObjects} ]" type="for"> +<kw name="${key} = http" type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objprotol}</arg> +<arg>${key}</arg> +</arguments> +<assign> +<var>${appObjId}</var> +</assign> +<msg timestamp="20210602 14:11:44.476" level="INFO">${appObjId} = 75744</msg> +<status status="PASS" starttime="20210602 14:11:44.476" endtime="20210602 14:11:44.476"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${appIdObjectIds}</arg> +<arg>${appObjId}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.477" endtime="20210602 14:11:44.477"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${method}" == "block" or "${method}" == "alert"</arg> +<arg>Set Variable</arg> +<arg>{"protocol":"${key}","method": "${method}","code":${code},"${messageKey}":${message}}</arg> +<arg>ELSE IF</arg> +<arg>"${action}" == "deny"</arg> +<arg>Set Variable</arg> +<arg>{"protocol":"${key}","method": "${method}"}</arg> +<arg>ELSE IF</arg> +<arg>"${action}" == "intercept" and "${key}" == "ssl"</arg> +<arg>Set Variable</arg> +<arg>{"protocol":"SSL","keyring": ${keyring},"decryption":${decryption},"decrypt_mirror":${decrypt_mirror}}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>{"protocol":"HTTP"}</arg> +</arguments> +<assign> +<var>${userRegionStr}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"protocol":"HTTP"}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.478" endtime="20210602 14:11:44.478"></status> +</kw> +<msg timestamp="20210602 14:11:44.479" level="INFO">${userRegionStr} = {"protocol":"HTTP"}</msg> +<status status="PASS" starttime="20210602 14:11:44.477" endtime="20210602 14:11:44.479"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:44.476" endtime="20210602 14:11:44.479"></status> +</kw> +<kw name="${key} = ssl" type="foritem"> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${objprotol}</arg> +<arg>${key}</arg> +</arguments> +<assign> +<var>${appObjId}</var> +</assign> +<msg timestamp="20210602 14:11:44.480" level="INFO">${appObjId} = 77159</msg> +<status status="PASS" starttime="20210602 14:11:44.479" endtime="20210602 14:11:44.480"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${appIdObjectIds}</arg> +<arg>${appObjId}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.480" endtime="20210602 14:11:44.480"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${method}" == "block" or "${method}" == "alert"</arg> +<arg>Set Variable</arg> +<arg>{"protocol":"${key}","method": "${method}","code":${code},"${messageKey}":${message}}</arg> +<arg>ELSE IF</arg> +<arg>"${action}" == "deny"</arg> +<arg>Set Variable</arg> +<arg>{"protocol":"${key}","method": "${method}"}</arg> +<arg>ELSE IF</arg> +<arg>"${action}" == "intercept" and "${key}" == "ssl"</arg> +<arg>Set Variable</arg> +<arg>{"protocol":"SSL","keyring": ${keyring},"decryption":${decryption},"decrypt_mirror":${decrypt_mirror}}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>{"protocol":"HTTP"}</arg> +</arguments> +<assign> +<var>${userRegionStr}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"protocol":"SSL","keyring": ${keyring},"decryption":${decryption},"decrypt_mirror":${decrypt_mirror}}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.481" endtime="20210602 14:11:44.482"></status> +</kw> +<msg timestamp="20210602 14:11:44.482" level="INFO">${userRegionStr} = {"protocol":"SSL","keyring": 1,"decryption":1,"decrypt_mirror":{"enable": 1, "mirror_profile": 493}}</msg> +<status status="PASS" starttime="20210602 14:11:44.481" endtime="20210602 14:11:44.482"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:44.479" endtime="20210602 14:11:44.482"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:44.475" endtime="20210602 14:11:44.482"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${appIdObjects}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"appIdObjects": [null]</arg> +<arg>"appIdObjects": ${appIdObjectIds}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"appIdObjects": [null]</arg> +<arg>"appIdObjects": ${appIdObjectIds}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.483" endtime="20210602 14:11:44.484"></status> +</kw> +<msg timestamp="20210602 14:11:44.484" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestintercept", "policyType": "tsg_security", "action": "intercept", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc"...</msg> +<status status="PASS" starttime="20210602 14:11:44.483" endtime="20210602 14:11:44.484"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"userRegion": null</arg> +<arg>"userRegion": ${userRegionStr}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<msg timestamp="20210602 14:11:44.485" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestintercept", "policyType": "tsg_security", "action": "intercept", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc"...</msg> +<status status="PASS" starttime="20210602 14:11:44.484" endtime="20210602 14:11:44.485"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"userRegion": null</arg> +<arg>"userRegion": {}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<msg timestamp="20210602 14:11:44.486" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestintercept", "policyType": "tsg_security", "action": "intercept", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc"...</msg> +<status status="PASS" starttime="20210602 14:11:44.485" endtime="20210602 14:11:44.486"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>appSelectorObjects</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${appSelectorObjects}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>appSelectorObjects</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.486" endtime="20210602 14:11:44.487"></status> +</kw> +<msg timestamp="20210602 14:11:44.487" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:44.487" level="INFO">${appSelectorObjects} = None</msg> +<status status="PASS" starttime="20210602 14:11:44.486" endtime="20210602 14:11:44.487"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL"</arg> +<arg>Set Variable</arg> +<arg>${appSelectorObjects}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${appSelectorObjects}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${appSelectorObjects}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.488" endtime="20210602 14:11:44.489"></status> +</kw> +<msg timestamp="20210602 14:11:44.489" level="INFO">${appSelectorObjects} = None</msg> +<status status="PASS" starttime="20210602 14:11:44.488" endtime="20210602 14:11:44.489"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${appSelectorObjects}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"appSelectorObjects": "add"</arg> +<arg>"appSelectorObjects": ${appSelectorObjects}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${policyJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.490" endtime="20210602 14:11:44.490"></status> +</kw> +<msg timestamp="20210602 14:11:44.491" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestintercept", "policyType": "tsg_security", "action": "intercept", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc"...</msg> +<status status="PASS" starttime="20210602 14:11:44.490" endtime="20210602 14:11:44.491"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>isValid</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${isValid}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>isValid</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.492" endtime="20210602 14:11:44.492"></status> +</kw> +<msg timestamp="20210602 14:11:44.492" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:44.492" level="INFO">${isValid} = 1</msg> +<status status="PASS" starttime="20210602 14:11:44.491" endtime="20210602 14:11:44.493"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL"</arg> +<arg>Set Variable</arg> +<arg>${isValid}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${appSelectorObjects}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${isValid}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.493" endtime="20210602 14:11:44.494"></status> +</kw> +<msg timestamp="20210602 14:11:44.494" level="INFO">${appSelectorObjects} = 1</msg> +<status status="PASS" starttime="20210602 14:11:44.493" endtime="20210602 14:11:44.494"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${isValid}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"isValid": 1</arg> +<arg>"isValid": ${isValid}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>"isValid": 1</arg> +<arg>"isValid": ${isValid}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.495" endtime="20210602 14:11:44.496"></status> +</kw> +<msg timestamp="20210602 14:11:44.496" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestintercept", "policyType": "tsg_security", "action": "intercept", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc"...</msg> +<status status="PASS" starttime="20210602 14:11:44.495" endtime="20210602 14:11:44.496"></status> +</kw> +<kw name="Run Keyword And Ignore Error" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments and ignores possible error.</doc> +<arguments> +<arg>Get From Dictionary</arg> +<arg>${policyData}</arg> +<arg>scheduleId</arg> +</arguments> +<assign> +<var>${return}</var> +<var>${scheduleId}</var> +</assign> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyData}</arg> +<arg>scheduleId</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.497" endtime="20210602 14:11:44.498"></status> +</kw> +<msg timestamp="20210602 14:11:44.498" level="INFO">${return} = PASS</msg> +<msg timestamp="20210602 14:11:44.498" level="INFO">${scheduleId} = None</msg> +<status status="PASS" starttime="20210602 14:11:44.497" endtime="20210602 14:11:44.498"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL"</arg> +<arg>Set Variable</arg> +<arg>${scheduleId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${EMPTY}</arg> +</arguments> +<assign> +<var>${scheduleId}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${scheduleId}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.499" endtime="20210602 14:11:44.499"></status> +</kw> +<msg timestamp="20210602 14:11:44.500" level="INFO">${scheduleId} = None</msg> +<status status="PASS" starttime="20210602 14:11:44.499" endtime="20210602 14:11:44.500"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${return}"!="FAIL" and "${scheduleId}" != "None"</arg> +<arg>Replace String</arg> +<arg>${policyJson}</arg> +<arg>"scheduleId": [null]</arg> +<arg>"scheduleId": ${scheduleId}</arg> +<arg>ELSE</arg> +<arg>Set Variable</arg> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${policyJson}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.501" endtime="20210602 14:11:44.502"></status> +</kw> +<msg timestamp="20210602 14:11:44.502" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestintercept", "policyType": "tsg_security", "action": "intercept", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc"...</msg> +<status status="PASS" starttime="20210602 14:11:44.500" endtime="20210602 14:11:44.503"></status> +</kw> +<kw name="Replace String" library="String"> +<doc>Replaces ``search_for`` in the given ``string`` with ``replace_with``.</doc> +<arguments> +<arg>${policyJson}</arg> +<arg>[null]</arg> +<arg>[]</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<msg timestamp="20210602 14:11:44.504" level="INFO">${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestintercept", "policyType": "tsg_security", "action": "intercept", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc"...</msg> +<status status="PASS" starttime="20210602 14:11:44.503" endtime="20210602 14:11:44.504"></status> +</kw> +<kw name="Loads" library="json"> +<doc>Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance +containing a JSON document) to a Python object.</doc> +<arguments> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyJson}</var> +</assign> +<msg timestamp="20210602 14:11:44.504" level="INFO">${policyJson} = {'opAction': 'add', 'returnData': '1', 'policyList': {'policyName': 'autotestintercept', 'policyType': 'tsg_security', 'action': 'intercept', 'userTags': '', 'doBlacklist': 0, 'doLog': 1, 'policyDesc'...</msg> +<status status="PASS" starttime="20210602 14:11:44.504" endtime="20210602 14:11:44.505"></status> +</kw> +<kw name="CreatePolilcy" library="policy"> +<doc>场景策略:secuiryt、proxy策略 +数据分离,测试数据来自对应的yaml文件 +参数 ${policyList}</doc> +<arguments> +<arg>${policyJson}</arg> +</arguments> +<assign> +<var>${policyIds}</var> +</assign> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数</arg> +<arg>${filepath}读取文件路径</arg> +<arg>${filename}读取文件名</arg> +<arg>${keywords}获取数据关键字</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.507" endtime="20210602 14:11:44.508"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>创建策略</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:44.508" endtime="20210602 14:11:44.508"></status> +</kw> +<kw name="Get From Dictionary" library="Collections"> +<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> +<arguments> +<arg>${policyList}</arg> +<arg>returnData</arg> +</arguments> +<assign> +<var>${returnData}</var> +</assign> +<msg timestamp="20210602 14:11:44.509" level="INFO">${returnData} = 1</msg> +<status status="PASS" starttime="20210602 14:11:44.508" endtime="20210602 14:11:44.509"></status> +</kw> +<kw name="Dumps" library="json"> +<doc>Serialize ``obj`` to a JSON formatted ``str``.</doc> +<arguments> +<arg>${policyList}</arg> +</arguments> +<assign> +<var>${bodyJson}</var> +</assign> +<msg timestamp="20210602 14:11:44.510" level="INFO">${bodyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestintercept", "policyType": "tsg_security", "action": "intercept", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc"...</msg> +<status status="PASS" starttime="20210602 14:11:44.509" endtime="20210602 14:11:44.510"></status> +</kw> +<kw name="BasePostRequestForV2" library="common"> +<arguments> +<arg>${policyUrl}</arg> +<arg>${bodyJson}</arg> +<arg>${version2}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>{"Authorization":"${token}","Content-Type":"application/json"}</arg> +</arguments> +<assign> +<var>${headers}</var> +</assign> +<msg timestamp="20210602 14:11:44.511" level="INFO">${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}</msg> +<status status="PASS" starttime="20210602 14:11:44.511" endtime="20210602 14:11:44.511"></status> +</kw> +<kw name="Create Session" library="RequestsLibrary"> +<doc>Create Session: create a HTTP session to a server</doc> +<arguments> +<arg>api</arg> +<arg>http://${host}:${port}/${apiVersion}</arg> +<arg>${headers}</arg> +</arguments> +<msg timestamp="20210602 14:11:44.512" level="INFO">Creating Session using : alias=api, url=http://192.168.44.72:8080/v2, headers={'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg> +<status status="PASS" starttime="20210602 14:11:44.511" endtime="20210602 14:11:44.513"></status> +</kw> +<kw name="Post Request" library="RequestsLibrary"> +<doc>Send a POST request on the session object found using the +given `alias`</doc> +<arguments> +<arg>api</arg> +<arg>${requestUri}</arg> +<arg>data=${data}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:44.513" level="INFO">POST Request using : uri=/policy/compile, params=None, files=None, allow_redirects=True, timeout=None +headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&', 'Content-Type': 'application/json'} +data={"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestintercept", "policyType": "tsg_security", "action": "intercept", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "effectiveRange": {}, "userRegion": {"protocol": "SSL", "keyring": 1, "decryption": 1, "decrypt_mirror": {"enable": 1, "mirror_profile": 493}}, "source": [{"objectId": 107896, "protocolField": "TSG_SECURITY_SOURCE_ADDR"}, {"objectId": 107898, "protocolField": "TSG_SECURITY_SOURCE_LOCATION"}, {"objectId": 107899, "protocolField": "TSG_FILED_GTP_IMSI"}, {"objectId": 107900, "protocolField": "TSG_FILED_GTP_PHONE_NUMBER"}, {"objectId": 107901, "protocolField": "TSG_FILED_GTP_APN"}, {"objectId": 107902, "protocolField": "TSG_SECURITY_SOURCE_ADDR"}], "destination": [{"objectId": 107903, "protocolField": "TSG_SECURITY_DESTINATION_ADDR"}, {"objectId": 107904, "protocolField": "TSG_SECURITY_DESTINATION_LOCATION"}, {"objectId": 107905, "protocolField": "TSG_SECURITY_DESTINATION_ADDR"}], "filterList": [], "appIdObjects": [75744, 77159], "appSelectorObjects": [], "isValid": 1, "scheduleId": []}} +json=None</msg> +<msg timestamp="20210602 14:11:45.180" level="INFO">${response} = <Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:44.513" endtime="20210602 14:11:45.181"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>return data =${response}</arg> +</arguments> +<msg timestamp="20210602 14:11:45.184" level="INFO">return data =<Response [200]></msg> +<status status="PASS" starttime="20210602 14:11:45.183" endtime="20210602 14:11:45.185"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${response.status_code}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:45.188" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:45.187" endtime="20210602 14:11:45.189"></status> +</kw> +<kw name="To Json" library="RequestsLibrary"> +<doc>Convert a string to a JSON object</doc> +<arguments> +<arg>${response.content}</arg> +</arguments> +<assign> +<var>${response}</var> +</assign> +<msg timestamp="20210602 14:11:45.192" level="INFO">To JSON using : content={ + "code" : 200, + "msg" : "Success", + "data" : { + "policyList" : [ { + "action" : "intercept", + "appIdObjects" : [ 75744, 77159 ], + "appSelectorObjects" : [ ], + "destination" : [ { + "objectId" : 107903, + "protocolField" : "TSG_SECURITY_DESTINATION_ADDR" + }, { + "objectId" : 107904, + "protocolField" : "TSG_SECURITY_DESTINATION_LOCATION" + }, { + "objectId" : 107905, + "protocolField" : "TSG_SECURITY_DESTINATION_ADDR" + } ], + "doLog" : 1, + "effectiveRange" : { }, + "evaluationLayer" : "any_layer", + "evaluationOrder" : 0.0, + "evaluationStage" : 0, + "filterList" : [ ], + "isInitialize" : 0, + "isValid" : 1, + "opTime" : "2021-06-02 14:11:44", + "opUser" : 425, + "policyDesc" : "autotest", + "policyId" : 52342, + "policyName" : "autotestintercept", + "policyType" : "tsg_security", + "scheduleId" : [ ], + "source" : [ { + "objectId" : 107896, + "protocolField" : "TSG_SECURITY_SOURCE_ADDR" + }, { + "objectId" : 107898, + "protocolField" : "TSG_SECURITY_SOURCE_LOCATION" + }, { + "objectId" : 107899, + "protocolField" : "TSG_FILED_GTP_IMSI" + }, { + "objectId" : 107900, + "protocolField" : "TSG_FILED_GTP_PHONE_NUMBER" + }, { + "objectId" : 107901, + "protocolField" : "TSG_FILED_GTP_APN" + }, { + "objectId" : 107902, + "protocolField" : "TSG_SECURITY_SOURCE_ADDR" + } ], + "userRegion" : { + "protocol" : "SSL", + "keyring" : 1, + "decryption" : 1, + "decrypt_mirror" : { + "enable" : 1, + "mirror_profile" : 493 + } + }, + "userTags" : "" + } ] + }, + "success" : true +} </msg> +<msg timestamp="20210602 14:11:45.193" level="INFO">To JSON using : pretty_print=False </msg> +<msg timestamp="20210602 14:11:45.193" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'policyList': [{'action': 'intercept', 'appIdObjects': [75744, 77159], 'appSelectorObjects': [], 'destination': [{'objectId': 107903, 'protocolField': 'TSG_SEC...</msg> +<status status="PASS" starttime="20210602 14:11:45.191" endtime="20210602 14:11:45.194"></status> +</kw> +<msg timestamp="20210602 14:11:45.195" level="INFO">${response} = {'code': 200, 'msg': 'Success', 'data': {'policyList': [{'action': 'intercept', 'appIdObjects': [75744, 77159], 'appSelectorObjects': [], 'destination': [{'objectId': 107903, 'protocolField': 'TSG_SEC...</msg> +<status status="PASS" starttime="20210602 14:11:44.510" endtime="20210602 14:11:45.195"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>"${returnData}" == "1"</arg> +<arg>GetPolicyIds</arg> +<arg>${response}</arg> +<arg>ELSE</arg> +<arg>Create List</arg> +</arguments> +<assign> +<var>${policyIds}</var> +</assign> +<kw name="GetPolicyIds" library="process_policy_body"> +<doc>获取结果中的策略类型及ID +策略接口返回json串 +返回结果格式:[{'policyType': 'tsg_security', 'policyIds': [108480]}, {'policyType': 'tsg_security', 'policyIds': [108481]}, {'policyType': 'tsg_security', 'policyIds': [108482]}, {'policyType': 'tsg_security', 'policyIds': [108483]}, {'policyType': 'tsg_security', 'policyIds': [108484]}]</doc> +<arguments> +<arg>${response}</arg> +</arguments> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<assign> +<var>${policyIds}</var> +</assign> +<msg timestamp="20210602 14:11:45.199" level="INFO">${policyIds} = []</msg> +<status status="PASS" starttime="20210602 14:11:45.199" endtime="20210602 14:11:45.200"></status> +</kw> +<kw name="${policy} IN [ @{value['data']['policyList']} ]" type="for"> +<kw name="${policy} = {'action': 'intercept', 'appIdObjects': [75744, 77159], 'appSelectorObjects': [], 'destination': [{'objectId': 107903, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}, {'objectId': 107904, 'protocol..." type="foritem"> +<kw name="Create List" library="BuiltIn"> +<doc>Returns a list containing given items.</doc> +<arguments> +<arg>${policy['policyId']}</arg> +</arguments> +<assign> +<var>${policyIdList}</var> +</assign> +<msg timestamp="20210602 14:11:45.202" level="INFO">${policyIdList} = [52342]</msg> +<status status="PASS" starttime="20210602 14:11:45.201" endtime="20210602 14:11:45.202"></status> +</kw> +<kw name="Create Dictionary" library="BuiltIn"> +<doc>Creates and returns a dictionary based on the given ``items``.</doc> +<arguments> +<arg>policyType=${policy['policyType']}</arg> +<arg>policyIds=${policyIdList}</arg> +</arguments> +<assign> +<var>${policyObj}</var> +</assign> +<msg timestamp="20210602 14:11:45.204" level="INFO">${policyObj} = {'policyType': 'tsg_security', 'policyIds': [52342]}</msg> +<status status="PASS" starttime="20210602 14:11:45.203" endtime="20210602 14:11:45.204"></status> +</kw> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${policyIds}</arg> +<arg>${policyObj}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:45.205" endtime="20210602 14:11:45.205"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:45.201" endtime="20210602 14:11:45.206"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:45.200" endtime="20210602 14:11:45.206"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>${policyIds}</arg> +</arguments> +<msg timestamp="20210602 14:11:45.207" level="INFO">[{'policyType': 'tsg_security', 'policyIds': [52342]}]</msg> +<status status="PASS" starttime="20210602 14:11:45.206" endtime="20210602 14:11:45.207"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:45.198" endtime="20210602 14:11:45.208"></status> +</kw> +<msg timestamp="20210602 14:11:45.208" level="INFO">${policyIds} = [{'policyType': 'tsg_security', 'policyIds': [52342]}]</msg> +<status status="PASS" starttime="20210602 14:11:45.196" endtime="20210602 14:11:45.208"></status> +</kw> +<kw name="Set Variable" library="BuiltIn"> +<doc>Returns the given values which can then be assigned to a variables.</doc> +<arguments> +<arg>${response['code']}</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:45.209" level="INFO">${rescode} = 200</msg> +<status status="PASS" starttime="20210602 14:11:45.209" endtime="20210602 14:11:45.209"></status> +</kw> +<kw name="Should Be Equal As Strings" library="BuiltIn"> +<doc>Fails if objects are unequal after converting them to strings.</doc> +<arguments> +<arg>${rescode}</arg> +<arg>200</arg> +</arguments> +<msg timestamp="20210602 14:11:45.210" level="INFO">Argument types are: +<class 'int'> +<type 'unicode'></msg> +<status status="PASS" starttime="20210602 14:11:45.210" endtime="20210602 14:11:45.211"></status> +</kw> +<msg timestamp="20210602 14:11:45.211" level="INFO">${policyIds} = [{'policyType': 'tsg_security', 'policyIds': [52342]}]</msg> +<status status="PASS" starttime="20210602 14:11:44.507" endtime="20210602 14:11:45.211"></status> +</kw> +<msg timestamp="20210602 14:11:45.212" level="INFO">${objectId} = [107896, 107897, 107898, 107899, 107900, 107901, 107902, 107903, 107904, 107905]</msg> +<msg timestamp="20210602 14:11:45.212" level="INFO">${policyId} = [{'policyType': 'tsg_security', 'policyIds': [52342]}]</msg> +<status status="PASS" starttime="20210602 14:11:38.352" endtime="20210602 14:11:45.212"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${objectIds}</arg> +<arg>${objectId}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:45.225" endtime="20210602 14:11:45.225"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:45.226" endtime="20210602 14:11:45.226"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = 107896" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:45.227" endtime="20210602 14:11:45.227"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:45.226" endtime="20210602 14:11:45.227"></status> +</kw> +<kw name="${objdict} = 107897" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:45.228" endtime="20210602 14:11:45.228"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:45.227" endtime="20210602 14:11:45.228"></status> +</kw> +<kw name="${objdict} = 107898" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:45.228" endtime="20210602 14:11:45.229"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:45.228" endtime="20210602 14:11:45.229"></status> +</kw> +<kw name="${objdict} = 107899" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:45.230" endtime="20210602 14:11:45.230"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:45.229" endtime="20210602 14:11:45.230"></status> +</kw> +<kw name="${objdict} = 107900" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:45.231" endtime="20210602 14:11:45.231"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:45.230" endtime="20210602 14:11:45.232"></status> +</kw> +<kw name="${objdict} = 107901" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:45.232" endtime="20210602 14:11:45.232"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:45.232" endtime="20210602 14:11:45.233"></status> +</kw> +<kw name="${objdict} = 107902" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:45.233" endtime="20210602 14:11:45.234"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:45.233" endtime="20210602 14:11:45.234"></status> +</kw> +<kw name="${objdict} = 107903" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:45.234" endtime="20210602 14:11:45.235"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:45.234" endtime="20210602 14:11:45.235"></status> +</kw> +<kw name="${objdict} = 107904" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:45.235" endtime="20210602 14:11:45.236"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:45.235" endtime="20210602 14:11:45.236"></status> +</kw> +<kw name="${objdict} = 107905" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:45.236" endtime="20210602 14:11:45.237"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:45.236" endtime="20210602 14:11:45.237"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:45.226" endtime="20210602 14:11:45.237"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:45.224" endtime="20210602 14:11:45.237"></status> +</kw> +<kw name="AppendListToList" library="common"> +<doc>把${addList}逐个添加到${souceList},然后返回 ${souceList} +入参:${souceList} ${addList} +出:参${souceList}</doc> +<arguments> +<arg>${policyIds}</arg> +<arg>${policyId}</arg> +</arguments> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>参数${objids}拼接后的list;参数${objectIds}对象ids</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:45.248" endtime="20210602 14:11:45.248"></status> +</kw> +<kw name="Comment" library="BuiltIn"> +<doc>Displays the given messages in the log file as keyword arguments.</doc> +<arguments> +<arg>如果参数${objectIds}返回多个id则逐个添加</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:45.249" endtime="20210602 14:11:45.249"></status> +</kw> +<kw name="${objdict} IN [ @{addList} ]" type="for"> +<kw name="${objdict} = {'policyType': 'tsg_security', 'policyIds': [52342]}" type="foritem"> +<kw name="Append To List" library="Collections"> +<doc>Adds ``values`` to the end of ``list``.</doc> +<arguments> +<arg>${souceList}</arg> +<arg>${objdict}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:45.250" endtime="20210602 14:11:45.250"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:45.249" endtime="20210602 14:11:45.250"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:45.249" endtime="20210602 14:11:45.250"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:45.247" endtime="20210602 14:11:45.250"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:38.347" endtime="20210602 14:11:45.251"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:21.768" endtime="20210602 14:11:45.251"></status> +</kw> +<msg timestamp="20210602 14:11:45.251" level="INFO">${objectIds} = [107866, 107867, 107868, 107869, 107870, 107871, 107872, 107873, 107874, 107875, 107876, 107877, 107878, 107879, 107880, 107881, 107882, 107883, 107884, 107885, 107886, 107887, 107888, 107889, 107890,...</msg> +<msg timestamp="20210602 14:11:45.252" level="INFO">${policyIds} = [{'policyType': 'tsg_security', 'policyIds': [52340]}, {'policyType': 'tsg_security', 'policyIds': [52341]}, {'policyType': 'tsg_security', 'policyIds': [52342]}]</msg> +<status status="PASS" starttime="20210602 14:11:21.694" endtime="20210602 14:11:45.252"></status> +</kw> +<tags> +<tag>admission</tag> +<tag>basic</tag> +</tags> +<status status="PASS" starttime="20210602 14:11:21.692" endtime="20210602 14:11:45.252" critical="yes"></status> +</test> +<status status="PASS" starttime="20210602 14:11:21.591" endtime="20210602 14:11:45.253"></status> +</suite> +<status status="PASS" starttime="20210602 14:11:21.588" endtime="20210602 14:11:45.255"></status> +</suite> +<status status="PASS" starttime="20210602 14:11:21.585" endtime="20210602 14:11:45.257"></status> +</suite> +<status status="PASS" starttime="20210602 14:11:21.581" endtime="20210602 14:11:45.259"></status> +</suite> +<kw name="LogoutAndDelLocalIP" library="login_logout_switch" type="teardown"> +<tags> +<tag>adc_api</tag> +<tag>adc_log</tag> +<tag>adc_verify</tag> +<tag>tsg_adc</tag> +<tag>tsg_adc_wp</tag> +<tag>tsg_bf_api</tag> +<tag>tsg_device</tag> +</tags> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>'${loginType}' == 'api'</arg> +<arg>BifangLogoutAndDelLocalIP</arg> +<arg>ELSE IF</arg> +<arg>'${loginType}' != '${None}'</arg> +<arg>UiLogoutAndDelLocalIP</arg> +</arguments> +<kw name="BifangLogoutAndDelLocalIP" library="login_logout"> +<tags> +<tag>tsg_adc</tag> +<tag>tsg_bf_api</tag> +</tags> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>ApiLogoutAndDelLocalIP</arg> +</arguments> +<msg timestamp="20210602 14:11:45.262" level="INFO">ApiLogoutAndDelLocalIP</msg> +<status status="PASS" starttime="20210602 14:11:45.262" endtime="20210602 14:11:45.263"></status> +</kw> +<kw name="Log" library="BuiltIn"> +<doc>Logs the given message with the given level.</doc> +<arguments> +<arg>to_LogoutAndDelLocalIP_LogoutAndDelLocalIP</arg> +</arguments> +<msg timestamp="20210602 14:11:45.263" level="INFO">to_LogoutAndDelLocalIP_LogoutAndDelLocalIP</msg> +<status status="PASS" starttime="20210602 14:11:45.263" endtime="20210602 14:11:45.263"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${addTsgUIAPIFlag}==1</arg> +<arg>SecurityPolicyAllowTSGUIAPIDEL</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:45.264" endtime="20210602 14:11:45.264"></status> +</kw> +<kw name="Run Keyword If" library="BuiltIn"> +<doc>Runs the given keyword with the given arguments, if ``condition`` is true.</doc> +<arguments> +<arg>${addTestClentIPFlag}==1</arg> +<arg>DelLocalIPObject</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:45.264" endtime="20210602 14:11:45.264"></status> +</kw> +<kw name="ApiLogout" library="login_logout"> +<tags> +<tag>tsg_adc</tag> +<tag>tsg_bf_api</tag> +</tags> +<kw name="Post" library="REST"> +<tags> +<tag>http</tag> +</tags> +<doc>*Sends a POST request to the endpoint.*</doc> +<arguments> +<arg>/${version}/user/logout</arg> +<arg>headers=${headers}</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:45.265" endtime="20210602 14:11:45.312"></status> +</kw> +<kw name="Object" library="REST"> +<tags> +<tag>assertions</tag> +</tags> +<doc>*Asserts the field as JSON object.*</doc> +<arguments> +<arg>response body</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:45.312" endtime="20210602 14:11:45.313"></status> +</kw> +<kw name="Integer" library="REST"> +<tags> +<tag>assertions</tag> +</tags> +<doc>*Asserts the field as JSON integer.*</doc> +<arguments> +<arg>$.code</arg> +<arg>200</arg> +</arguments> +<status status="PASS" starttime="20210602 14:11:45.313" endtime="20210602 14:11:45.359"></status> +</kw> +<kw name="Integer" library="REST"> +<tags> +<tag>assertions</tag> +</tags> +<doc>*Asserts the field as JSON integer.*</doc> +<arguments> +<arg>$.code</arg> +</arguments> +<assign> +<var>${rescode}</var> +</assign> +<msg timestamp="20210602 14:11:45.386" level="INFO">${rescode} = [200]</msg> +<status status="PASS" starttime="20210602 14:11:45.359" endtime="20210602 14:11:45.386"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:45.265" endtime="20210602 14:11:45.387"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:45.262" endtime="20210602 14:11:45.387"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:45.261" endtime="20210602 14:11:45.387"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:45.260" endtime="20210602 14:11:45.388"></status> +</kw> +<status status="PASS" starttime="20210602 14:11:19.695" endtime="20210602 14:11:45.388"></status> +</suite> +<statistics> +<total> +<stat pass="1" fail="0">Critical Tests</stat> +<stat pass="1" fail="0">All Tests</stat> +</total> +<tag> +<stat pass="1" fail="0">admission</stat> +<stat pass="1" fail="0">basic</stat> +</tag> +<suite> +<stat pass="1" fail="0" id="s1" name="Gap Tsg Api">Gap Tsg Api</stat> +<stat pass="1" fail="0" id="s1-s1" name="Case">Gap Tsg Api.Case</stat> +<stat pass="1" fail="0" id="s1-s1-s1" name="Security">Gap Tsg Api.Case.Security</stat> +<stat pass="1" fail="0" id="s1-s1-s1-s1" name="Http">Gap Tsg Api.Case.Security.Http</stat> +<stat pass="1" fail="0" id="s1-s1-s1-s1-s1" name="Demo">Gap Tsg Api.Case.Security.Http.Demo</stat> +</suite> +</statistics> +<errors> +<msg timestamp="20210602 14:11:21.687" level="ERROR">Error in file 'C:\Users\admin\Desktop\gap_tsg_api\gap_tsg_api\case\security\http\demo.robot': Resource file '..\..\..\keyword\common\verify.robot' does not exist.</msg> +</errors> +</robot> |
