adc_api
adc_log
adc_verify
tsg_adc
tsg_adc_wp
tsg_bf_api
tsg_device
Runs the given keyword with the given arguments, if ``condition`` is true.
'${loginType}' == 'api'
BifangLoginAndAddLocalIP
ELSE IF
'${loginType}' != '${None}'
UiLoginAndAddLocalIP
tsg_adc
tsg_bf_api
Logs the given message with the given level.
ApiLoginAndAddLocalIP
ApiLoginAndAddLocalIP
http
*Sends a GET request to the endpoint.*
/${version}/user/encryptpwd?password=${password}
assertions
*Asserts the field as JSON object.*
response body
assertions
*Asserts the field as JSON integer.*
$.code
200
assertions
*Asserts the field as JSON string.*
$.data.encryptpwd
${pwd}
${pwd} = ['Gg1Etyh7fs1y/v/K2XOJDg==']
Returns the value specified with an ``index`` from ``list``.
${pwd}
0
${pwdstr}
${pwdstr} = Gg1Etyh7fs1y/v/K2XOJDg==
Logs the given message with the given level.
${pwdstr}
Gg1Etyh7fs1y/v/K2XOJDg==
Makes a variable available globally in all tests and suites.
${encodePassword}
${pwdstr}
${encodePassword} = Gg1Etyh7fs1y/v/K2XOJDg==
Logs the given message with the given level.
${encodePassword}
Gg1Etyh7fs1y/v/K2XOJDg==
http
*Sends a POST request to the endpoint.*
/${version}/user/login?username=${username}&password=${encodePassword}&authMode=${authmode}
assertions
*Asserts the field as JSON object.*
response body
assertions
*Asserts the field as JSON integer.*
$.code
200
assertions
*Asserts the field as JSON integer.*
$.code
${rescode}
${rescode} = [200]
Logs the given message with the given level.
${rescode}
[200]
assertions
*Asserts the field as JSON string.*
$.data.token
${tokenGlobal}
${tokenGlobal} = ['e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&']
Returns the value specified with an ``index`` from ``list``.
${tokenGlobal}
0
${tokenStr}
${tokenStr} = e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&
Logs the given message with the given level.
${tokenStr}
e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&
Makes a variable available globally in all tests and suites.
${token}
${tokenStr}
${token} = e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&
Logs the given message with the given level.
${token}
e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&
Makes a variable available globally in all tests and suites.
${headers}
{"Contest-Type":"application/json","Authorization":"${token}"}
${headers} = {"Contest-Type":"application/json","Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&"}
Creates and returns a dictionary based on the given ``items``.
${appDict}
${appDict} = {}
Creates and returns a dictionary based on the given ``items``.
${appVDict}
${appVDict} = {}
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`.
pymysql
${mysqlHost}
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'))
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.
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'
${app_id}
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'
${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'))
Returns and logs the length of the given item as an integer.
${app_id}
${app_length}
Length is 8
${app_length} = 8
Logs the given message with the given level.
${n}
0
Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``.
${appDict}
${app_id}[${n}][2]=${app_id}[${n}][0]
Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``.
${appVDict}
${app_id}[${n}][2]=${app_id}[${n}][1]
Logs the given message with the given level.
${appDict}
{'dns': 75167}
Logs the given message with the given level.
${appVDict}
{'dns': 32}
Logs the given message with the given level.
${n}
1
Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``.
${appDict}
${app_id}[${n}][2]=${app_id}[${n}][0]
Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``.
${appVDict}
${app_id}[${n}][2]=${app_id}[${n}][1]
Logs the given message with the given level.
${appDict}
{'dns': 75167, 'ftp': 75479}
Logs the given message with the given level.
${appVDict}
{'dns': 32, 'ftp': 45}
Logs the given message with the given level.
${n}
2
Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``.
${appDict}
${app_id}[${n}][2]=${app_id}[${n}][0]
Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``.
${appVDict}
${app_id}[${n}][2]=${app_id}[${n}][1]
Logs the given message with the given level.
${appDict}
{'dns': 75167, 'ftp': 75479, 'http': 75744}
Logs the given message with the given level.
${appVDict}
{'dns': 32, 'ftp': 45, 'http': 67}
Logs the given message with the given level.
${n}
3
Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``.
${appDict}
${app_id}[${n}][2]=${app_id}[${n}][0]
Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``.
${appVDict}
${app_id}[${n}][2]=${app_id}[${n}][1]
Logs the given message with the given level.
${appDict}
{'dns': 75167, 'ftp': 75479, 'http': 75744, 'rtp': 76907}
Logs the given message with the given level.
${appVDict}
{'dns': 32, 'ftp': 45, 'http': 67, 'rtp': 175}
Logs the given message with the given level.
${n}
4
Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``.
${appDict}
${app_id}[${n}][2]=${app_id}[${n}][0]
Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``.
${appVDict}
${app_id}[${n}][2]=${app_id}[${n}][1]
Logs the given message with the given level.
${appDict}
{'dns': 75167, 'ftp': 75479, 'http': 75744, 'rtp': 76907, 'sip': 77048}
Logs the given message with the given level.
${appVDict}
{'dns': 32, 'ftp': 45, 'http': 67, 'rtp': 175, 'sip': 182}
Logs the given message with the given level.
${n}
5
Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``.
${appDict}
${app_id}[${n}][2]=${app_id}[${n}][0]
Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``.
${appVDict}
${app_id}[${n}][2]=${app_id}[${n}][1]
Logs the given message with the given level.
${appDict}
{'dns': 75167, 'ftp': 75479, 'http': 75744, 'rtp': 76907, 'sip': 77048, 'ssl': 77159}
Logs the given message with the given level.
${appVDict}
{'dns': 32, 'ftp': 45, 'http': 67, 'rtp': 175, 'sip': 182, 'ssl': 199}
Logs the given message with the given level.
${n}
6
Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``.
${appDict}
${app_id}[${n}][2]=${app_id}[${n}][0]
Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``.
${appVDict}
${app_id}[${n}][2]=${app_id}[${n}][1]
Logs the given message with the given level.
${appDict}
{'dns': 75167, 'ftp': 75479, 'http': 75744, 'rtp': 76907, 'sip': 77048, 'ssl': 77159, 'MAIL': 77950}
Logs the given message with the given level.
${appVDict}
{'dns': 32, 'ftp': 45, 'http': 67, 'rtp': 175, 'sip': 182, 'ssl': 199, 'MAIL': 8004}
Logs the given message with the given level.
${n}
7
Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``.
${appDict}
${app_id}[${n}][2]=${app_id}[${n}][0]
Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``.
${appVDict}
${app_id}[${n}][2]=${app_id}[${n}][1]
Logs the given message with the given level.
${appDict}
{'dns': 75167, 'ftp': 75479, 'http': 75744, 'rtp': 76907, 'sip': 77048, 'ssl': 77159, 'MAIL': 77950, 'DoH': 77952}
Logs the given message with the given level.
${appVDict}
{'dns': 32, 'ftp': 45, 'http': 67, 'rtp': 175, 'sip': 182, 'ssl': 199, 'MAIL': 8004, 'DoH': 8006}
Disconnects from the database.
Executing : Disconnect From Database
Makes a variable available globally in all tests and suites.
${objprotol}
${appDict}
${objprotol} = {'dns': 75167, 'ftp': 75479, 'http': 75744, 'rtp': 76907, 'sip': 77048, 'ssl': 77159, 'MAIL': 77950, 'DoH': 77952}
Makes a variable available globally in all tests and suites.
${appportol}
${appVDict}
${appportol} = {'dns': 32, 'ftp': 45, 'http': 67, 'rtp': 175, 'sip': 182, 'ssl': 199, 'MAIL': 8004, 'DoH': 8006}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objprotol}
http
${HTTP_ID1}
${HTTP_ID1} = 75744
Returns a value from the given ``dictionary`` based on the given ``key``.
${objprotol}
rtp
${RTP_ID1}
${RTP_ID1} = 76907
Returns a value from the given ``dictionary`` based on the given ``key``.
${objprotol}
dns
${DNS_ID1}
${DNS_ID1} = 75167
Returns a value from the given ``dictionary`` based on the given ``key``.
${objprotol}
MAIL
${MAIL_ID1}
${MAIL_ID1} = 77950
Returns a value from the given ``dictionary`` based on the given ``key``.
${objprotol}
ftp
${FTP_ID1}
${FTP_ID1} = 75479
Returns a value from the given ``dictionary`` based on the given ``key``.
${objprotol}
sip
${SIP_ID1}
${SIP_ID1} = 77048
Returns a value from the given ``dictionary`` based on the given ``key``.
${objprotol}
ssl
${SSL_ID1}
${SSL_ID1} = 77159
Returns a value from the given ``dictionary`` based on the given ``key``.
${objprotol}
DoH
${DOH_ID1}
${DOH_ID1} = 77952
Makes a variable available globally in all tests and suites.
${HTTP_ID}
${HTTP_ID1}
${HTTP_ID} = 75744
Makes a variable available globally in all tests and suites.
${RTP_ID}
${RTP_ID1}
${RTP_ID} = 76907
Makes a variable available globally in all tests and suites.
${DNS_ID}
${DNS_ID1}
${DNS_ID} = 75167
Makes a variable available globally in all tests and suites.
${MAIL_ID}
${MAIL_ID1}
${MAIL_ID} = 77950
Makes a variable available globally in all tests and suites.
${FTP_ID}
${FTP_ID1}
${FTP_ID} = 75479
Makes a variable available globally in all tests and suites.
${SIP_ID}
${SIP_ID1}
${SIP_ID} = 77048
Makes a variable available globally in all tests and suites.
${SSL_ID}
${SSL_ID1}
${SSL_ID} = 77159
Makes a variable available globally in all tests and suites.
${DOH_ID}
${DOH_ID1}
${DOH_ID} = 77952
Returns a value from the given ``dictionary`` based on the given ``key``.
${appportol}
http
${HTTP_VID1}
${HTTP_VID1} = 67
Returns a value from the given ``dictionary`` based on the given ``key``.
${appportol}
rtp
${RTP_VID1}
${RTP_VID1} = 175
Returns a value from the given ``dictionary`` based on the given ``key``.
${appportol}
dns
${DNS_VID1}
${DNS_VID1} = 32
Returns a value from the given ``dictionary`` based on the given ``key``.
${appportol}
MAIL
${MAIL_VID1}
${MAIL_VID1} = 8004
Returns a value from the given ``dictionary`` based on the given ``key``.
${appportol}
ftp
${FTP_VID1}
${FTP_VID1} = 45
Returns a value from the given ``dictionary`` based on the given ``key``.
${appportol}
sip
${SIP_VID1}
${SIP_VID1} = 182
Returns a value from the given ``dictionary`` based on the given ``key``.
${appportol}
ssl
${SSL_VID1}
${SSL_VID1} = 199
Returns a value from the given ``dictionary`` based on the given ``key``.
${appportol}
DoH
${DOH_VID1}
${DOH_VID1} = 8006
Makes a variable available globally in all tests and suites.
${HTTP_VID}
${HTTP_VID1}
${HTTP_VID} = 67
Makes a variable available globally in all tests and suites.
${RTP_VID}
${RTP_VID1}
${RTP_VID} = 175
Makes a variable available globally in all tests and suites.
${DNS_VID}
${DNS_VID1}
${DNS_VID} = 32
Makes a variable available globally in all tests and suites.
${MAIL_VID}
${MAIL_VID1}
${MAIL_VID} = 8004
Makes a variable available globally in all tests and suites.
${FTP_VID}
${FTP_VID1}
${FTP_VID} = 45
Makes a variable available globally in all tests and suites.
${SIP_VID}
${SIP_VID1}
${SIP_VID} = 182
Makes a variable available globally in all tests and suites.
${SSL_VID}
${SSL_VID1}
${SSL_VID} = 199
Makes a variable available globally in all tests and suites.
${DOH_VID}
${DOH_VID1}
${DOH_VID} = 8006
Returns the contents of a specified file.
${path}/data/template/template.yaml
${YAML}
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>'.
${YAML} = #ip正向用例
"ip_batch_mode":
#"ip_v4_single":
"datafomat": "complate" #完整数据:complate;部分数据:part
"opAction": "add"
"returnData": 1
"objectList":
-
"objectId":
"objectType": "ip"
...
Parse the first YAML document in a stream
and produce the corresponding Python object.
${YAML}
${LOADED}
${LOADED} = {'ip_batch_mode': {'datafomat': 'complate', 'opAction': 'add', 'returnData': 1, 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isE...
Returns a value from the given ``dictionary`` based on the given ``key``.
${LOADED}
ip_batch_mode
${objMode}
${objMode} = {'datafomat': 'complate', 'opAction': 'add', 'returnData': 1, 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'obj...
Returns a value from the given ``dictionary`` based on the given ``key``.
${objMode}
objectList
${objList}
${objList} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [None], 'a...
Serialize ``obj`` to a JSON formatted ``str``.
${objMode}
${toJson}
${toJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Serialize ``obj`` to a JSON formatted ``str``.
${objList}
${objList}
${objList} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Makes a variable available globally in all tests and suites.
${objModeJson}
${toJson}
${objModeJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Makes a variable available globally in all tests and suites.
${objListMode}
${objList}
${objListMode} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Returns a value from the given ``dictionary`` based on the given ``key``.
${LOADED}
policy_template
${policyMode}
${policyMode} = {'opAction': 'add', 'returnData': 1, 'policyList': {'policyName': 'autotest', 'policyType': 'tsg_security', 'action': 'allow', 'userTags': '', 'doBlacklist': 0, 'doLog': 1, 'policyDesc': 'autotest', '...
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyMode}
policyList
${policyList}
${policyList} = {'policyName': 'autotest', 'policyType': 'tsg_security', 'action': 'allow', 'userTags': '', 'doBlacklist': 0, 'doLog': 1, 'policyDesc': 'autotest', 'effectiveRange': None, 'userRegion': None, 'source'...
Serialize ``obj`` to a JSON formatted ``str``.
${policyMode}
${toJson}
${toJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...
Serialize ``obj`` to a JSON formatted ``str``.
${policyList}
${policyList}
${policyList} = {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "effectiveRange": null, "userRegion": null, "source"...
Makes a variable available globally in all tests and suites.
${policyModeJson}
${toJson}
${policyModeJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...
Makes a variable available globally in all tests and suites.
${policyListMode}
${policyList}
${policyListMode} = {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "effectiveRange": null, "userRegion": null, "source"...
Runs the given keyword with the given arguments, if ``condition`` is true.
${addTestClentIPFlag}==1
AddLocalIPObject
Logs the given message with the given level.
ApiLoginAndAddLocalIP
ApiLoginAndAddLocalIP
Runs the given keyword with the given arguments, if ``condition`` is true.
${addTsgUIAPIFlag}==1
SecurityPolicyAllowTSGUIAPIAdd
Logs the given message with the given level.
${TEST NAME}
policy_http_allow
根据测试数据文件,使用对应公共模板,创建策略及策略相关数据:策略信息,对象信息,引用文件信息,返回本策略创建的策略及策略相关数据,用于teamdow删除
${path}/data/security/http/demo_data.yaml
${TEST NAME}
${objectIds}
${policyIds}
Returns the contents of a specified file.
${dataFilePath}
${yamlData}
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>'.
${yamlData} = #policy:{"opAction":"add","refuseCode":true,"policyList":{"policyId":"","policyName":"dxytest","policyType":"tsg_security","action":"allow","userTags":"","doBlacklist":0,"doLog":1,"policyDesc":"","eff...
Parse the first YAML document in a stream
and produce the corresponding Python object.
${yamlData}
${loadedData}
${loadedData} = {'policy_http_allow_data': [{'opAction': 'add', 'returnData': 1, 'policyName': 'autotestmonitor', 'policyType': 'tsg_security', 'action': 'monitor', 'userTags': '', 'doBlacklist': 0, 'doLog': 1, 'poli...
Returns a value from the given ``dictionary`` based on the given ``key``.
${loadedData}
${keyword}_data
${policyList}
${policyList} = [{'opAction': 'add', 'returnData': 1, 'policyName': 'autotestmonitor', 'policyType': 'tsg_security', 'action': 'monitor', 'userTags': '', 'doBlacklist': 0, 'doLog': 1, 'policyDesc': 'autotest', 'effec...
Returns a list containing given items.
${objectIds}
${objectIds} = []
Returns a list containing given items.
${policyIds}
${policyIds} = []
Logs the given message with the given level.
passssssssss
passssssssss
组织单个策略数据${modleFilePath}策略模板文件路径 ${policyData}从数据文件中获取的单个策略数据
${key}
${keyword}
${objectId}
${policyId}
Displays the given messages in the log file as keyword arguments.
获取模板
Displays the given messages in the log file as keyword arguments.
${policyModeJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${policyModeJson}
${policyJson}
${policyJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...
Displays the given messages in the log file as keyword arguments.
用data数据替换模板内容生成策略新增数据
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
condation
${condation}
${condation} = [{'protocolField': None, 'objectType': 'subscriberid', 'objectSubType': 'subscriberid', 'objList': [{'addItemList': [{'keywordArray': '$abce'}, {'keywordArray': '$abce1234'}]}, {'addItemList': [{'keyw...
解析策略条件,根据key值判断其在source、destation、filter中
${condation}
${objectIds}
${sourceList}
${destinationList}
${filterList}
Displays the given messages in the log file as keyword arguments.
循环读取对象list
Returns a list containing given items.
${sourceList}
${sourceList} = []
Returns a list containing given items.
${destinationList}
${destinationList} = []
Returns a list containing given items.
${filterList}
${filterList} = []
Returns a list containing given items.
${objectIdsList}
${objectIdsList} = []
Returns a value from the given ``dictionary`` based on the given ``key``.
${key}
protocolField
${protocolField}
${protocolField} = None
处理对象
${key}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = None
处理对象
${objectData}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = None
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objList
${objList}
${objList} = [{'addItemList': [{'keywordArray': '$abce'}, {'keywordArray': '$abce1234'}]}, {'addItemList': [{'keywordArray': '$abce!@#$%^&*()_+'}, {'keywordArray': '$1234'}]}]
Displays the given messages in the log file as keyword arguments.
${objJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${objModeJson}
${objJson}
${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Returns the given values which can then be assigned to a variables.
${objListMode}
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectType
${return}
${objectType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectType
${return} = PASS
${objectType} = subscriberid
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectType}" != "None"
Replace String
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
${objectJson} = [{"objectId": null, "objectType":"subscriberid", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": ...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectSubType
${return}
${objectSubType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectSubType
${return} = PASS
${objectSubType} = subscriberid
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" != "None"
Replace String
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
${objectJson} = [{"objectId": null, "objectType":"subscriberid", "objectSubType":"subscriberid", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectId
${return}
${objectId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectId
Dictionary does not contain key 'objectId'.
${return} = FAIL
${objectId} = Dictionary does not contain key 'objectId'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"objectId": null
"objectId":${objectId}
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"subscriberid", "objectSubType":"subscriberid", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"opAction": "add"
"option": "update"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"subscriberid", "objectSubType":"subscriberid", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc...
Returns a list containing given items.
${objectJsonList}
${objectJsonList} = []
Evaluates the given expression in Python and returns the results.
type(${objList})
${objListType}
${objListType} = <class 'list'>
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'keywordArray': '$abce'}, {'keywordArray': '$abce1234'}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"keywordArray": "$abce"}, {"keywordArray": "$abce1234"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": "$abce"}, {"keywordArray": "$abce1234"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": "$abce"}, {"keywordArray": "$abce1234"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType":"subscriberid", "objectSubType":"subscriberid", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"subscriberid", "objectSubType":"subscriberid", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'subscriberid', 'objectSubType': 'subscriberid', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectId...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'keywordArray': '$abce!@#$%^&*()_+'}, {'keywordArray': '$1234'}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"keywordArray": "$abce!@#$%^&*()_+"}, {"keywordArray": "$1234"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": "$abce!@#$%^&*()_+"}, {"keywordArray": "$1234"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": "$abce!@#$%^&*()_+"}, {"keywordArray": "$1234"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType":"subscriberid", "objectSubType":"subscriberid", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"subscriberid", "objectSubType":"subscriberid", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'subscriberid', 'objectSubType': 'subscriberid', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectId...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Creates and returns a dictionary based on the given ``items``.
opAction=add
returnData=1
objectList=${objectJsonList}
${objectData}
${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'subscriberid', 'objectSubType': 'subscriberid', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName':...
${objectData}
${rescode}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${ipList}对象dict
Displays the given messages in the log file as keyword arguments.
创建IP
Returns a value from the given ``dictionary`` based on the given ``key``.
${ipList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${ipList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "subscriberid", "objectSubType": "subscriberid", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName":...
${objectUrl}
${bodyJson}
${version}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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
}
To JSON using : pretty_print=False
${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...
${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...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
getObjectListIds
${response}
ELSE
Create List
${objectIds}
获取结果中的对象ID
${response}
Logs the given message with the given level.
Call Get-ObjectIds
Call Get-ObjectIds
Returns a list containing given items.
${objectIds}
${objectIds} = []
Returns the given values which can then be assigned to a variables.
${EMPTY}
${objectIdsTemp}
${objectIdsTemp} =
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${value}
data
${return}
${data}
Returns a value from the given ``dictionary`` based on the given ``key``.
${value}
data
${return} = PASS
${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...
Returns from the enclosing user keyword if ``condition`` is true.
"${return}"=="FAIL"
${objectIdsTemp}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
${objectIds} = [107866, 107867]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${rescode} = 200
${objectIds} = [107866, 107867]
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Runs the given keyword with the given arguments, if ``condition`` is true.
"${protocolField}" != "None"
Set Variable
${protocolField}
${protocolField}
${protocolField} = None
Returns a list containing given items.
${objectsList}
${objectsList} = []
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107866, 'protocolField': None}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107866, 'protocolField': None}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
${objectIds} = [107866, 107867]
${objectList} = {'objectId': 107866, 'protocolField': None}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Set Variable
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Set Variable
${objectList}
ELSE
OrangeFilter
${objectList}
${objectList}
Returns the given values which can then be assigned to a variables.
${objectList}
${objectList} = {'objectId': 107866, 'protocolField': None}
${objectIds} = [107866, 107867]
${objectList} = {'objectId': 107866, 'protocolField': None}
Returns and logs the length of the given item as an integer.
${objectIdsList}
${len}
Length is 0
${len} = 0
Runs the given keyword with the given arguments, if ``condition`` is true.
${len} != 0
AppendListToList
${objectIdsList}
${objectIds}
ELSE
Set Variable
${objectIds}
${objectIdsList}
Returns the given values which can then be assigned to a variables.
${objectIds}
${objectIdsList} = [107866, 107867]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Append To List
${sourceList}
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Append To List
${destinationList}
${objectList}
ELSE
Append To List
${filterList}
${objectList}
Adds ``values`` to the end of ``list``.
${sourceList}
${objectList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${key}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_ADDR
处理对象
${key}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_ADDR
处理对象
${objectData}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_ADDR
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objList
${objList}
${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...
Displays the given messages in the log file as keyword arguments.
${objJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${objModeJson}
${objJson}
${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Returns the given values which can then be assigned to a variables.
${objListMode}
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectType
${return}
${objectType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectType
${return} = PASS
${objectType} = ip
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectType}" != "None"
Replace String
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "s...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectSubType
${return}
${objectSubType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectSubType
${return} = PASS
${objectSubType} = endpoint
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" != "None"
Replace String
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectId
${return}
${objectId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectId
Dictionary does not contain key 'objectId'.
${return} = FAIL
${objectId} = Dictionary does not contain key 'objectId'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"objectId": null
"objectId":${objectId}
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"opAction": "add"
"option": "update"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...
Returns a list containing given items.
${objectJsonList}
${objectJsonList} = []
Evaluates the given expression in Python and returns the results.
type(${objList})
${objListType}
${objListType} = <class 'list'>
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'ip': '255.255.255.255', 'port': '0-65535'}, {'ip': '255.255.255.255', 'port': '1-65535'}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"ip": "255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.255", "port": "1-65535"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"ip": "255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.255", "port": "1-65535"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"ip": "255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.255", "port": "1-65535"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addIt...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'ip': '255.255.255.1-255.255.255.255', 'port': '0-65535'}, {'ip': '255.255.255.2/24', 'port': '1-65535'}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"ip": "255.255.255.1-255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.2/24", "port": "1-65535"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"ip": "255.255.255.1-255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.2/24", "port": "1-65535"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"ip": "255.255.255.1-255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.2/24", "port": "1-65535"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addIt...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Creates and returns a dictionary based on the given ``items``.
opAction=add
returnData=1
objectList=${objectJsonList}
${objectData}
${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定...
${objectData}
${rescode}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${ipList}对象dict
Displays the given messages in the log file as keyword arguments.
创建IP
Returns a value from the given ``dictionary`` based on the given ``key``.
${ipList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${ipList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u535...
${objectUrl}
${bodyJson}
${version}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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
}
To JSON using : pretty_print=False
${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.255', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '0', 'clientPort2':...
${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.255', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '0', 'clientPort2':...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
getObjectListIds
${response}
ELSE
Create List
${objectIds}
获取结果中的对象ID
${response}
Logs the given message with the given level.
Call Get-ObjectIds
Call Get-ObjectIds
Returns a list containing given items.
${objectIds}
${objectIds} = []
Returns the given values which can then be assigned to a variables.
${EMPTY}
${objectIdsTemp}
${objectIdsTemp} =
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${value}
data
${return}
${data}
Returns a value from the given ``dictionary`` based on the given ``key``.
${value}
data
${return} = PASS
${data} = {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.255', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '0', 'clientPort2': '65535', 'clientPortFormat': 'range', '...
Returns from the enclosing user keyword if ``condition`` is true.
"${return}"=="FAIL"
${objectIdsTemp}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
${objectIds} = [107868, 107869]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${rescode} = 200
${objectIds} = [107868, 107869]
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Runs the given keyword with the given arguments, if ``condition`` is true.
"${protocolField}" != "None"
Set Variable
${protocolField}
${protocolField}
Returns the given values which can then be assigned to a variables.
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_ADDR
Returns a list containing given items.
${objectsList}
${objectsList} = []
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107868, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107868, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
${objectIds} = [107868, 107869]
${objectList} = {'objectId': 107868, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Set Variable
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Set Variable
${objectList}
ELSE
OrangeFilter
${objectList}
${objectList}
Returns the given values which can then be assigned to a variables.
${objectList}
${objectList} = {'objectId': 107868, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}
${objectIds} = [107868, 107869]
${objectList} = {'objectId': 107868, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}
Returns and logs the length of the given item as an integer.
${objectIdsList}
${len}
Length is 2
${len} = 2
Runs the given keyword with the given arguments, if ``condition`` is true.
${len} != 0
AppendListToList
${objectIdsList}
${objectIds}
ELSE
Set Variable
${objectIds}
${objectIdsList}
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectIdsList}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
${objectIdsList} = [107866, 107867, 107868, 107869]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Append To List
${sourceList}
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Append To List
${destinationList}
${objectList}
ELSE
Append To List
${filterList}
${objectList}
Adds ``values`` to the end of ``list``.
${sourceList}
${objectList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${key}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_LOCATION
处理对象
${key}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_LOCATION
处理对象
${objectData}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_LOCATION
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objList
${objList}
${objList} = [{'addItemList': [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}, {'keywordArray': ['China.Duyun.*']}]}]
Displays the given messages in the log file as keyword arguments.
${objJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${objModeJson}
${objJson}
${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Returns the given values which can then be assigned to a variables.
${objListMode}
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectType
${return}
${objectType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectType
${return} = PASS
${objectType} = ip
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectType}" != "None"
Replace String
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "s...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectSubType
${return}
${objectSubType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectSubType
${return} = PASS
${objectSubType} = geo_location
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" != "None"
Replace String
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectId
${return}
${objectId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectId
Dictionary does not contain key 'objectId'.
${return} = FAIL
${objectId} = Dictionary does not contain key 'objectId'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"objectId": null
"objectId":${objectId}
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"opAction": "add"
"option": "update"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...
Returns a list containing given items.
${objectJsonList}
${objectJsonList} = []
Evaluates the given expression in Python and returns the results.
type(${objList})
${objListType}
${objListType} = <class 'list'>
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}, {'keywordArray': ['China.Duyun.*']}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}, {"keywordArray": ["China.Duyun.*"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}, {"keywordArray": ["China.Duyun.*"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}, {"keywordArray": ["China.Duyun.*"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'geo_location', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'a...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Creates and returns a dictionary based on the given ``items``.
opAction=add
returnData=1
objectList=${objectJsonList}
${objectData}
${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'geo_location', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单...
${objectData}
${rescode}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${ipList}对象dict
Displays the given messages in the log file as keyword arguments.
创建IP
Returns a value from the given ``dictionary`` based on the given ``key``.
${ipList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${ipList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\...
${objectUrl}
${bodyJson}
${version}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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
}
To JSON using : pretty_print=False
${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...
${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...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
getObjectListIds
${response}
ELSE
Create List
${objectIds}
获取结果中的对象ID
${response}
Logs the given message with the given level.
Call Get-ObjectIds
Call Get-ObjectIds
Returns a list containing given items.
${objectIds}
${objectIds} = []
Returns the given values which can then be assigned to a variables.
${EMPTY}
${objectIdsTemp}
${objectIdsTemp} =
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${value}
data
${return}
${data}
Returns a value from the given ``dictionary`` based on the given ``key``.
${value}
data
${return} = PASS
${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...
Returns from the enclosing user keyword if ``condition`` is true.
"${return}"=="FAIL"
${objectIdsTemp}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
${objectIds} = [107870]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${rescode} = 200
${objectIds} = [107870]
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Runs the given keyword with the given arguments, if ``condition`` is true.
"${protocolField}" != "None"
Set Variable
${protocolField}
${protocolField}
Returns the given values which can then be assigned to a variables.
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_LOCATION
Returns a list containing given items.
${objectsList}
${objectsList} = []
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107870, 'protocolField': 'TSG_SECURITY_SOURCE_LOCATION'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
${objectIds} = [107870]
${objectList} = {'objectId': 107870, 'protocolField': 'TSG_SECURITY_SOURCE_LOCATION'}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Set Variable
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Set Variable
${objectList}
ELSE
OrangeFilter
${objectList}
${objectList}
Returns the given values which can then be assigned to a variables.
${objectList}
${objectList} = {'objectId': 107870, 'protocolField': 'TSG_SECURITY_SOURCE_LOCATION'}
${objectIds} = [107870]
${objectList} = {'objectId': 107870, 'protocolField': 'TSG_SECURITY_SOURCE_LOCATION'}
Returns and logs the length of the given item as an integer.
${objectIdsList}
${len}
Length is 4
${len} = 4
Runs the given keyword with the given arguments, if ``condition`` is true.
${len} != 0
AppendListToList
${objectIdsList}
${objectIds}
ELSE
Set Variable
${objectIds}
${objectIdsList}
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectIdsList}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
${objectIdsList} = [107866, 107867, 107868, 107869, 107870]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Append To List
${sourceList}
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Append To List
${destinationList}
${objectList}
ELSE
Append To List
${filterList}
${objectList}
Adds ``values`` to the end of ``list``.
${sourceList}
${objectList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${key}
protocolField
${protocolField}
${protocolField} = TSG_FILED_GTP_IMSI
处理对象
${key}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_FILED_GTP_IMSI
处理对象
${objectData}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_FILED_GTP_IMSI
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objList
${objList}
${objList} = [{'addItemList': [{'keywordArray': ['123*']}, {'keywordArray': ['456*']}, {'keywordArray': ['12345678912345*']}]}]
Displays the given messages in the log file as keyword arguments.
${objJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${objModeJson}
${objJson}
${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Returns the given values which can then be assigned to a variables.
${objListMode}
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectType
${return}
${objectType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectType
${return} = PASS
${objectType} = mobile_identity
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectType}" != "None"
Replace String
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectSubType
${return}
${objectSubType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectSubType
${return} = PASS
${objectSubType} = imsi
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" != "None"
Replace String
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "t...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectId
${return}
${objectId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectId
Dictionary does not contain key 'objectId'.
${return} = FAIL
${objectId} = Dictionary does not contain key 'objectId'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"objectId": null
"objectId":${objectId}
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "t...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"opAction": "add"
"option": "update"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "t...
Returns a list containing given items.
${objectJsonList}
${objectJsonList} = []
Evaluates the given expression in Python and returns the results.
type(${objList})
${objListType}
${objListType} = <class 'list'>
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'keywordArray': ['123*']}, {'keywordArray': ['456*']}, {'keywordArray': ['12345678912345*']}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["456*"]}, {"keywordArray": ["12345678912345*"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["456*"]}, {"keywordArray": ["12345678912345*"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["456*"]}, {"keywordArray": ["12345678912345*"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "t...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "t...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'mobile_identity', 'objectSubType': 'imsi', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Creates and returns a dictionary based on the given ``items``.
opAction=add
returnData=1
objectList=${objectJsonList}
${objectData}
${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'mobile_identity', 'objectSubType': 'imsi', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'aut...
${objectData}
${rescode}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${ipList}对象dict
Displays the given messages in the log file as keyword arguments.
创建IP
Returns a value from the given ``dictionary`` based on the given ``key``.
${ipList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${ipList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "mobile_identity", "objectSubType": "imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "aut...
${objectUrl}
${bodyJson}
${version}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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
}
To JSON using : pretty_print=False
${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...
${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...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
getObjectListIds
${response}
ELSE
Create List
${objectIds}
获取结果中的对象ID
${response}
Logs the given message with the given level.
Call Get-ObjectIds
Call Get-ObjectIds
Returns a list containing given items.
${objectIds}
${objectIds} = []
Returns the given values which can then be assigned to a variables.
${EMPTY}
${objectIdsTemp}
${objectIdsTemp} =
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${value}
data
${return}
${data}
Returns a value from the given ``dictionary`` based on the given ``key``.
${value}
data
${return} = PASS
${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...
Returns from the enclosing user keyword if ``condition`` is true.
"${return}"=="FAIL"
${objectIdsTemp}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
${objectIds} = [107871]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${rescode} = 200
${objectIds} = [107871]
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Runs the given keyword with the given arguments, if ``condition`` is true.
"${protocolField}" != "None"
Set Variable
${protocolField}
${protocolField}
Returns the given values which can then be assigned to a variables.
${protocolField}
${protocolField} = TSG_FILED_GTP_IMSI
Returns a list containing given items.
${objectsList}
${objectsList} = []
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107871, 'protocolField': 'TSG_FILED_GTP_IMSI'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
${objectIds} = [107871]
${objectList} = {'objectId': 107871, 'protocolField': 'TSG_FILED_GTP_IMSI'}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Set Variable
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Set Variable
${objectList}
ELSE
OrangeFilter
${objectList}
${objectList}
Returns the given values which can then be assigned to a variables.
${objectList}
${objectList} = {'objectId': 107871, 'protocolField': 'TSG_FILED_GTP_IMSI'}
${objectIds} = [107871]
${objectList} = {'objectId': 107871, 'protocolField': 'TSG_FILED_GTP_IMSI'}
Returns and logs the length of the given item as an integer.
${objectIdsList}
${len}
Length is 5
${len} = 5
Runs the given keyword with the given arguments, if ``condition`` is true.
${len} != 0
AppendListToList
${objectIdsList}
${objectIds}
ELSE
Set Variable
${objectIds}
${objectIdsList}
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectIdsList}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
${objectIdsList} = [107866, 107867, 107868, 107869, 107870, 107871]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Append To List
${sourceList}
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Append To List
${destinationList}
${objectList}
ELSE
Append To List
${filterList}
${objectList}
Adds ``values`` to the end of ``list``.
${sourceList}
${objectList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${key}
protocolField
${protocolField}
${protocolField} = TSG_FILED_GTP_PHONE_NUMBER
处理对象
${key}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_FILED_GTP_PHONE_NUMBER
处理对象
${objectData}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_FILED_GTP_PHONE_NUMBER
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objList
${objList}
${objList} = [{'addItemList': [{'keywordArray': ['123*']}, {'keywordArray': ['$123456789012345']}, {'keywordArray': ['12345']}]}]
Displays the given messages in the log file as keyword arguments.
${objJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${objModeJson}
${objJson}
${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Returns the given values which can then be assigned to a variables.
${objListMode}
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectType
${return}
${objectType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectType
${return} = PASS
${objectType} = mobile_identity
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectType}" != "None"
Replace String
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectSubType
${return}
${objectSubType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectSubType
${return} = PASS
${objectSubType} = phone_number
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" != "None"
Replace String
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectD...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectId
${return}
${objectId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectId
Dictionary does not contain key 'objectId'.
${return} = FAIL
${objectId} = Dictionary does not contain key 'objectId'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"objectId": null
"objectId":${objectId}
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectD...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"opAction": "add"
"option": "update"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectD...
Returns a list containing given items.
${objectJsonList}
${objectJsonList} = []
Evaluates the given expression in Python and returns the results.
type(${objList})
${objListType}
${objListType} = <class 'list'>
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'keywordArray': ['123*']}, {'keywordArray': ['$123456789012345']}, {'keywordArray': ['12345']}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["$123456789012345"]}, {"keywordArray": ["12345"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["$123456789012345"]}, {"keywordArray": ["12345"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["$123456789012345"]}, {"keywordArray": ["12345"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectD...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectD...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'mobile_identity', 'objectSubType': 'phone_number', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjec...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Creates and returns a dictionary based on the given ``items``.
opAction=add
returnData=1
objectList=${objectJsonList}
${objectData}
${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'mobile_identity', 'objectSubType': 'phone_number', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectNam...
${objectData}
${rescode}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${ipList}对象dict
Displays the given messages in the log file as keyword arguments.
创建IP
Returns a value from the given ``dictionary`` based on the given ``key``.
${ipList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${ipList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "mobile_identity", "objectSubType": "phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectNam...
${objectUrl}
${bodyJson}
${version}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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
}
To JSON using : pretty_print=False
${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...
${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...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
getObjectListIds
${response}
ELSE
Create List
${objectIds}
获取结果中的对象ID
${response}
Logs the given message with the given level.
Call Get-ObjectIds
Call Get-ObjectIds
Returns a list containing given items.
${objectIds}
${objectIds} = []
Returns the given values which can then be assigned to a variables.
${EMPTY}
${objectIdsTemp}
${objectIdsTemp} =
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${value}
data
${return}
${data}
Returns a value from the given ``dictionary`` based on the given ``key``.
${value}
data
${return} = PASS
${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...
Returns from the enclosing user keyword if ``condition`` is true.
"${return}"=="FAIL"
${objectIdsTemp}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
${objectIds} = [107872]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${rescode} = 200
${objectIds} = [107872]
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Runs the given keyword with the given arguments, if ``condition`` is true.
"${protocolField}" != "None"
Set Variable
${protocolField}
${protocolField}
Returns the given values which can then be assigned to a variables.
${protocolField}
${protocolField} = TSG_FILED_GTP_PHONE_NUMBER
Returns a list containing given items.
${objectsList}
${objectsList} = []
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107872, 'protocolField': 'TSG_FILED_GTP_PHONE_NUMBER'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
${objectIds} = [107872]
${objectList} = {'objectId': 107872, 'protocolField': 'TSG_FILED_GTP_PHONE_NUMBER'}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Set Variable
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Set Variable
${objectList}
ELSE
OrangeFilter
${objectList}
${objectList}
Returns the given values which can then be assigned to a variables.
${objectList}
${objectList} = {'objectId': 107872, 'protocolField': 'TSG_FILED_GTP_PHONE_NUMBER'}
${objectIds} = [107872]
${objectList} = {'objectId': 107872, 'protocolField': 'TSG_FILED_GTP_PHONE_NUMBER'}
Returns and logs the length of the given item as an integer.
${objectIdsList}
${len}
Length is 6
${len} = 6
Runs the given keyword with the given arguments, if ``condition`` is true.
${len} != 0
AppendListToList
${objectIdsList}
${objectIds}
ELSE
Set Variable
${objectIds}
${objectIdsList}
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectIdsList}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
${objectIdsList} = [107866, 107867, 107868, 107869, 107870, 107871, 107872]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Append To List
${sourceList}
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Append To List
${destinationList}
${objectList}
ELSE
Append To List
${filterList}
${objectList}
Adds ``values`` to the end of ``list``.
${sourceList}
${objectList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${key}
protocolField
${protocolField}
${protocolField} = TSG_FILED_GTP_APN
处理对象
${key}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_FILED_GTP_APN
处理对象
${objectData}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_FILED_GTP_APN
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objList
${objList}
${objList} = [{'addItemList': [{'keywordArray': ['*uawei.org']}, {'keywordArray': ['$huawei.com']}, {'keywordArray': ['$www.huawei.com']}]}]
Displays the given messages in the log file as keyword arguments.
${objJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${objModeJson}
${objJson}
${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Returns the given values which can then be assigned to a variables.
${objListMode}
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectType
${return}
${objectType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectType
${return} = PASS
${objectType} = apn
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectType}" != "None"
Replace String
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectSubType
${return}
${objectSubType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectSubType
${return} = PASS
${objectSubType} =
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" != "None"
Replace String
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectId
${return}
${objectId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectId
Dictionary does not contain key 'objectId'.
${return} = FAIL
${objectId} = Dictionary does not contain key 'objectId'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"objectId": null
"objectId":${objectId}
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"opAction": "add"
"option": "update"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...
Returns a list containing given items.
${objectJsonList}
${objectJsonList} = []
Evaluates the given expression in Python and returns the results.
type(${objList})
${objListType}
${objListType} = <class 'list'>
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'keywordArray': ['*uawei.org']}, {'keywordArray': ['$huawei.com']}, {'keywordArray': ['$www.huawei.com']}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"keywordArray": ["*uawei.org"]}, {"keywordArray": ["$huawei.com"]}, {"keywordArray": ["$www.huawei.com"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["*uawei.org"]}, {"keywordArray": ["$huawei.com"]}, {"keywordArray": ["$www.huawei.com"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["*uawei.org"]}, {"keywordArray": ["$huawei.com"]}, {"keywordArray": ["$www.huawei.com"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'apn', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addItemList'...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Creates and returns a dictionary based on the given ``items``.
opAction=add
returnData=1
objectList=${objectJsonList}
${objectData}
${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'apn', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'o...
${objectData}
${rescode}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${ipList}对象dict
Displays the given messages in the log file as keyword arguments.
创建IP
Returns a value from the given ``dictionary`` based on the given ``key``.
${ipList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${ipList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "apn", "objectSubType": "", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u63...
${objectUrl}
${bodyJson}
${version}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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
}
To JSON using : pretty_print=False
${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...
${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...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
getObjectListIds
${response}
ELSE
Create List
${objectIds}
获取结果中的对象ID
${response}
Logs the given message with the given level.
Call Get-ObjectIds
Call Get-ObjectIds
Returns a list containing given items.
${objectIds}
${objectIds} = []
Returns the given values which can then be assigned to a variables.
${EMPTY}
${objectIdsTemp}
${objectIdsTemp} =
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${value}
data
${return}
${data}
Returns a value from the given ``dictionary`` based on the given ``key``.
${value}
data
${return} = PASS
${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...
Returns from the enclosing user keyword if ``condition`` is true.
"${return}"=="FAIL"
${objectIdsTemp}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
${objectIds} = [107873]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${rescode} = 200
${objectIds} = [107873]
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Runs the given keyword with the given arguments, if ``condition`` is true.
"${protocolField}" != "None"
Set Variable
${protocolField}
${protocolField}
Returns the given values which can then be assigned to a variables.
${protocolField}
${protocolField} = TSG_FILED_GTP_APN
Returns a list containing given items.
${objectsList}
${objectsList} = []
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107873, 'protocolField': 'TSG_FILED_GTP_APN'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
${objectIds} = [107873]
${objectList} = {'objectId': 107873, 'protocolField': 'TSG_FILED_GTP_APN'}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Set Variable
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Set Variable
${objectList}
ELSE
OrangeFilter
${objectList}
${objectList}
Returns the given values which can then be assigned to a variables.
${objectList}
${objectList} = {'objectId': 107873, 'protocolField': 'TSG_FILED_GTP_APN'}
${objectIds} = [107873]
${objectList} = {'objectId': 107873, 'protocolField': 'TSG_FILED_GTP_APN'}
Returns and logs the length of the given item as an integer.
${objectIdsList}
${len}
Length is 7
${len} = 7
Runs the given keyword with the given arguments, if ``condition`` is true.
${len} != 0
AppendListToList
${objectIdsList}
${objectIds}
ELSE
Set Variable
${objectIds}
${objectIdsList}
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectIdsList}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
${objectIdsList} = [107866, 107867, 107868, 107869, 107870, 107871, 107872, 107873]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Append To List
${sourceList}
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Append To List
${destinationList}
${objectList}
ELSE
Append To List
${filterList}
${objectList}
Adds ``values`` to the end of ``list``.
${sourceList}
${objectList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${key}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_ADDR
处理对象
${key}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_ADDR
处理对象
${objectData}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_ADDR
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objList
${objList}
${objList} = [{'addItemList': [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'learningDepth': '2', 'agingTime': '12', 'voteClientNum': '10', 'learnedIpLimit': '1000'}]}]
Displays the given messages in the log file as keyword arguments.
${objJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${objModeJson}
${objJson}
${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Returns the given values which can then be assigned to a variables.
${objListMode}
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectType
${return}
${objectType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectType
${return} = PASS
${objectType} = ip
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectType}" != "None"
Replace String
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "s...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectSubType
${return}
${objectSubType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectSubType
${return} = PASS
${objectSubType} = ip_learning
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" != "None"
Replace String
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", ...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectId
${return}
${objectId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectId
Dictionary does not contain key 'objectId'.
${return} = FAIL
${objectId} = Dictionary does not contain key 'objectId'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"objectId": null
"objectId":${objectId}
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", ...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"opAction": "add"
"option": "update"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", ...
Returns a list containing given items.
${objectJsonList}
${objectJsonList} = []
Evaluates the given expression in Python and returns the results.
type(${objList})
${objListType}
${objListType} = <class 'list'>
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'learningDepth': '2', 'agingTime': '12', 'voteClientNum': '10', 'learnedIpLimit': '1000'}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${addItemList}
[{"
"
${addItemList} = "fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${addItemList}
"}]
"
${addItemList} = "fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", ...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", ...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'ip_learning', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'ad...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Creates and returns a dictionary based on the given ``items``.
opAction=add
returnData=1
objectList=${objectJsonList}
${objectData}
${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'ip_learning', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单i...
${objectData}
${rescode}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${ipList}对象dict
Displays the given messages in the log file as keyword arguments.
创建IP
Returns a value from the given ``dictionary`` based on the given ``key``.
${ipList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${ipList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u...
${objectUrl}
${bodyJson}
${version}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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
}
To JSON using : pretty_print=False
${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '...
${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
getObjectListIds
${response}
ELSE
Create List
${objectIds}
获取结果中的对象ID
${response}
Logs the given message with the given level.
Call Get-ObjectIds
Call Get-ObjectIds
Returns a list containing given items.
${objectIds}
${objectIds} = []
Returns the given values which can then be assigned to a variables.
${EMPTY}
${objectIdsTemp}
${objectIdsTemp} =
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${value}
data
${return}
${data}
Returns a value from the given ``dictionary`` based on the given ``key``.
${value}
data
${return} = PASS
${data} = {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '#31739C', 'isDisplay': None, 'isExclusio...
Returns from the enclosing user keyword if ``condition`` is true.
"${return}"=="FAIL"
${objectIdsTemp}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
${objectIds} = [107874]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${rescode} = 200
${objectIds} = [107874]
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Runs the given keyword with the given arguments, if ``condition`` is true.
"${protocolField}" != "None"
Set Variable
${protocolField}
${protocolField}
Returns the given values which can then be assigned to a variables.
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_ADDR
Returns a list containing given items.
${objectsList}
${objectsList} = []
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107874, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
${objectIds} = [107874]
${objectList} = {'objectId': 107874, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Set Variable
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Set Variable
${objectList}
ELSE
OrangeFilter
${objectList}
${objectList}
Returns the given values which can then be assigned to a variables.
${objectList}
${objectList} = {'objectId': 107874, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}
${objectIds} = [107874]
${objectList} = {'objectId': 107874, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}
Returns and logs the length of the given item as an integer.
${objectIdsList}
${len}
Length is 8
${len} = 8
Runs the given keyword with the given arguments, if ``condition`` is true.
${len} != 0
AppendListToList
${objectIdsList}
${objectIds}
ELSE
Set Variable
${objectIds}
${objectIdsList}
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectIdsList}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
${objectIdsList} = [107866, 107867, 107868, 107869, 107870, 107871, 107872, 107873, 107874]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Append To List
${sourceList}
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Append To List
${destinationList}
${objectList}
ELSE
Append To List
${filterList}
${objectList}
Adds ``values`` to the end of ``list``.
${sourceList}
${objectList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${key}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_ADDR
处理对象
${key}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_ADDR
处理对象
${objectData}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_ADDR
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objList
${objList}
${objList} = [{'addItemList': [{'ip': '255.255.255.254', 'port': '65535'}, {'ip': '255.255.255.254', 'port': '1'}]}]
Displays the given messages in the log file as keyword arguments.
${objJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${objModeJson}
${objJson}
${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Returns the given values which can then be assigned to a variables.
${objListMode}
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectType
${return}
${objectType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectType
Dictionary does not contain key 'objectType'.
${return} = FAIL
${objectType} = Dictionary does not contain key 'objectType'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectType}" != "None"
Replace String
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectSubType
${return}
${objectSubType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectSubType
Dictionary does not contain key 'objectSubType'.
${return} = FAIL
${objectSubType} = Dictionary does not contain key 'objectSubType'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" != "None"
Replace String
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectId
${return}
${objectId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectId
Dictionary does not contain key 'objectId'.
${return} = FAIL
${objectId} = Dictionary does not contain key 'objectId'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"objectId": null
"objectId":${objectId}
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"opAction": "add"
"option": "update"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Returns a list containing given items.
${objectJsonList}
${objectJsonList} = []
Evaluates the given expression in Python and returns the results.
type(${objList})
${objListType}
${objListType} = <class 'list'>
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'ip': '255.255.255.254', 'port': '65535'}, {'ip': '255.255.255.254', 'port': '1'}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"ip": "255.255.255.254", "port": "65535"}, {"ip": "255.255.255.254", "port": "1"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"ip": "255.255.255.254", "port": "65535"}, {"ip": "255.255.255.254", "port": "1"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"ip": "255.255.255.254", "port": "65535"}, {"ip": "255.255.255.254", "port": "1"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addIt...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Creates and returns a dictionary based on the given ``items``.
opAction=add
returnData=1
objectList=${objectJsonList}
${objectData}
${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定...
${objectData}
${rescode}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${ipList}对象dict
Displays the given messages in the log file as keyword arguments.
创建IP
Returns a value from the given ``dictionary`` based on the given ``key``.
${ipList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${ipList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u535...
${objectUrl}
${bodyJson}
${version}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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
}
To JSON using : pretty_print=False
${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.254', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '65535', 'clientPor...
${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.254', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '65535', 'clientPor...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
getObjectListIds
${response}
ELSE
Create List
${objectIds}
获取结果中的对象ID
${response}
Logs the given message with the given level.
Call Get-ObjectIds
Call Get-ObjectIds
Returns a list containing given items.
${objectIds}
${objectIds} = []
Returns the given values which can then be assigned to a variables.
${EMPTY}
${objectIdsTemp}
${objectIdsTemp} =
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${value}
data
${return}
${data}
Returns a value from the given ``dictionary`` based on the given ``key``.
${value}
data
${return} = PASS
${data} = {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.254', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '65535', 'clientPort2': '65535', 'clientPortFormat': 'range...
Returns from the enclosing user keyword if ``condition`` is true.
"${return}"=="FAIL"
${objectIdsTemp}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
${objectIds} = [107875]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${rescode} = 200
${objectIds} = [107875]
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Runs the given keyword with the given arguments, if ``condition`` is true.
"${protocolField}" != "None"
Set Variable
${protocolField}
${protocolField}
Returns the given values which can then be assigned to a variables.
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_ADDR
Returns a list containing given items.
${objectsList}
${objectsList} = []
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107875, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
${objectIds} = [107875]
${objectList} = {'objectId': 107875, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Set Variable
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Set Variable
${objectList}
ELSE
OrangeFilter
${objectList}
${objectList}
Returns the given values which can then be assigned to a variables.
${objectList}
${objectList} = {'objectId': 107875, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}
${objectIds} = [107875]
${objectList} = {'objectId': 107875, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}
Returns and logs the length of the given item as an integer.
${objectIdsList}
${len}
Length is 9
${len} = 9
Runs the given keyword with the given arguments, if ``condition`` is true.
${len} != 0
AppendListToList
${objectIdsList}
${objectIds}
ELSE
Set Variable
${objectIds}
${objectIdsList}
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectIdsList}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
${objectIdsList} = [107866, 107867, 107868, 107869, 107870, 107871, 107872, 107873, 107874, 107875]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Append To List
${sourceList}
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Append To List
${destinationList}
${objectList}
ELSE
Append To List
${filterList}
${objectList}
Adds ``values`` to the end of ``list``.
${destinationList}
${objectList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${key}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_LOCATION
处理对象
${key}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_LOCATION
处理对象
${objectData}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_LOCATION
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objList
${objList}
${objList} = [{'addItemList': [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}]}]
Displays the given messages in the log file as keyword arguments.
${objJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${objModeJson}
${objJson}
${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Returns the given values which can then be assigned to a variables.
${objListMode}
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectType
${return}
${objectType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectType
Dictionary does not contain key 'objectType'.
${return} = FAIL
${objectType} = Dictionary does not contain key 'objectType'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectType}" != "None"
Replace String
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectSubType
${return}
${objectSubType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectSubType
${return} = PASS
${objectSubType} = geo_location
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" != "None"
Replace String
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test"...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectId
${return}
${objectId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectId
Dictionary does not contain key 'objectId'.
${return} = FAIL
${objectId} = Dictionary does not contain key 'objectId'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"objectId": null
"objectId":${objectId}
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test"...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"opAction": "add"
"option": "update"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test"...
Returns a list containing given items.
${objectJsonList}
${objectJsonList} = []
Evaluates the given expression in Python and returns the results.
type(${objList})
${objListType}
${objListType} = <class 'list'>
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test"...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test"...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'geo_location', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'a...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Creates and returns a dictionary based on the given ``items``.
opAction=add
returnData=1
objectList=${objectJsonList}
${objectData}
${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'geo_location', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单...
${objectData}
${rescode}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${ipList}对象dict
Displays the given messages in the log file as keyword arguments.
创建IP
Returns a value from the given ``dictionary`` based on the given ``key``.
${ipList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${ipList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\...
${objectUrl}
${bodyJson}
${version}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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
}
To JSON using : pretty_print=False
${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...
${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...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
getObjectListIds
${response}
ELSE
Create List
${objectIds}
获取结果中的对象ID
${response}
Logs the given message with the given level.
Call Get-ObjectIds
Call Get-ObjectIds
Returns a list containing given items.
${objectIds}
${objectIds} = []
Returns the given values which can then be assigned to a variables.
${EMPTY}
${objectIdsTemp}
${objectIdsTemp} =
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${value}
data
${return}
${data}
Returns a value from the given ``dictionary`` based on the given ``key``.
${value}
data
${return} = PASS
${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...
Returns from the enclosing user keyword if ``condition`` is true.
"${return}"=="FAIL"
${objectIdsTemp}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
${objectIds} = [107876]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${rescode} = 200
${objectIds} = [107876]
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Runs the given keyword with the given arguments, if ``condition`` is true.
"${protocolField}" != "None"
Set Variable
${protocolField}
${protocolField}
Returns the given values which can then be assigned to a variables.
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_LOCATION
Returns a list containing given items.
${objectsList}
${objectsList} = []
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107876, 'protocolField': 'TSG_SECURITY_DESTINATION_LOCATION'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
${objectIds} = [107876]
${objectList} = {'objectId': 107876, 'protocolField': 'TSG_SECURITY_DESTINATION_LOCATION'}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Set Variable
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Set Variable
${objectList}
ELSE
OrangeFilter
${objectList}
${objectList}
Returns the given values which can then be assigned to a variables.
${objectList}
${objectList} = {'objectId': 107876, 'protocolField': 'TSG_SECURITY_DESTINATION_LOCATION'}
${objectIds} = [107876]
${objectList} = {'objectId': 107876, 'protocolField': 'TSG_SECURITY_DESTINATION_LOCATION'}
Returns and logs the length of the given item as an integer.
${objectIdsList}
${len}
Length is 10
${len} = 10
Runs the given keyword with the given arguments, if ``condition`` is true.
${len} != 0
AppendListToList
${objectIdsList}
${objectIds}
ELSE
Set Variable
${objectIds}
${objectIdsList}
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectIdsList}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
${objectIdsList} = [107866, 107867, 107868, 107869, 107870, 107871, 107872, 107873, 107874, 107875, 107876]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Append To List
${sourceList}
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Append To List
${destinationList}
${objectList}
ELSE
Append To List
${filterList}
${objectList}
Adds ``values`` to the end of ``list``.
${destinationList}
${objectList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${key}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_ADDR
处理对象
${key}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_ADDR
处理对象
${objectData}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_ADDR
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objList
${objList}
${objList} = [{'addItemList': [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'learningDepth': '2', 'agingTime': '12', 'voteClientNum': '10', 'learnedIpLimit': '1000'}]}]
Displays the given messages in the log file as keyword arguments.
${objJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${objModeJson}
${objJson}
${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Returns the given values which can then be assigned to a variables.
${objListMode}
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectType
${return}
${objectType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectType
Dictionary does not contain key 'objectType'.
${return} = FAIL
${objectType} = Dictionary does not contain key 'objectType'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectType}" != "None"
Replace String
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectSubType
${return}
${objectSubType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectSubType
${return} = PASS
${objectSubType} = ip_learning
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" != "None"
Replace String
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectId
${return}
${objectId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectId
Dictionary does not contain key 'objectId'.
${return} = FAIL
${objectId} = Dictionary does not contain key 'objectId'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"objectId": null
"objectId":${objectId}
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"opAction": "add"
"option": "update"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...
Returns a list containing given items.
${objectJsonList}
${objectJsonList} = []
Evaluates the given expression in Python and returns the results.
type(${objList})
${objListType}
${objListType} = <class 'list'>
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'learningDepth': '2', 'agingTime': '12', 'voteClientNum': '10', 'learnedIpLimit': '1000'}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${addItemList}
[{"
"
${addItemList} = "fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${addItemList}
"}]
"
${addItemList} = "fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'ip_learning', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'ad...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Creates and returns a dictionary based on the given ``items``.
opAction=add
returnData=1
objectList=${objectJsonList}
${objectData}
${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'ip_learning', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单i...
${objectData}
${rescode}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${ipList}对象dict
Displays the given messages in the log file as keyword arguments.
创建IP
Returns a value from the given ``dictionary`` based on the given ``key``.
${ipList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${ipList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u...
${objectUrl}
${bodyJson}
${version}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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
}
To JSON using : pretty_print=False
${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '...
${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
getObjectListIds
${response}
ELSE
Create List
${objectIds}
获取结果中的对象ID
${response}
Logs the given message with the given level.
Call Get-ObjectIds
Call Get-ObjectIds
Returns a list containing given items.
${objectIds}
${objectIds} = []
Returns the given values which can then be assigned to a variables.
${EMPTY}
${objectIdsTemp}
${objectIdsTemp} =
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${value}
data
${return}
${data}
Returns a value from the given ``dictionary`` based on the given ``key``.
${value}
data
${return} = PASS
${data} = {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '#31739C', 'isDisplay': None, 'isExclusio...
Returns from the enclosing user keyword if ``condition`` is true.
"${return}"=="FAIL"
${objectIdsTemp}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
${objectIds} = [107877]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${rescode} = 200
${objectIds} = [107877]
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Runs the given keyword with the given arguments, if ``condition`` is true.
"${protocolField}" != "None"
Set Variable
${protocolField}
${protocolField}
Returns the given values which can then be assigned to a variables.
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_ADDR
Returns a list containing given items.
${objectsList}
${objectsList} = []
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107877, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
${objectIds} = [107877]
${objectList} = {'objectId': 107877, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Set Variable
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Set Variable
${objectList}
ELSE
OrangeFilter
${objectList}
${objectList}
Returns the given values which can then be assigned to a variables.
${objectList}
${objectList} = {'objectId': 107877, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}
${objectIds} = [107877]
${objectList} = {'objectId': 107877, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}
Returns and logs the length of the given item as an integer.
${objectIdsList}
${len}
Length is 11
${len} = 11
Runs the given keyword with the given arguments, if ``condition`` is true.
${len} != 0
AppendListToList
${objectIdsList}
${objectIds}
ELSE
Set Variable
${objectIds}
${objectIdsList}
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectIdsList}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
${objectIdsList} = [107866, 107867, 107868, 107869, 107870, 107871, 107872, 107873, 107874, 107875, 107876, 107877]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Append To List
${sourceList}
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Append To List
${destinationList}
${objectList}
ELSE
Append To List
${filterList}
${objectList}
Adds ``values`` to the end of ``list``.
${destinationList}
${objectList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${key}
protocolField
${protocolField}
${protocolField} = TSG_FIELD_HTTP_RES_CONTENT
处理对象
${key}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_FIELD_HTTP_RES_CONTENT
处理对象
${objectData}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_FIELD_HTTP_RES_CONTENT
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objList
${objList}
${objList} = [{'addItemList': [{'keywordArray': ['dongxiaoyan@*']}, {'keywordArray': ['*@163.com']}, {'keywordArray': ['@163.']}, {'keywordArray': ['$test@163.com']}]}, {'addItemList': [{'keywordArray': ['test@*']...
Displays the given messages in the log file as keyword arguments.
${objJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${objModeJson}
${objJson}
${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Returns the given values which can then be assigned to a variables.
${objListMode}
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectType
${return}
${objectType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectType
${return} = PASS
${objectType} = keywords
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectType}" != "None"
Replace String
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
${objectJson} = [{"objectId": null, "objectType":"keywords", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "tes...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectSubType
${return}
${objectSubType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectSubType
${return} = PASS
${objectSubType} =
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" != "None"
Replace String
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
${objectJson} = [{"objectId": null, "objectType":"keywords", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subO...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectId
${return}
${objectId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectId
Dictionary does not contain key 'objectId'.
${return} = FAIL
${objectId} = Dictionary does not contain key 'objectId'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"objectId": null
"objectId":${objectId}
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"keywords", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subO...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"opAction": "add"
"option": "update"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"keywords", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subO...
Returns a list containing given items.
${objectJsonList}
${objectJsonList} = []
Evaluates the given expression in Python and returns the results.
type(${objList})
${objListType}
${objListType} = <class 'list'>
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'keywordArray': ['dongxiaoyan@*']}, {'keywordArray': ['*@163.com']}, {'keywordArray': ['@163.']}, {'keywordArray': ['$test@163.com']}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"keywordArray": ["dongxiaoyan@*"]}, {"keywordArray": ["*@163.com"]}, {"keywordArray": ["@163."]}, {"keywordArray": ["$test@163.com"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["dongxiaoyan@*"]}, {"keywordArray": ["*@163.com"]}, {"keywordArray": ["@163."]}, {"keywordArray": ["$test@163.com"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["dongxiaoyan@*"]}, {"keywordArray": ["*@163.com"]}, {"keywordArray": ["@163."]}, {"keywordArray": ["$test@163.com"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType":"keywords", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subO...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"keywords", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subO...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'keywords', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addItem...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'keywordArray': ['test@*']}, {'keywordArray': ['*@test.com']}, {'keywordArray': ['@test.']}, {'keywordArray': ['$test@163.com']}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"keywordArray": ["test@*"]}, {"keywordArray": ["*@test.com"]}, {"keywordArray": ["@test."]}, {"keywordArray": ["$test@163.com"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["test@*"]}, {"keywordArray": ["*@test.com"]}, {"keywordArray": ["@test."]}, {"keywordArray": ["$test@163.com"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["test@*"]}, {"keywordArray": ["*@test.com"]}, {"keywordArray": ["@test."]}, {"keywordArray": ["$test@163.com"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType":"keywords", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subO...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"keywords", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subO...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'keywords', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addItem...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Creates and returns a dictionary based on the given ``items``.
opAction=add
returnData=1
objectList=${objectJsonList}
${objectData}
${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'keywords', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口...
${objectData}
${rescode}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${ipList}对象dict
Displays the given messages in the log file as keyword arguments.
创建IP
Returns a value from the given ``dictionary`` based on the given ``key``.
${ipList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${ipList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "keywords", "objectSubType": "", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355i...
${objectUrl}
${bodyJson}
${version}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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": ["$test@163.com"]}], "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": ["$test@163.com"]}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]}
json=None
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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" : [ "test@163.com" ],
"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" : [ "test@163.com" ],
"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
}
To JSON using : pretty_print=False
${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...
${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...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
getObjectListIds
${response}
ELSE
Create List
${objectIds}
获取结果中的对象ID
${response}
Logs the given message with the given level.
Call Get-ObjectIds
Call Get-ObjectIds
Returns a list containing given items.
${objectIds}
${objectIds} = []
Returns the given values which can then be assigned to a variables.
${EMPTY}
${objectIdsTemp}
${objectIdsTemp} =
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${value}
data
${return}
${data}
Returns a value from the given ``dictionary`` based on the given ``key``.
${value}
data
${return} = PASS
${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...
Returns from the enclosing user keyword if ``condition`` is true.
"${return}"=="FAIL"
${objectIdsTemp}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
${objectIds} = [107878, 107879]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${rescode} = 200
${objectIds} = [107878, 107879]
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Runs the given keyword with the given arguments, if ``condition`` is true.
"${protocolField}" != "None"
Set Variable
${protocolField}
${protocolField}
Returns the given values which can then be assigned to a variables.
${protocolField}
${protocolField} = TSG_FIELD_HTTP_RES_CONTENT
Returns a list containing given items.
${objectsList}
${objectsList} = []
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107878, 'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107878, 'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
${objectIds} = [107878, 107879]
${objectList} = {'objectId': 107878, 'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT'}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Set Variable
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Set Variable
${objectList}
ELSE
OrangeFilter
${objectList}
${objectList}
filer对象处理,把一个filter的list处理为一个filter
${objectList}
Returns a list containing given items.
${objectList}
${list}
${list} = [{'objectId': 107878, 'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT'}]
Creates and returns a dictionary based on the given ``items``.
filter=${list}
${filter}
${filter} = {'filter': [{'objectId': 107878, 'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT'}]}
${objectList} = {'filter': [{'objectId': 107878, 'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT'}]}
${objectIds} = [107878, 107879]
${objectList} = {'filter': [{'objectId': 107878, 'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT'}]}
Returns and logs the length of the given item as an integer.
${objectIdsList}
${len}
Length is 12
${len} = 12
Runs the given keyword with the given arguments, if ``condition`` is true.
${len} != 0
AppendListToList
${objectIdsList}
${objectIds}
ELSE
Set Variable
${objectIds}
${objectIdsList}
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectIdsList}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
${objectIdsList} = [107866, 107867, 107868, 107869, 107870, 107871, 107872, 107873, 107874, 107875, 107876, 107877, 107878, 107879]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Append To List
${sourceList}
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Append To List
${destinationList}
${objectList}
ELSE
Append To List
${filterList}
${objectList}
Adds ``values`` to the end of ``list``.
${filterList}
${objectList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${key}
protocolField
${protocolField}
${protocolField} = TSG_FIELD_HTTP_RES_CONTENT
处理对象
${key}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_FIELD_HTTP_RES_CONTENT
处理对象
${objectData}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_FIELD_HTTP_RES_CONTENT
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objList
${objList}
${objList} = [{'addItemList': [{'keywordArray': ['xiaoyan@*']}, {'keywordArray': ['*@163.com']}, {'keywordArray': ['@163.']}, {'keywordArray': ['$test@163.com']}]}, {'addItemList': [{'keywordArray': ['test@*']}, {...
Displays the given messages in the log file as keyword arguments.
${objJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${objModeJson}
${objJson}
${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Returns the given values which can then be assigned to a variables.
${objListMode}
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectType
${return}
${objectType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectType
${return} = PASS
${objectType} = keywords
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectType}" != "None"
Replace String
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
${objectJson} = [{"objectId": null, "objectType":"keywords", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "tes...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectSubType
${return}
${objectSubType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectSubType
${return} = PASS
${objectSubType} =
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" != "None"
Replace String
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
${objectJson} = [{"objectId": null, "objectType":"keywords", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subO...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectId
${return}
${objectId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectId
Dictionary does not contain key 'objectId'.
${return} = FAIL
${objectId} = Dictionary does not contain key 'objectId'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"objectId": null
"objectId":${objectId}
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"keywords", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subO...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"opAction": "add"
"option": "update"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"keywords", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subO...
Returns a list containing given items.
${objectJsonList}
${objectJsonList} = []
Evaluates the given expression in Python and returns the results.
type(${objList})
${objListType}
${objListType} = <class 'list'>
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'keywordArray': ['xiaoyan@*']}, {'keywordArray': ['*@163.com']}, {'keywordArray': ['@163.']}, {'keywordArray': ['$test@163.com']}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"keywordArray": ["xiaoyan@*"]}, {"keywordArray": ["*@163.com"]}, {"keywordArray": ["@163."]}, {"keywordArray": ["$test@163.com"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["xiaoyan@*"]}, {"keywordArray": ["*@163.com"]}, {"keywordArray": ["@163."]}, {"keywordArray": ["$test@163.com"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["xiaoyan@*"]}, {"keywordArray": ["*@163.com"]}, {"keywordArray": ["@163."]}, {"keywordArray": ["$test@163.com"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType":"keywords", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subO...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"keywords", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subO...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'keywords', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addItem...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'keywordArray': ['test@*']}, {'keywordArray': ['*@test.com']}, {'keywordArray': ['@test.']}, {'keywordArray': ['$test@163.com']}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"keywordArray": ["test@*"]}, {"keywordArray": ["*@test.com"]}, {"keywordArray": ["@test."]}, {"keywordArray": ["$test@163.com"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["test@*"]}, {"keywordArray": ["*@test.com"]}, {"keywordArray": ["@test."]}, {"keywordArray": ["$test@163.com"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["test@*"]}, {"keywordArray": ["*@test.com"]}, {"keywordArray": ["@test."]}, {"keywordArray": ["$test@163.com"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType":"keywords", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subO...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"keywords", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subO...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'keywords', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addItem...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Creates and returns a dictionary based on the given ``items``.
opAction=add
returnData=1
objectList=${objectJsonList}
${objectData}
${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'keywords', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口...
${objectData}
${rescode}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${ipList}对象dict
Displays the given messages in the log file as keyword arguments.
创建IP
Returns a value from the given ``dictionary`` based on the given ``key``.
${ipList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${ipList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "keywords", "objectSubType": "", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355i...
${objectUrl}
${bodyJson}
${version}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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": ["$test@163.com"]}], "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": ["$test@163.com"]}], "updateItemList": [], "deleteItemIds": [], "iconColor": "#31739C"}]}
json=None
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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" : [ "test@163.com" ],
"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" : [ "test@163.com" ],
"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
}
To JSON using : pretty_print=False
${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...
${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...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
getObjectListIds
${response}
ELSE
Create List
${objectIds}
获取结果中的对象ID
${response}
Logs the given message with the given level.
Call Get-ObjectIds
Call Get-ObjectIds
Returns a list containing given items.
${objectIds}
${objectIds} = []
Returns the given values which can then be assigned to a variables.
${EMPTY}
${objectIdsTemp}
${objectIdsTemp} =
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${value}
data
${return}
${data}
Returns a value from the given ``dictionary`` based on the given ``key``.
${value}
data
${return} = PASS
${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...
Returns from the enclosing user keyword if ``condition`` is true.
"${return}"=="FAIL"
${objectIdsTemp}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
${objectIds} = [107880, 107881]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${rescode} = 200
${objectIds} = [107880, 107881]
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Runs the given keyword with the given arguments, if ``condition`` is true.
"${protocolField}" != "None"
Set Variable
${protocolField}
${protocolField}
Returns the given values which can then be assigned to a variables.
${protocolField}
${protocolField} = TSG_FIELD_HTTP_RES_CONTENT
Returns a list containing given items.
${objectsList}
${objectsList} = []
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107880, 'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107880, 'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
${objectIds} = [107880, 107881]
${objectList} = {'objectId': 107880, 'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT'}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Set Variable
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Set Variable
${objectList}
ELSE
OrangeFilter
${objectList}
${objectList}
filer对象处理,把一个filter的list处理为一个filter
${objectList}
Returns a list containing given items.
${objectList}
${list}
${list} = [{'objectId': 107880, 'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT'}]
Creates and returns a dictionary based on the given ``items``.
filter=${list}
${filter}
${filter} = {'filter': [{'objectId': 107880, 'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT'}]}
${objectList} = {'filter': [{'objectId': 107880, 'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT'}]}
${objectIds} = [107880, 107881]
${objectList} = {'filter': [{'objectId': 107880, 'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT'}]}
Returns and logs the length of the given item as an integer.
${objectIdsList}
${len}
Length is 14
${len} = 14
Runs the given keyword with the given arguments, if ``condition`` is true.
${len} != 0
AppendListToList
${objectIdsList}
${objectIds}
ELSE
Set Variable
${objectIds}
${objectIdsList}
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectIdsList}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
${objectIdsList} = [107866, 107867, 107868, 107869, 107870, 107871, 107872, 107873, 107874, 107875, 107876, 107877, 107878, 107879, 107880, 107881]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Append To List
${sourceList}
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Append To List
${destinationList}
${objectList}
ELSE
Append To List
${filterList}
${objectList}
Adds ``values`` to the end of ``list``.
${filterList}
${objectList}
${objectIds} = [107866, 107867, 107868, 107869, 107870, 107871, 107872, 107873, 107874, 107875, 107876, 107877, 107878, 107879, 107880, 107881]
${sourceList} = [{'objectId': 107866, 'protocolField': None}, {'objectId': 107868, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}, {'objectId': 107870, 'protocolField': 'TSG_SECURITY_SOURCE_LOCATION'}, {'objectId': 107...
${destinationList} = [{'objectId': 107875, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}, {'objectId': 107876, 'protocolField': 'TSG_SECURITY_DESTINATION_LOCATION'}, {'objectId': 107877, 'protocolField': 'TSG_SECURITY...
${filterList} = [{'filter': [{'objectId': 107878, 'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT'}]}, {'filter': [{'objectId': 107880, 'protocolField': 'TSG_FIELD_HTTP_RES_CONTENT'}]}]
Serialize ``obj`` to a JSON formatted ``str``.
${sourceList}
${sourceList}
${sourceList} = [{"objectId": 107866, "protocolField": null}, {"objectId": 107868, "protocolField": "TSG_SECURITY_SOURCE_ADDR"}, {"objectId": 107870, "protocolField": "TSG_SECURITY_SOURCE_LOCATION"}, {"objectId": 107...
Serialize ``obj`` to a JSON formatted ``str``.
${destinationList}
${destinationList}
${destinationList} = [{"objectId": 107875, "protocolField": "TSG_SECURITY_DESTINATION_ADDR"}, {"objectId": 107876, "protocolField": "TSG_SECURITY_DESTINATION_LOCATION"}, {"objectId": 107877, "protocolField": "TSG_SECURITY...
Serialize ``obj`` to a JSON formatted ``str``.
${filterList}
${filterList}
${filterList} = [{"filter": [{"objectId": 107878, "protocolField": "TSG_FIELD_HTTP_RES_CONTENT"}]}, {"filter": [{"objectId": 107880, "protocolField": "TSG_FIELD_HTTP_RES_CONTENT"}]}]
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"source": null
"source":${sourceList}
${policyJson}
${policyJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"destination": null
"destination":${destinationList}
${policyJson}
${policyJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"filterList": null
"filterList":${filterList}
${policyJson}
${policyJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...
Displays the given messages in the log file as keyword arguments.
处理策略数据:
"opAction": "add"
"returnData": 1
"policyName": "autotest"
"policyType": "tsg_security"
"action": "allow"
"userTags": ""
"doBlacklist": 0
"doLog": 1
"policyDesc": "autotest"
"effectiveRange":
"userRegion":
"appIdObjects":
"appSelectorObjects":
"isValid": 1
"scheduleId":
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
opAction
${return}
${opAction}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
opAction
${return} = PASS
${opAction} = add
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${opAction}" != "${EMPTY}"
Replace String
${policyJson}
"opAction": "add"
"opAction": "${opAction}"
ELSE
Set Variable
${policyJson}
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"opAction": "add"
"opAction": "${opAction}"
${policyJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
returnData
${return}
${returnData}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
returnData
${return} = PASS
${returnData} = 1
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${returnData}" != "${EMPTY}"
Replace String
${policyJson}
"returnData": 1
"returnData": "${returnData}"
ELSE
Set Variable
${policyJson}
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"returnData": 1
"returnData": "${returnData}"
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest",...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
policyName
${return}
${policyName}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
policyName
${return} = PASS
${policyName} = autotestmonitor
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${policyName}" != "None"
Replace String
${policyJson}
"policyName": "autotest"
"policyName": "${policyName}"
ELSE
Replace String
${policyJson}
"policyName": "autotest"
"policyName": "${testName}"
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"policyName": "autotest"
"policyName": "${policyName}"
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestmonitor", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "aut...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
policyType
${return}
${policyType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
policyType
${return} = PASS
${policyType} = tsg_security
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${policyType}" != "None"
Replace String
${policyJson}
"policyType": "tsg_security"
"policyType": "${policyType}"
ELSE
Set Variable
${policyJson}
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"policyType": "tsg_security"
"policyType": "${policyType}"
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestmonitor", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "aut...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
action
${return}
${action}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
action
${return} = PASS
${action} = monitor
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${action}" != "None"
Replace String
${policyJson}
"action": "allow"
"action": "${action}"
ELSE
Set Variable
${policyJson}}
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"action": "allow"
"action": "${action}"
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestmonitor", "policyType": "tsg_security", "action": "monitor", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "a...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
method
${return}
${method}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
method
Dictionary does not contain key 'method'.
${return} = FAIL
${method} = Dictionary does not contain key 'method'.
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
userTags
${return}
${userTags}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
userTags
${return} = PASS
${userTags} =
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${userTags}" != "None"
Replace String
${policyJson}
"userTags": null
"userTags": ${userTags}
ELSE
Set Variable
${policyJson}
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"userTags": null
"userTags": ${userTags}
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestmonitor", "policyType": "tsg_security", "action": "monitor", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "a...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
doBlacklist
${return}
${doBlacklist}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
doBlacklist
${return} = PASS
${doBlacklist} = 0
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${doBlacklist}" != "None"
Replace String
${policyJson}
"doBlacklist": 0
"doBlacklist": ${doBlacklist}
ELSE
Set Variable
${policyJson}
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"doBlacklist": 0
"doBlacklist": ${doBlacklist}
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestmonitor", "policyType": "tsg_security", "action": "monitor", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "a...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
doLog
${return}
${doLog}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
doLog
${return} = PASS
${doLog} = 1
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${doLog}" != "None"
Replace String
${policyJson}
"doLog": 1
"doLog": ${doLog}
ELSE
Set Variable
${policyJson}
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"doLog": 1
"doLog": ${doLog}
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestmonitor", "policyType": "tsg_security", "action": "monitor", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "a...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
policyDesc
${return}
${policyDesc}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
policyDesc
${return} = PASS
${policyDesc} = autotest
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${policyDesc}" != "None"
Replace String
${policyJson}
"policyDesc": "autotest"
"policyDesc": "${policyDesc}"
ELSE
Set Variable
${policyJson}
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"policyDesc": "autotest"
"policyDesc": "${policyDesc}"
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestmonitor", "policyType": "tsg_security", "action": "monitor", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "a...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
effectiveRange
${return}
${effectiveRange}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
effectiveRange
${return} = PASS
${effectiveRange} = None
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${effectiveRange}" != "None"
Replace String
${policyJson}
"effectiveRange": null
"effectiveRange": ${effectiveRange}
ELSE
Replace String
${policyJson}
"effectiveRange": null
"effectiveRange": {}
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"effectiveRange": null
"effectiveRange": {}
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestmonitor", "policyType": "tsg_security", "action": "monitor", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "a...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
userRegion
${return}
${userRegion}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
userRegion
${return} = PASS
${userRegion} = None
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
code
${return}
${code}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
code
Dictionary does not contain key 'code'.
${return} = FAIL
${code} = Dictionary does not contain key 'code'.
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
message
${return}
${message}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
message
Dictionary does not contain key 'message'.
${return} = FAIL
${message} = Dictionary does not contain key 'message'.
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
html_profile
${return}
${html_profile}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
html_profile
Dictionary does not contain key 'html_profile'.
${return} = FAIL
${html_profile} = Dictionary does not contain key 'html_profile'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${html_profile}" != "None"
Set Variable
${html_profile}
ELSE
Set Variable
${message}
${message}
Returns the given values which can then be assigned to a variables.
${message}
${message} = Dictionary does not contain key 'message'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${html_profile}" != "None"
Set Variable
html_profile
ELSE
Set Variable
message
${messageKey}
Returns the given values which can then be assigned to a variables.
message
${messageKey} = message
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
keyring
${return}
${keyring}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
keyring
Dictionary does not contain key 'keyring'.
${return} = FAIL
${keyring} = Dictionary does not contain key 'keyring'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${keyring}" != "None"
Set Variable
${keyring}
ELSE
Set Variable
""
${keyring}
Returns the given values which can then be assigned to a variables.
""
${keyring} = ""
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
decryption
${return}
${decryption}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
decryption
Dictionary does not contain key 'decryption'.
${return} = FAIL
${decryption} = Dictionary does not contain key 'decryption'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${decryption}" != "None"
Set Variable
${decryption}
ELSE
Set Variable
""
${decryption}
Returns the given values which can then be assigned to a variables.
""
${decryption} = ""
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
decrypt_mirror
${return}
${decrypt_mirror}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
decrypt_mirror
Dictionary does not contain key 'decrypt_mirror'.
${return} = FAIL
${decrypt_mirror} = Dictionary does not contain key 'decrypt_mirror'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${decrypt_mirror}" != "None"
Set Variable
${decrypt_mirror}
ELSE
Set Variable
""
${decrypt_mirror}
Returns the given values which can then be assigned to a variables.
""
${decrypt_mirror} = ""
Serialize ``obj`` to a JSON formatted ``str``.
${decrypt_mirror}
${decrypt_mirror}
${decrypt_mirror} = "\"\""
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
appIdObjects
${return}
${appIdObjects}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
appIdObjects
${return} = PASS
${appIdObjects} = ['http']
Returns a list containing given items.
${appIdObjectIds}
${appIdObjectIds} = []
Displays the given messages in the log file as keyword arguments.
userRegionStr由:动作,协议,动作参数等决定,待完成;userregion在allow,monitor动作时多个协议为空;deny,多个协议时为子动作;Intercept,多个协议为空;http为,ssl为,判断appid对象的个数。
Returns the given values which can then be assigned to a variables.
${userRegionStr}
${userRegionStr} =
Returns a value from the given ``dictionary`` based on the given ``key``.
${objprotol}
${key}
${appObjId}
${appObjId} = 75744
Adds ``values`` to the end of ``list``.
${appIdObjectIds}
${appObjId}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${method}" == "block" or "${method}" == "alert"
Set Variable
{"protocol":"${key}","method": "${method}","code":${code},"${messageKey}":${message}}
ELSE IF
"${action}" == "deny"
Set Variable
{"protocol":"${key}","method": "${method}"}
ELSE IF
"${action}" == "intercept" and "${key}" == "ssl"
Set Variable
{"protocol":"SSL","keyring": ${keyring},"decryption":${decryption},"decrypt_mirror":${decrypt_mirror}}
ELSE
Set Variable
{"protocol":"HTTP"}
${userRegionStr}
Returns the given values which can then be assigned to a variables.
{"protocol":"HTTP"}
${userRegionStr} = {"protocol":"HTTP"}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${appIdObjects}" != "None"
Replace String
${policyJson}
"appIdObjects": [null]
"appIdObjects": ${appIdObjectIds}
ELSE
Set Variable
${policyJson}
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"appIdObjects": [null]
"appIdObjects": ${appIdObjectIds}
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestmonitor", "policyType": "tsg_security", "action": "monitor", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "a...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"userRegion": null
"userRegion": ${userRegionStr}
${policyJson}
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestmonitor", "policyType": "tsg_security", "action": "monitor", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "a...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"userRegion": null
"userRegion": {}
${policyJson}
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestmonitor", "policyType": "tsg_security", "action": "monitor", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "a...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
appSelectorObjects
${return}
${appSelectorObjects}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
appSelectorObjects
${return} = PASS
${appSelectorObjects} = None
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL"
Set Variable
${appSelectorObjects}
ELSE
Set Variable
${EMPTY}
${appSelectorObjects}
Returns the given values which can then be assigned to a variables.
${appSelectorObjects}
${appSelectorObjects} = None
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${appSelectorObjects}" != "None"
Replace String
${policyJson}
"appSelectorObjects": "add"
"appSelectorObjects": ${appSelectorObjects}
ELSE
Set Variable
${policyJson}
${policyJson}
Returns the given values which can then be assigned to a variables.
${policyJson}
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestmonitor", "policyType": "tsg_security", "action": "monitor", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "a...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
isValid
${return}
${isValid}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
isValid
${return} = PASS
${isValid} = 1
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL"
Set Variable
${isValid}
ELSE
Set Variable
${EMPTY}
${appSelectorObjects}
Returns the given values which can then be assigned to a variables.
${isValid}
${appSelectorObjects} = 1
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${isValid}" != "None"
Replace String
${policyJson}
"isValid": 1
"isValid": ${isValid}
ELSE
Set Variable
${policyJson}
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"isValid": 1
"isValid": ${isValid}
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestmonitor", "policyType": "tsg_security", "action": "monitor", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "a...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
scheduleId
${return}
${scheduleId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
scheduleId
${return} = PASS
${scheduleId} = None
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL"
Set Variable
${scheduleId}
ELSE
Set Variable
${EMPTY}
${scheduleId}
Returns the given values which can then be assigned to a variables.
${scheduleId}
${scheduleId} = None
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${scheduleId}" != "None"
Replace String
${policyJson}
"scheduleId": [null]
"scheduleId": ${scheduleId}
ELSE
Set Variable
${policyJson}
${policyJson}
Returns the given values which can then be assigned to a variables.
${policyJson}
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestmonitor", "policyType": "tsg_security", "action": "monitor", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "a...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
[null]
[]
${policyJson}
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestmonitor", "policyType": "tsg_security", "action": "monitor", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "a...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${policyJson}
${policyJson}
${policyJson} = {'opAction': 'add', 'returnData': '1', 'policyList': {'policyName': 'autotestmonitor', 'policyType': 'tsg_security', 'action': 'monitor', 'userTags': '', 'doBlacklist': 0, 'doLog': 1, 'policyDesc': 'a...
场景策略:secuiryt、proxy策略
数据分离,测试数据来自对应的yaml文件
参数 ${policyList}
${policyJson}
${policyIds}
Displays the given messages in the log file as keyword arguments.
参数
${filepath}读取文件路径
${filename}读取文件名
${keywords}获取数据关键字
Displays the given messages in the log file as keyword arguments.
创建策略
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${policyList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestmonitor", "policyType": "tsg_security", "action": "monitor", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "a...
${policyUrl}
${bodyJson}
${version2}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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
}
To JSON using : pretty_print=False
${response} = {'code': 200, 'msg': 'Success', 'data': {'policyList': [{'action': 'monitor', 'appIdObjects': [75744], 'appSelectorObjects': [], 'destination': [{'objectId': 107875, 'protocolField': 'TSG_SECURITY_DES...
${response} = {'code': 200, 'msg': 'Success', 'data': {'policyList': [{'action': 'monitor', 'appIdObjects': [75744], 'appSelectorObjects': [], 'destination': [{'objectId': 107875, 'protocolField': 'TSG_SECURITY_DES...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
GetPolicyIds
${response}
ELSE
Create List
${policyIds}
获取结果中的策略类型及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]}]
${response}
Returns a list containing given items.
${policyIds}
${policyIds} = []
Returns a list containing given items.
${policy['policyId']}
${policyIdList}
${policyIdList} = [52340]
Creates and returns a dictionary based on the given ``items``.
policyType=${policy['policyType']}
policyIds=${policyIdList}
${policyObj}
${policyObj} = {'policyType': 'tsg_security', 'policyIds': [52340]}
Adds ``values`` to the end of ``list``.
${policyIds}
${policyObj}
Logs the given message with the given level.
${policyIds}
[{'policyType': 'tsg_security', 'policyIds': [52340]}]
${policyIds} = [{'policyType': 'tsg_security', 'policyIds': [52340]}]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${policyIds} = [{'policyType': 'tsg_security', 'policyIds': [52340]}]
${objectId} = [107866, 107867, 107868, 107869, 107870, 107871, 107872, 107873, 107874, 107875, 107876, 107877, 107878, 107879, 107880, 107881]
${policyId} = [{'policyType': 'tsg_security', 'policyIds': [52340]}]
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectIds}
${objectId}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${policyIds}
${policyId}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Logs the given message with the given level.
passssssssss
passssssssss
组织单个策略数据${modleFilePath}策略模板文件路径 ${policyData}从数据文件中获取的单个策略数据
${key}
${keyword}
${objectId}
${policyId}
Displays the given messages in the log file as keyword arguments.
获取模板
Displays the given messages in the log file as keyword arguments.
${policyModeJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${policyModeJson}
${policyJson}
${policyJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...
Displays the given messages in the log file as keyword arguments.
用data数据替换模板内容生成策略新增数据
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
condation
${condation}
${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...
解析策略条件,根据key值判断其在source、destation、filter中
${condation}
${objectIds}
${sourceList}
${destinationList}
${filterList}
Displays the given messages in the log file as keyword arguments.
循环读取对象list
Returns a list containing given items.
${sourceList}
${sourceList} = []
Returns a list containing given items.
${destinationList}
${destinationList} = []
Returns a list containing given items.
${filterList}
${filterList} = []
Returns a list containing given items.
${objectIdsList}
${objectIdsList} = []
Returns a value from the given ``dictionary`` based on the given ``key``.
${key}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_ADDR
处理对象
${key}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_ADDR
处理对象
${objectData}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_ADDR
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objList
${objList}
${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...
Displays the given messages in the log file as keyword arguments.
${objJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${objModeJson}
${objJson}
${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Returns the given values which can then be assigned to a variables.
${objListMode}
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectType
${return}
${objectType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectType
${return} = PASS
${objectType} = ip
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectType}" != "None"
Replace String
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "s...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectSubType
${return}
${objectSubType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectSubType
${return} = PASS
${objectSubType} = endpoint
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" != "None"
Replace String
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectId
${return}
${objectId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectId
Dictionary does not contain key 'objectId'.
${return} = FAIL
${objectId} = Dictionary does not contain key 'objectId'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"objectId": null
"objectId":${objectId}
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"opAction": "add"
"option": "update"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...
Returns a list containing given items.
${objectJsonList}
${objectJsonList} = []
Evaluates the given expression in Python and returns the results.
type(${objList})
${objListType}
${objListType} = <class 'list'>
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'ip': '255.255.255.255', 'port': '0-65535'}, {'ip': '255.255.255.255', 'port': '1-65535'}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"ip": "255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.255", "port": "1-65535"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"ip": "255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.255", "port": "1-65535"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"ip": "255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.255", "port": "1-65535"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addIt...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'ip': '255.255.255.1-255.255.255.255', 'port': '0-65535'}, {'ip': '255.255.255.2/24', 'port': '1-65535'}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"ip": "255.255.255.1-255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.2/24", "port": "1-65535"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"ip": "255.255.255.1-255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.2/24", "port": "1-65535"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"ip": "255.255.255.1-255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.2/24", "port": "1-65535"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addIt...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Creates and returns a dictionary based on the given ``items``.
opAction=add
returnData=1
objectList=${objectJsonList}
${objectData}
${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定...
${objectData}
${rescode}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${ipList}对象dict
Displays the given messages in the log file as keyword arguments.
创建IP
Returns a value from the given ``dictionary`` based on the given ``key``.
${ipList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${ipList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u535...
${objectUrl}
${bodyJson}
${version}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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
}
To JSON using : pretty_print=False
${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.255', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '0', 'clientPort2':...
${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.255', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '0', 'clientPort2':...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
getObjectListIds
${response}
ELSE
Create List
${objectIds}
获取结果中的对象ID
${response}
Logs the given message with the given level.
Call Get-ObjectIds
Call Get-ObjectIds
Returns a list containing given items.
${objectIds}
${objectIds} = []
Returns the given values which can then be assigned to a variables.
${EMPTY}
${objectIdsTemp}
${objectIdsTemp} =
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${value}
data
${return}
${data}
Returns a value from the given ``dictionary`` based on the given ``key``.
${value}
data
${return} = PASS
${data} = {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.255', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '0', 'clientPort2': '65535', 'clientPortFormat': 'range', '...
Returns from the enclosing user keyword if ``condition`` is true.
"${return}"=="FAIL"
${objectIdsTemp}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
${objectIds} = [107882, 107883]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${rescode} = 200
${objectIds} = [107882, 107883]
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Runs the given keyword with the given arguments, if ``condition`` is true.
"${protocolField}" != "None"
Set Variable
${protocolField}
${protocolField}
Returns the given values which can then be assigned to a variables.
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_ADDR
Returns a list containing given items.
${objectsList}
${objectsList} = []
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107882, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107882, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
${objectIds} = [107882, 107883]
${objectList} = {'objectId': 107882, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Set Variable
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Set Variable
${objectList}
ELSE
OrangeFilter
${objectList}
${objectList}
Returns the given values which can then be assigned to a variables.
${objectList}
${objectList} = {'objectId': 107882, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}
${objectIds} = [107882, 107883]
${objectList} = {'objectId': 107882, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}
Returns and logs the length of the given item as an integer.
${objectIdsList}
${len}
Length is 0
${len} = 0
Runs the given keyword with the given arguments, if ``condition`` is true.
${len} != 0
AppendListToList
${objectIdsList}
${objectIds}
ELSE
Set Variable
${objectIds}
${objectIdsList}
Returns the given values which can then be assigned to a variables.
${objectIds}
${objectIdsList} = [107882, 107883]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Append To List
${sourceList}
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Append To List
${destinationList}
${objectList}
ELSE
Append To List
${filterList}
${objectList}
Adds ``values`` to the end of ``list``.
${sourceList}
${objectList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${key}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_LOCATION
处理对象
${key}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_LOCATION
处理对象
${objectData}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_LOCATION
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objList
${objList}
${objList} = [{'addItemList': [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}, {'keywordArray': ['China.Duyun.*']}]}]
Displays the given messages in the log file as keyword arguments.
${objJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${objModeJson}
${objJson}
${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Returns the given values which can then be assigned to a variables.
${objListMode}
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectType
${return}
${objectType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectType
${return} = PASS
${objectType} = ip
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectType}" != "None"
Replace String
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "s...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectSubType
${return}
${objectSubType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectSubType
${return} = PASS
${objectSubType} = geo_location
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" != "None"
Replace String
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectId
${return}
${objectId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectId
Dictionary does not contain key 'objectId'.
${return} = FAIL
${objectId} = Dictionary does not contain key 'objectId'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"objectId": null
"objectId":${objectId}
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"opAction": "add"
"option": "update"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...
Returns a list containing given items.
${objectJsonList}
${objectJsonList} = []
Evaluates the given expression in Python and returns the results.
type(${objList})
${objListType}
${objListType} = <class 'list'>
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}, {'keywordArray': ['China.Duyun.*']}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}, {"keywordArray": ["China.Duyun.*"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}, {"keywordArray": ["China.Duyun.*"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}, {"keywordArray": ["China.Duyun.*"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'geo_location', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'a...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Creates and returns a dictionary based on the given ``items``.
opAction=add
returnData=1
objectList=${objectJsonList}
${objectData}
${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'geo_location', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单...
${objectData}
${rescode}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${ipList}对象dict
Displays the given messages in the log file as keyword arguments.
创建IP
Returns a value from the given ``dictionary`` based on the given ``key``.
${ipList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${ipList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\...
${objectUrl}
${bodyJson}
${version}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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
}
To JSON using : pretty_print=False
${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...
${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...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
getObjectListIds
${response}
ELSE
Create List
${objectIds}
获取结果中的对象ID
${response}
Logs the given message with the given level.
Call Get-ObjectIds
Call Get-ObjectIds
Returns a list containing given items.
${objectIds}
${objectIds} = []
Returns the given values which can then be assigned to a variables.
${EMPTY}
${objectIdsTemp}
${objectIdsTemp} =
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${value}
data
${return}
${data}
Returns a value from the given ``dictionary`` based on the given ``key``.
${value}
data
${return} = PASS
${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...
Returns from the enclosing user keyword if ``condition`` is true.
"${return}"=="FAIL"
${objectIdsTemp}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
${objectIds} = [107884]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${rescode} = 200
${objectIds} = [107884]
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Runs the given keyword with the given arguments, if ``condition`` is true.
"${protocolField}" != "None"
Set Variable
${protocolField}
${protocolField}
Returns the given values which can then be assigned to a variables.
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_LOCATION
Returns a list containing given items.
${objectsList}
${objectsList} = []
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107884, 'protocolField': 'TSG_SECURITY_SOURCE_LOCATION'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
${objectIds} = [107884]
${objectList} = {'objectId': 107884, 'protocolField': 'TSG_SECURITY_SOURCE_LOCATION'}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Set Variable
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Set Variable
${objectList}
ELSE
OrangeFilter
${objectList}
${objectList}
Returns the given values which can then be assigned to a variables.
${objectList}
${objectList} = {'objectId': 107884, 'protocolField': 'TSG_SECURITY_SOURCE_LOCATION'}
${objectIds} = [107884]
${objectList} = {'objectId': 107884, 'protocolField': 'TSG_SECURITY_SOURCE_LOCATION'}
Returns and logs the length of the given item as an integer.
${objectIdsList}
${len}
Length is 2
${len} = 2
Runs the given keyword with the given arguments, if ``condition`` is true.
${len} != 0
AppendListToList
${objectIdsList}
${objectIds}
ELSE
Set Variable
${objectIds}
${objectIdsList}
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectIdsList}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
${objectIdsList} = [107882, 107883, 107884]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Append To List
${sourceList}
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Append To List
${destinationList}
${objectList}
ELSE
Append To List
${filterList}
${objectList}
Adds ``values`` to the end of ``list``.
${sourceList}
${objectList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${key}
protocolField
${protocolField}
${protocolField} = TSG_FILED_GTP_IMSI
处理对象
${key}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_FILED_GTP_IMSI
处理对象
${objectData}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_FILED_GTP_IMSI
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objList
${objList}
${objList} = [{'addItemList': [{'keywordArray': ['123*']}, {'keywordArray': ['456*']}, {'keywordArray': ['12345678912345*']}]}]
Displays the given messages in the log file as keyword arguments.
${objJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${objModeJson}
${objJson}
${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Returns the given values which can then be assigned to a variables.
${objListMode}
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectType
${return}
${objectType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectType
${return} = PASS
${objectType} = mobile_identity
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectType}" != "None"
Replace String
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectSubType
${return}
${objectSubType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectSubType
${return} = PASS
${objectSubType} = imsi
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" != "None"
Replace String
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "t...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectId
${return}
${objectId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectId
Dictionary does not contain key 'objectId'.
${return} = FAIL
${objectId} = Dictionary does not contain key 'objectId'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"objectId": null
"objectId":${objectId}
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "t...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"opAction": "add"
"option": "update"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "t...
Returns a list containing given items.
${objectJsonList}
${objectJsonList} = []
Evaluates the given expression in Python and returns the results.
type(${objList})
${objListType}
${objListType} = <class 'list'>
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'keywordArray': ['123*']}, {'keywordArray': ['456*']}, {'keywordArray': ['12345678912345*']}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["456*"]}, {"keywordArray": ["12345678912345*"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["456*"]}, {"keywordArray": ["12345678912345*"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["456*"]}, {"keywordArray": ["12345678912345*"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "t...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "t...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'mobile_identity', 'objectSubType': 'imsi', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Creates and returns a dictionary based on the given ``items``.
opAction=add
returnData=1
objectList=${objectJsonList}
${objectData}
${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'mobile_identity', 'objectSubType': 'imsi', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'aut...
${objectData}
${rescode}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${ipList}对象dict
Displays the given messages in the log file as keyword arguments.
创建IP
Returns a value from the given ``dictionary`` based on the given ``key``.
${ipList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${ipList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "mobile_identity", "objectSubType": "imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "aut...
${objectUrl}
${bodyJson}
${version}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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
}
To JSON using : pretty_print=False
${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...
${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...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
getObjectListIds
${response}
ELSE
Create List
${objectIds}
获取结果中的对象ID
${response}
Logs the given message with the given level.
Call Get-ObjectIds
Call Get-ObjectIds
Returns a list containing given items.
${objectIds}
${objectIds} = []
Returns the given values which can then be assigned to a variables.
${EMPTY}
${objectIdsTemp}
${objectIdsTemp} =
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${value}
data
${return}
${data}
Returns a value from the given ``dictionary`` based on the given ``key``.
${value}
data
${return} = PASS
${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...
Returns from the enclosing user keyword if ``condition`` is true.
"${return}"=="FAIL"
${objectIdsTemp}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
${objectIds} = [107885]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${rescode} = 200
${objectIds} = [107885]
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Runs the given keyword with the given arguments, if ``condition`` is true.
"${protocolField}" != "None"
Set Variable
${protocolField}
${protocolField}
Returns the given values which can then be assigned to a variables.
${protocolField}
${protocolField} = TSG_FILED_GTP_IMSI
Returns a list containing given items.
${objectsList}
${objectsList} = []
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107885, 'protocolField': 'TSG_FILED_GTP_IMSI'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
${objectIds} = [107885]
${objectList} = {'objectId': 107885, 'protocolField': 'TSG_FILED_GTP_IMSI'}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Set Variable
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Set Variable
${objectList}
ELSE
OrangeFilter
${objectList}
${objectList}
Returns the given values which can then be assigned to a variables.
${objectList}
${objectList} = {'objectId': 107885, 'protocolField': 'TSG_FILED_GTP_IMSI'}
${objectIds} = [107885]
${objectList} = {'objectId': 107885, 'protocolField': 'TSG_FILED_GTP_IMSI'}
Returns and logs the length of the given item as an integer.
${objectIdsList}
${len}
Length is 3
${len} = 3
Runs the given keyword with the given arguments, if ``condition`` is true.
${len} != 0
AppendListToList
${objectIdsList}
${objectIds}
ELSE
Set Variable
${objectIds}
${objectIdsList}
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectIdsList}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
${objectIdsList} = [107882, 107883, 107884, 107885]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Append To List
${sourceList}
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Append To List
${destinationList}
${objectList}
ELSE
Append To List
${filterList}
${objectList}
Adds ``values`` to the end of ``list``.
${sourceList}
${objectList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${key}
protocolField
${protocolField}
${protocolField} = TSG_FILED_GTP_PHONE_NUMBER
处理对象
${key}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_FILED_GTP_PHONE_NUMBER
处理对象
${objectData}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_FILED_GTP_PHONE_NUMBER
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objList
${objList}
${objList} = [{'addItemList': [{'keywordArray': ['123*']}, {'keywordArray': ['$123456789012345']}, {'keywordArray': ['12345']}]}]
Displays the given messages in the log file as keyword arguments.
${objJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${objModeJson}
${objJson}
${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Returns the given values which can then be assigned to a variables.
${objListMode}
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectType
${return}
${objectType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectType
${return} = PASS
${objectType} = mobile_identity
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectType}" != "None"
Replace String
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectSubType
${return}
${objectSubType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectSubType
${return} = PASS
${objectSubType} = phone_number
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" != "None"
Replace String
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectD...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectId
${return}
${objectId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectId
Dictionary does not contain key 'objectId'.
${return} = FAIL
${objectId} = Dictionary does not contain key 'objectId'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"objectId": null
"objectId":${objectId}
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectD...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"opAction": "add"
"option": "update"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectD...
Returns a list containing given items.
${objectJsonList}
${objectJsonList} = []
Evaluates the given expression in Python and returns the results.
type(${objList})
${objListType}
${objListType} = <class 'list'>
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'keywordArray': ['123*']}, {'keywordArray': ['$123456789012345']}, {'keywordArray': ['12345']}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["$123456789012345"]}, {"keywordArray": ["12345"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["$123456789012345"]}, {"keywordArray": ["12345"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["$123456789012345"]}, {"keywordArray": ["12345"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectD...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectD...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'mobile_identity', 'objectSubType': 'phone_number', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjec...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Creates and returns a dictionary based on the given ``items``.
opAction=add
returnData=1
objectList=${objectJsonList}
${objectData}
${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'mobile_identity', 'objectSubType': 'phone_number', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectNam...
${objectData}
${rescode}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${ipList}对象dict
Displays the given messages in the log file as keyword arguments.
创建IP
Returns a value from the given ``dictionary`` based on the given ``key``.
${ipList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${ipList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "mobile_identity", "objectSubType": "phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectNam...
${objectUrl}
${bodyJson}
${version}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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
}
To JSON using : pretty_print=False
${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...
${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...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
getObjectListIds
${response}
ELSE
Create List
${objectIds}
获取结果中的对象ID
${response}
Logs the given message with the given level.
Call Get-ObjectIds
Call Get-ObjectIds
Returns a list containing given items.
${objectIds}
${objectIds} = []
Returns the given values which can then be assigned to a variables.
${EMPTY}
${objectIdsTemp}
${objectIdsTemp} =
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${value}
data
${return}
${data}
Returns a value from the given ``dictionary`` based on the given ``key``.
${value}
data
${return} = PASS
${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...
Returns from the enclosing user keyword if ``condition`` is true.
"${return}"=="FAIL"
${objectIdsTemp}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
${objectIds} = [107886]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${rescode} = 200
${objectIds} = [107886]
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Runs the given keyword with the given arguments, if ``condition`` is true.
"${protocolField}" != "None"
Set Variable
${protocolField}
${protocolField}
Returns the given values which can then be assigned to a variables.
${protocolField}
${protocolField} = TSG_FILED_GTP_PHONE_NUMBER
Returns a list containing given items.
${objectsList}
${objectsList} = []
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107886, 'protocolField': 'TSG_FILED_GTP_PHONE_NUMBER'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
${objectIds} = [107886]
${objectList} = {'objectId': 107886, 'protocolField': 'TSG_FILED_GTP_PHONE_NUMBER'}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Set Variable
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Set Variable
${objectList}
ELSE
OrangeFilter
${objectList}
${objectList}
Returns the given values which can then be assigned to a variables.
${objectList}
${objectList} = {'objectId': 107886, 'protocolField': 'TSG_FILED_GTP_PHONE_NUMBER'}
${objectIds} = [107886]
${objectList} = {'objectId': 107886, 'protocolField': 'TSG_FILED_GTP_PHONE_NUMBER'}
Returns and logs the length of the given item as an integer.
${objectIdsList}
${len}
Length is 4
${len} = 4
Runs the given keyword with the given arguments, if ``condition`` is true.
${len} != 0
AppendListToList
${objectIdsList}
${objectIds}
ELSE
Set Variable
${objectIds}
${objectIdsList}
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectIdsList}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
${objectIdsList} = [107882, 107883, 107884, 107885, 107886]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Append To List
${sourceList}
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Append To List
${destinationList}
${objectList}
ELSE
Append To List
${filterList}
${objectList}
Adds ``values`` to the end of ``list``.
${sourceList}
${objectList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${key}
protocolField
${protocolField}
${protocolField} = TSG_FILED_GTP_APN
处理对象
${key}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_FILED_GTP_APN
处理对象
${objectData}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_FILED_GTP_APN
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objList
${objList}
${objList} = [{'addItemList': [{'keywordArray': ['*uawei.org']}, {'keywordArray': ['$huawei.com']}, {'keywordArray': ['$www.huawei.com']}]}]
Displays the given messages in the log file as keyword arguments.
${objJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${objModeJson}
${objJson}
${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Returns the given values which can then be assigned to a variables.
${objListMode}
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectType
${return}
${objectType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectType
${return} = PASS
${objectType} = apn
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectType}" != "None"
Replace String
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectSubType
${return}
${objectSubType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectSubType
${return} = PASS
${objectSubType} =
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" != "None"
Replace String
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectId
${return}
${objectId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectId
Dictionary does not contain key 'objectId'.
${return} = FAIL
${objectId} = Dictionary does not contain key 'objectId'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"objectId": null
"objectId":${objectId}
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"opAction": "add"
"option": "update"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...
Returns a list containing given items.
${objectJsonList}
${objectJsonList} = []
Evaluates the given expression in Python and returns the results.
type(${objList})
${objListType}
${objListType} = <class 'list'>
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'keywordArray': ['*uawei.org']}, {'keywordArray': ['$huawei.com']}, {'keywordArray': ['$www.huawei.com']}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"keywordArray": ["*uawei.org"]}, {"keywordArray": ["$huawei.com"]}, {"keywordArray": ["$www.huawei.com"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["*uawei.org"]}, {"keywordArray": ["$huawei.com"]}, {"keywordArray": ["$www.huawei.com"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["*uawei.org"]}, {"keywordArray": ["$huawei.com"]}, {"keywordArray": ["$www.huawei.com"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'apn', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addItemList'...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Creates and returns a dictionary based on the given ``items``.
opAction=add
returnData=1
objectList=${objectJsonList}
${objectData}
${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'apn', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'o...
${objectData}
${rescode}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${ipList}对象dict
Displays the given messages in the log file as keyword arguments.
创建IP
Returns a value from the given ``dictionary`` based on the given ``key``.
${ipList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${ipList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "apn", "objectSubType": "", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u63...
${objectUrl}
${bodyJson}
${version}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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
}
To JSON using : pretty_print=False
${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...
${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...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
getObjectListIds
${response}
ELSE
Create List
${objectIds}
获取结果中的对象ID
${response}
Logs the given message with the given level.
Call Get-ObjectIds
Call Get-ObjectIds
Returns a list containing given items.
${objectIds}
${objectIds} = []
Returns the given values which can then be assigned to a variables.
${EMPTY}
${objectIdsTemp}
${objectIdsTemp} =
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${value}
data
${return}
${data}
Returns a value from the given ``dictionary`` based on the given ``key``.
${value}
data
${return} = PASS
${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...
Returns from the enclosing user keyword if ``condition`` is true.
"${return}"=="FAIL"
${objectIdsTemp}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
${objectIds} = [107887]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${rescode} = 200
${objectIds} = [107887]
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Runs the given keyword with the given arguments, if ``condition`` is true.
"${protocolField}" != "None"
Set Variable
${protocolField}
${protocolField}
Returns the given values which can then be assigned to a variables.
${protocolField}
${protocolField} = TSG_FILED_GTP_APN
Returns a list containing given items.
${objectsList}
${objectsList} = []
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107887, 'protocolField': 'TSG_FILED_GTP_APN'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
${objectIds} = [107887]
${objectList} = {'objectId': 107887, 'protocolField': 'TSG_FILED_GTP_APN'}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Set Variable
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Set Variable
${objectList}
ELSE
OrangeFilter
${objectList}
${objectList}
Returns the given values which can then be assigned to a variables.
${objectList}
${objectList} = {'objectId': 107887, 'protocolField': 'TSG_FILED_GTP_APN'}
${objectIds} = [107887]
${objectList} = {'objectId': 107887, 'protocolField': 'TSG_FILED_GTP_APN'}
Returns and logs the length of the given item as an integer.
${objectIdsList}
${len}
Length is 5
${len} = 5
Runs the given keyword with the given arguments, if ``condition`` is true.
${len} != 0
AppendListToList
${objectIdsList}
${objectIds}
ELSE
Set Variable
${objectIds}
${objectIdsList}
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectIdsList}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
${objectIdsList} = [107882, 107883, 107884, 107885, 107886, 107887]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Append To List
${sourceList}
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Append To List
${destinationList}
${objectList}
ELSE
Append To List
${filterList}
${objectList}
Adds ``values`` to the end of ``list``.
${sourceList}
${objectList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${key}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_ADDR
处理对象
${key}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_ADDR
处理对象
${objectData}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_ADDR
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objList
${objList}
${objList} = [{'addItemList': [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'learningDepth': '2', 'agingTime': '12', 'voteClientNum': '10', 'learnedIpLimit': '1000'}]}]
Displays the given messages in the log file as keyword arguments.
${objJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${objModeJson}
${objJson}
${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Returns the given values which can then be assigned to a variables.
${objListMode}
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectType
${return}
${objectType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectType
${return} = PASS
${objectType} = ip
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectType}" != "None"
Replace String
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "s...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectSubType
${return}
${objectSubType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectSubType
${return} = PASS
${objectSubType} = ip_learning
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" != "None"
Replace String
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", ...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectId
${return}
${objectId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectId
Dictionary does not contain key 'objectId'.
${return} = FAIL
${objectId} = Dictionary does not contain key 'objectId'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"objectId": null
"objectId":${objectId}
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", ...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"opAction": "add"
"option": "update"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", ...
Returns a list containing given items.
${objectJsonList}
${objectJsonList} = []
Evaluates the given expression in Python and returns the results.
type(${objList})
${objListType}
${objListType} = <class 'list'>
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'learningDepth': '2', 'agingTime': '12', 'voteClientNum': '10', 'learnedIpLimit': '1000'}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${addItemList}
[{"
"
${addItemList} = "fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${addItemList}
"}]
"
${addItemList} = "fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", ...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", ...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'ip_learning', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'ad...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Creates and returns a dictionary based on the given ``items``.
opAction=add
returnData=1
objectList=${objectJsonList}
${objectData}
${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'ip_learning', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单i...
${objectData}
${rescode}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${ipList}对象dict
Displays the given messages in the log file as keyword arguments.
创建IP
Returns a value from the given ``dictionary`` based on the given ``key``.
${ipList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${ipList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u...
${objectUrl}
${bodyJson}
${version}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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
}
To JSON using : pretty_print=False
${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '...
${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
getObjectListIds
${response}
ELSE
Create List
${objectIds}
获取结果中的对象ID
${response}
Logs the given message with the given level.
Call Get-ObjectIds
Call Get-ObjectIds
Returns a list containing given items.
${objectIds}
${objectIds} = []
Returns the given values which can then be assigned to a variables.
${EMPTY}
${objectIdsTemp}
${objectIdsTemp} =
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${value}
data
${return}
${data}
Returns a value from the given ``dictionary`` based on the given ``key``.
${value}
data
${return} = PASS
${data} = {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '#31739C', 'isDisplay': None, 'isExclusio...
Returns from the enclosing user keyword if ``condition`` is true.
"${return}"=="FAIL"
${objectIdsTemp}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
${objectIds} = [107888]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${rescode} = 200
${objectIds} = [107888]
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Runs the given keyword with the given arguments, if ``condition`` is true.
"${protocolField}" != "None"
Set Variable
${protocolField}
${protocolField}
Returns the given values which can then be assigned to a variables.
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_ADDR
Returns a list containing given items.
${objectsList}
${objectsList} = []
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107888, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
${objectIds} = [107888]
${objectList} = {'objectId': 107888, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Set Variable
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Set Variable
${objectList}
ELSE
OrangeFilter
${objectList}
${objectList}
Returns the given values which can then be assigned to a variables.
${objectList}
${objectList} = {'objectId': 107888, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}
${objectIds} = [107888]
${objectList} = {'objectId': 107888, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}
Returns and logs the length of the given item as an integer.
${objectIdsList}
${len}
Length is 6
${len} = 6
Runs the given keyword with the given arguments, if ``condition`` is true.
${len} != 0
AppendListToList
${objectIdsList}
${objectIds}
ELSE
Set Variable
${objectIds}
${objectIdsList}
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectIdsList}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
${objectIdsList} = [107882, 107883, 107884, 107885, 107886, 107887, 107888]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Append To List
${sourceList}
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Append To List
${destinationList}
${objectList}
ELSE
Append To List
${filterList}
${objectList}
Adds ``values`` to the end of ``list``.
${sourceList}
${objectList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${key}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_ADDR
处理对象
${key}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_ADDR
处理对象
${objectData}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_ADDR
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objList
${objList}
${objList} = [{'addItemList': [{'ip': '255.255.255.254', 'port': '65535'}, {'ip': '255.255.255.254', 'port': '1'}]}]
Displays the given messages in the log file as keyword arguments.
${objJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${objModeJson}
${objJson}
${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Returns the given values which can then be assigned to a variables.
${objListMode}
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectType
${return}
${objectType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectType
Dictionary does not contain key 'objectType'.
${return} = FAIL
${objectType} = Dictionary does not contain key 'objectType'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectType}" != "None"
Replace String
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectSubType
${return}
${objectSubType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectSubType
Dictionary does not contain key 'objectSubType'.
${return} = FAIL
${objectSubType} = Dictionary does not contain key 'objectSubType'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" != "None"
Replace String
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectId
${return}
${objectId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectId
Dictionary does not contain key 'objectId'.
${return} = FAIL
${objectId} = Dictionary does not contain key 'objectId'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"objectId": null
"objectId":${objectId}
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"opAction": "add"
"option": "update"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Returns a list containing given items.
${objectJsonList}
${objectJsonList} = []
Evaluates the given expression in Python and returns the results.
type(${objList})
${objListType}
${objListType} = <class 'list'>
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'ip': '255.255.255.254', 'port': '65535'}, {'ip': '255.255.255.254', 'port': '1'}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"ip": "255.255.255.254", "port": "65535"}, {"ip": "255.255.255.254", "port": "1"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"ip": "255.255.255.254", "port": "65535"}, {"ip": "255.255.255.254", "port": "1"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"ip": "255.255.255.254", "port": "65535"}, {"ip": "255.255.255.254", "port": "1"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addIt...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Creates and returns a dictionary based on the given ``items``.
opAction=add
returnData=1
objectList=${objectJsonList}
${objectData}
${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定...
${objectData}
${rescode}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${ipList}对象dict
Displays the given messages in the log file as keyword arguments.
创建IP
Returns a value from the given ``dictionary`` based on the given ``key``.
${ipList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${ipList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u535...
${objectUrl}
${bodyJson}
${version}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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
}
To JSON using : pretty_print=False
${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.254', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '65535', 'clientPor...
${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.254', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '65535', 'clientPor...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
getObjectListIds
${response}
ELSE
Create List
${objectIds}
获取结果中的对象ID
${response}
Logs the given message with the given level.
Call Get-ObjectIds
Call Get-ObjectIds
Returns a list containing given items.
${objectIds}
${objectIds} = []
Returns the given values which can then be assigned to a variables.
${EMPTY}
${objectIdsTemp}
${objectIdsTemp} =
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${value}
data
${return}
${data}
Returns a value from the given ``dictionary`` based on the given ``key``.
${value}
data
${return} = PASS
${data} = {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.254', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '65535', 'clientPort2': '65535', 'clientPortFormat': 'range...
Returns from the enclosing user keyword if ``condition`` is true.
"${return}"=="FAIL"
${objectIdsTemp}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
${objectIds} = [107889]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${rescode} = 200
${objectIds} = [107889]
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Runs the given keyword with the given arguments, if ``condition`` is true.
"${protocolField}" != "None"
Set Variable
${protocolField}
${protocolField}
Returns the given values which can then be assigned to a variables.
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_ADDR
Returns a list containing given items.
${objectsList}
${objectsList} = []
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107889, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
${objectIds} = [107889]
${objectList} = {'objectId': 107889, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Set Variable
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Set Variable
${objectList}
ELSE
OrangeFilter
${objectList}
${objectList}
Returns the given values which can then be assigned to a variables.
${objectList}
${objectList} = {'objectId': 107889, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}
${objectIds} = [107889]
${objectList} = {'objectId': 107889, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}
Returns and logs the length of the given item as an integer.
${objectIdsList}
${len}
Length is 7
${len} = 7
Runs the given keyword with the given arguments, if ``condition`` is true.
${len} != 0
AppendListToList
${objectIdsList}
${objectIds}
ELSE
Set Variable
${objectIds}
${objectIdsList}
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectIdsList}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
${objectIdsList} = [107882, 107883, 107884, 107885, 107886, 107887, 107888, 107889]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Append To List
${sourceList}
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Append To List
${destinationList}
${objectList}
ELSE
Append To List
${filterList}
${objectList}
Adds ``values`` to the end of ``list``.
${destinationList}
${objectList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${key}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_LOCATION
处理对象
${key}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_LOCATION
处理对象
${objectData}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_LOCATION
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objList
${objList}
${objList} = [{'addItemList': [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}]}]
Displays the given messages in the log file as keyword arguments.
${objJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${objModeJson}
${objJson}
${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Returns the given values which can then be assigned to a variables.
${objListMode}
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectType
${return}
${objectType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectType
Dictionary does not contain key 'objectType'.
${return} = FAIL
${objectType} = Dictionary does not contain key 'objectType'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectType}" != "None"
Replace String
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectSubType
${return}
${objectSubType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectSubType
${return} = PASS
${objectSubType} = geo_location
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" != "None"
Replace String
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test"...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectId
${return}
${objectId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectId
Dictionary does not contain key 'objectId'.
${return} = FAIL
${objectId} = Dictionary does not contain key 'objectId'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"objectId": null
"objectId":${objectId}
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test"...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"opAction": "add"
"option": "update"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test"...
Returns a list containing given items.
${objectJsonList}
${objectJsonList} = []
Evaluates the given expression in Python and returns the results.
type(${objList})
${objListType}
${objListType} = <class 'list'>
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test"...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test"...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'geo_location', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'a...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Creates and returns a dictionary based on the given ``items``.
opAction=add
returnData=1
objectList=${objectJsonList}
${objectData}
${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'geo_location', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单...
${objectData}
${rescode}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${ipList}对象dict
Displays the given messages in the log file as keyword arguments.
创建IP
Returns a value from the given ``dictionary`` based on the given ``key``.
${ipList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${ipList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\...
${objectUrl}
${bodyJson}
${version}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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
}
To JSON using : pretty_print=False
${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...
${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...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
getObjectListIds
${response}
ELSE
Create List
${objectIds}
获取结果中的对象ID
${response}
Logs the given message with the given level.
Call Get-ObjectIds
Call Get-ObjectIds
Returns a list containing given items.
${objectIds}
${objectIds} = []
Returns the given values which can then be assigned to a variables.
${EMPTY}
${objectIdsTemp}
${objectIdsTemp} =
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${value}
data
${return}
${data}
Returns a value from the given ``dictionary`` based on the given ``key``.
${value}
data
${return} = PASS
${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...
Returns from the enclosing user keyword if ``condition`` is true.
"${return}"=="FAIL"
${objectIdsTemp}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
${objectIds} = [107890]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${rescode} = 200
${objectIds} = [107890]
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Runs the given keyword with the given arguments, if ``condition`` is true.
"${protocolField}" != "None"
Set Variable
${protocolField}
${protocolField}
Returns the given values which can then be assigned to a variables.
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_LOCATION
Returns a list containing given items.
${objectsList}
${objectsList} = []
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107890, 'protocolField': 'TSG_SECURITY_DESTINATION_LOCATION'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
${objectIds} = [107890]
${objectList} = {'objectId': 107890, 'protocolField': 'TSG_SECURITY_DESTINATION_LOCATION'}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Set Variable
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Set Variable
${objectList}
ELSE
OrangeFilter
${objectList}
${objectList}
Returns the given values which can then be assigned to a variables.
${objectList}
${objectList} = {'objectId': 107890, 'protocolField': 'TSG_SECURITY_DESTINATION_LOCATION'}
${objectIds} = [107890]
${objectList} = {'objectId': 107890, 'protocolField': 'TSG_SECURITY_DESTINATION_LOCATION'}
Returns and logs the length of the given item as an integer.
${objectIdsList}
${len}
Length is 8
${len} = 8
Runs the given keyword with the given arguments, if ``condition`` is true.
${len} != 0
AppendListToList
${objectIdsList}
${objectIds}
ELSE
Set Variable
${objectIds}
${objectIdsList}
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectIdsList}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
${objectIdsList} = [107882, 107883, 107884, 107885, 107886, 107887, 107888, 107889, 107890]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Append To List
${sourceList}
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Append To List
${destinationList}
${objectList}
ELSE
Append To List
${filterList}
${objectList}
Adds ``values`` to the end of ``list``.
${destinationList}
${objectList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${key}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_ADDR
处理对象
${key}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_ADDR
处理对象
${objectData}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_ADDR
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objList
${objList}
${objList} = [{'addItemList': [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'learningDepth': '2', 'agingTime': '12', 'voteClientNum': '10', 'learnedIpLimit': '1000'}]}]
Displays the given messages in the log file as keyword arguments.
${objJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${objModeJson}
${objJson}
${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Returns the given values which can then be assigned to a variables.
${objListMode}
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectType
${return}
${objectType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectType
Dictionary does not contain key 'objectType'.
${return} = FAIL
${objectType} = Dictionary does not contain key 'objectType'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectType}" != "None"
Replace String
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectSubType
${return}
${objectSubType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectSubType
${return} = PASS
${objectSubType} = ip_learning
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" != "None"
Replace String
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectId
${return}
${objectId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectId
Dictionary does not contain key 'objectId'.
${return} = FAIL
${objectId} = Dictionary does not contain key 'objectId'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"objectId": null
"objectId":${objectId}
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"opAction": "add"
"option": "update"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...
Returns a list containing given items.
${objectJsonList}
${objectJsonList} = []
Evaluates the given expression in Python and returns the results.
type(${objList})
${objListType}
${objListType} = <class 'list'>
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'learningDepth': '2', 'agingTime': '12', 'voteClientNum': '10', 'learnedIpLimit': '1000'}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${addItemList}
[{"
"
${addItemList} = "fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${addItemList}
"}]
"
${addItemList} = "fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'ip_learning', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'ad...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Creates and returns a dictionary based on the given ``items``.
opAction=add
returnData=1
objectList=${objectJsonList}
${objectData}
${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'ip_learning', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单i...
${objectData}
${rescode}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${ipList}对象dict
Displays the given messages in the log file as keyword arguments.
创建IP
Returns a value from the given ``dictionary`` based on the given ``key``.
${ipList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${ipList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u...
${objectUrl}
${bodyJson}
${version}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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
}
To JSON using : pretty_print=False
${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '...
${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
getObjectListIds
${response}
ELSE
Create List
${objectIds}
获取结果中的对象ID
${response}
Logs the given message with the given level.
Call Get-ObjectIds
Call Get-ObjectIds
Returns a list containing given items.
${objectIds}
${objectIds} = []
Returns the given values which can then be assigned to a variables.
${EMPTY}
${objectIdsTemp}
${objectIdsTemp} =
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${value}
data
${return}
${data}
Returns a value from the given ``dictionary`` based on the given ``key``.
${value}
data
${return} = PASS
${data} = {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '#31739C', 'isDisplay': None, 'isExclusio...
Returns from the enclosing user keyword if ``condition`` is true.
"${return}"=="FAIL"
${objectIdsTemp}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
${objectIds} = [107891]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${rescode} = 200
${objectIds} = [107891]
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Runs the given keyword with the given arguments, if ``condition`` is true.
"${protocolField}" != "None"
Set Variable
${protocolField}
${protocolField}
Returns the given values which can then be assigned to a variables.
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_ADDR
Returns a list containing given items.
${objectsList}
${objectsList} = []
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107891, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
${objectIds} = [107891]
${objectList} = {'objectId': 107891, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Set Variable
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Set Variable
${objectList}
ELSE
OrangeFilter
${objectList}
${objectList}
Returns the given values which can then be assigned to a variables.
${objectList}
${objectList} = {'objectId': 107891, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}
${objectIds} = [107891]
${objectList} = {'objectId': 107891, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}
Returns and logs the length of the given item as an integer.
${objectIdsList}
${len}
Length is 9
${len} = 9
Runs the given keyword with the given arguments, if ``condition`` is true.
${len} != 0
AppendListToList
${objectIdsList}
${objectIds}
ELSE
Set Variable
${objectIds}
${objectIdsList}
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectIdsList}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
${objectIdsList} = [107882, 107883, 107884, 107885, 107886, 107887, 107888, 107889, 107890, 107891]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Append To List
${sourceList}
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Append To List
${destinationList}
${objectList}
ELSE
Append To List
${filterList}
${objectList}
Adds ``values`` to the end of ``list``.
${destinationList}
${objectList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${key}
protocolField
${protocolField}
${protocolField} = TSG_FIELD_HTTP_URL
处理对象
${key}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_FIELD_HTTP_URL
处理对象
${objectData}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_FIELD_HTTP_URL
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objList
${objList}
${objList} = [{'addItemList': [{'keywordArray': ['$cloud.tencent.com/developer/ask/202829']}, {'keywordArray': ['*tencent.com/developer/ask/202829']}, {'keywordArray': ['tencent.com']}, {'keywordArray': ['cloud.te...
Displays the given messages in the log file as keyword arguments.
${objJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${objModeJson}
${objJson}
${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Returns the given values which can then be assigned to a variables.
${objListMode}
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectType
${return}
${objectType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectType
${return} = PASS
${objectType} = url
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectType}" != "None"
Replace String
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
${objectJson} = [{"objectId": null, "objectType":"url", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectSubType
${return}
${objectSubType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectSubType
${return} = PASS
${objectSubType} =
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" != "None"
Replace String
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
${objectJson} = [{"objectId": null, "objectType":"url", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectId
${return}
${objectId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectId
Dictionary does not contain key 'objectId'.
${return} = FAIL
${objectId} = Dictionary does not contain key 'objectId'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"objectId": null
"objectId":${objectId}
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"url", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"opAction": "add"
"option": "update"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"url", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...
Returns a list containing given items.
${objectJsonList}
${objectJsonList} = []
Evaluates the given expression in Python and returns the results.
type(${objList})
${objListType}
${objListType} = <class 'list'>
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'keywordArray': ['$cloud.tencent.com/developer/ask/202829']}, {'keywordArray': ['*tencent.com/developer/ask/202829']}, {'keywordArray': ['tencent.com']}, {'keywordArray': ['cloud.tencent.com/develop...
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"keywordArray": ["$cloud.tencent.com/developer/ask/202829"]}, {"keywordArray": ["*tencent.com/developer/ask/202829"]}, {"keywordArray": ["tencent.com"]}, {"keywordArray": ["cloud.tencent.com/develop...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["$cloud.tencent.com/developer/ask/202829"]}, {"keywordArray": ["*tencent.com/developer/ask/202829"]}, {"keywordArray": ["tencent.com"]}, {"keywordArray": ["cloud.tencent.com/develop...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["$cloud.tencent.com/developer/ask/202829"]}, {"keywordArray": ["*tencent.com/developer/ask/202829"]}, {"keywordArray": ["tencent.com"]}, {"keywordArray": ["cloud.tencent.com/develop...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType":"url", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"url", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'url', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addItemList'...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'keywordArray': ['$www.bejson.com/validators/yaml_editor/']}, {'keywordArray': ['*bejson.com/validators/yaml_editor']}, {'keywordArray': ['bejson.com/validators/*']}, {'keywordArray': ['bejson.com']...
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"keywordArray": ["$www.bejson.com/validators/yaml_editor/"]}, {"keywordArray": ["*bejson.com/validators/yaml_editor"]}, {"keywordArray": ["bejson.com/validators/*"]}, {"keywordArray": ["bejson.com"]...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["$www.bejson.com/validators/yaml_editor/"]}, {"keywordArray": ["*bejson.com/validators/yaml_editor"]}, {"keywordArray": ["bejson.com/validators/*"]}, {"keywordArray": ["bejson.com"]...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["$www.bejson.com/validators/yaml_editor/"]}, {"keywordArray": ["*bejson.com/validators/yaml_editor"]}, {"keywordArray": ["bejson.com/validators/*"]}, {"keywordArray": ["bejson.com"]...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType":"url", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"url", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'url', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addItemList'...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Creates and returns a dictionary based on the given ``items``.
opAction=add
returnData=1
objectList=${objectJsonList}
${objectData}
${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'url', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'o...
${objectData}
${rescode}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${ipList}对象dict
Displays the given messages in the log file as keyword arguments.
创建IP
Returns a value from the given ``dictionary`` based on the given ``key``.
${ipList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${ipList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "url", "objectSubType": "", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u63...
${objectUrl}
${bodyJson}
${version}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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
}
To JSON using : pretty_print=False
${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...
${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...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
getObjectListIds
${response}
ELSE
Create List
${objectIds}
获取结果中的对象ID
${response}
Logs the given message with the given level.
Call Get-ObjectIds
Call Get-ObjectIds
Returns a list containing given items.
${objectIds}
${objectIds} = []
Returns the given values which can then be assigned to a variables.
${EMPTY}
${objectIdsTemp}
${objectIdsTemp} =
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${value}
data
${return}
${data}
Returns a value from the given ``dictionary`` based on the given ``key``.
${value}
data
${return} = PASS
${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...
Returns from the enclosing user keyword if ``condition`` is true.
"${return}"=="FAIL"
${objectIdsTemp}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
${objectIds} = [107892, 107893]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${rescode} = 200
${objectIds} = [107892, 107893]
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Runs the given keyword with the given arguments, if ``condition`` is true.
"${protocolField}" != "None"
Set Variable
${protocolField}
${protocolField}
Returns the given values which can then be assigned to a variables.
${protocolField}
${protocolField} = TSG_FIELD_HTTP_URL
Returns a list containing given items.
${objectsList}
${objectsList} = []
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107892, 'protocolField': 'TSG_FIELD_HTTP_URL'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107892, 'protocolField': 'TSG_FIELD_HTTP_URL'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
${objectIds} = [107892, 107893]
${objectList} = {'objectId': 107892, 'protocolField': 'TSG_FIELD_HTTP_URL'}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Set Variable
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Set Variable
${objectList}
ELSE
OrangeFilter
${objectList}
${objectList}
filer对象处理,把一个filter的list处理为一个filter
${objectList}
Returns a list containing given items.
${objectList}
${list}
${list} = [{'objectId': 107892, 'protocolField': 'TSG_FIELD_HTTP_URL'}]
Creates and returns a dictionary based on the given ``items``.
filter=${list}
${filter}
${filter} = {'filter': [{'objectId': 107892, 'protocolField': 'TSG_FIELD_HTTP_URL'}]}
${objectList} = {'filter': [{'objectId': 107892, 'protocolField': 'TSG_FIELD_HTTP_URL'}]}
${objectIds} = [107892, 107893]
${objectList} = {'filter': [{'objectId': 107892, 'protocolField': 'TSG_FIELD_HTTP_URL'}]}
Returns and logs the length of the given item as an integer.
${objectIdsList}
${len}
Length is 10
${len} = 10
Runs the given keyword with the given arguments, if ``condition`` is true.
${len} != 0
AppendListToList
${objectIdsList}
${objectIds}
ELSE
Set Variable
${objectIds}
${objectIdsList}
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectIdsList}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
${objectIdsList} = [107882, 107883, 107884, 107885, 107886, 107887, 107888, 107889, 107890, 107891, 107892, 107893]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Append To List
${sourceList}
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Append To List
${destinationList}
${objectList}
ELSE
Append To List
${filterList}
${objectList}
Adds ``values`` to the end of ``list``.
${filterList}
${objectList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${key}
protocolField
${protocolField}
${protocolField} = TSG_FIELD_HTTP_HOST
处理对象
${key}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_FIELD_HTTP_HOST
处理对象
${objectData}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_FIELD_HTTP_HOST
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objList
${objList}
${objList} = [{'addItemList': [{'keywordArray': ['$blog.csdn.net']}, {'keywordArray': ['*.csdn.net']}]}, {'addItemList': [{'keywordArray': ['$www.json.cn/']}, {'keywordArray': ['*json.cn/']}]}]
Displays the given messages in the log file as keyword arguments.
${objJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${objModeJson}
${objJson}
${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Returns the given values which can then be assigned to a variables.
${objListMode}
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectType
${return}
${objectType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectType
${return} = PASS
${objectType} = fqdn
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectType}" != "None"
Replace String
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
${objectJson} = [{"objectId": null, "objectType":"fqdn", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", ...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectSubType
${return}
${objectSubType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectSubType
${return} = PASS
${objectSubType} =
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" != "None"
Replace String
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
${objectJson} = [{"objectId": null, "objectType":"fqdn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjec...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectId
${return}
${objectId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectId
Dictionary does not contain key 'objectId'.
${return} = FAIL
${objectId} = Dictionary does not contain key 'objectId'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"objectId": null
"objectId":${objectId}
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"fqdn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjec...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"opAction": "add"
"option": "update"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"fqdn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjec...
Returns a list containing given items.
${objectJsonList}
${objectJsonList} = []
Evaluates the given expression in Python and returns the results.
type(${objList})
${objListType}
${objListType} = <class 'list'>
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'keywordArray': ['$blog.csdn.net']}, {'keywordArray': ['*.csdn.net']}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"keywordArray": ["$blog.csdn.net"]}, {"keywordArray": ["*.csdn.net"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["$blog.csdn.net"]}, {"keywordArray": ["*.csdn.net"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["$blog.csdn.net"]}, {"keywordArray": ["*.csdn.net"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType":"fqdn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjec...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"fqdn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjec...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'fqdn', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addItemList...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'keywordArray': ['$www.json.cn/']}, {'keywordArray': ['*json.cn/']}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"keywordArray": ["$www.json.cn/"]}, {"keywordArray": ["*json.cn/"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["$www.json.cn/"]}, {"keywordArray": ["*json.cn/"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["$www.json.cn/"]}, {"keywordArray": ["*json.cn/"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType":"fqdn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjec...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"fqdn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObjec...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'fqdn', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addItemList...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Creates and returns a dictionary based on the given ``items``.
opAction=add
returnData=1
objectList=${objectJsonList}
${objectData}
${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'fqdn', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', '...
${objectData}
${rescode}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${ipList}对象dict
Displays the given messages in the log file as keyword arguments.
创建IP
Returns a value from the given ``dictionary`` based on the given ``key``.
${ipList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${ipList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "fqdn", "objectSubType": "", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6...
${objectUrl}
${bodyJson}
${version}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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
}
To JSON using : pretty_print=False
${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...
${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...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
getObjectListIds
${response}
ELSE
Create List
${objectIds}
获取结果中的对象ID
${response}
Logs the given message with the given level.
Call Get-ObjectIds
Call Get-ObjectIds
Returns a list containing given items.
${objectIds}
${objectIds} = []
Returns the given values which can then be assigned to a variables.
${EMPTY}
${objectIdsTemp}
${objectIdsTemp} =
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${value}
data
${return}
${data}
Returns a value from the given ``dictionary`` based on the given ``key``.
${value}
data
${return} = PASS
${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...
Returns from the enclosing user keyword if ``condition`` is true.
"${return}"=="FAIL"
${objectIdsTemp}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
${objectIds} = [107894, 107895]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${rescode} = 200
${objectIds} = [107894, 107895]
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Runs the given keyword with the given arguments, if ``condition`` is true.
"${protocolField}" != "None"
Set Variable
${protocolField}
${protocolField}
Returns the given values which can then be assigned to a variables.
${protocolField}
${protocolField} = TSG_FIELD_HTTP_HOST
Returns a list containing given items.
${objectsList}
${objectsList} = []
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107894, 'protocolField': 'TSG_FIELD_HTTP_HOST'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107894, 'protocolField': 'TSG_FIELD_HTTP_HOST'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
${objectIds} = [107894, 107895]
${objectList} = {'objectId': 107894, 'protocolField': 'TSG_FIELD_HTTP_HOST'}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Set Variable
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Set Variable
${objectList}
ELSE
OrangeFilter
${objectList}
${objectList}
filer对象处理,把一个filter的list处理为一个filter
${objectList}
Returns a list containing given items.
${objectList}
${list}
${list} = [{'objectId': 107894, 'protocolField': 'TSG_FIELD_HTTP_HOST'}]
Creates and returns a dictionary based on the given ``items``.
filter=${list}
${filter}
${filter} = {'filter': [{'objectId': 107894, 'protocolField': 'TSG_FIELD_HTTP_HOST'}]}
${objectList} = {'filter': [{'objectId': 107894, 'protocolField': 'TSG_FIELD_HTTP_HOST'}]}
${objectIds} = [107894, 107895]
${objectList} = {'filter': [{'objectId': 107894, 'protocolField': 'TSG_FIELD_HTTP_HOST'}]}
Returns and logs the length of the given item as an integer.
${objectIdsList}
${len}
Length is 12
${len} = 12
Runs the given keyword with the given arguments, if ``condition`` is true.
${len} != 0
AppendListToList
${objectIdsList}
${objectIds}
ELSE
Set Variable
${objectIds}
${objectIdsList}
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectIdsList}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
${objectIdsList} = [107882, 107883, 107884, 107885, 107886, 107887, 107888, 107889, 107890, 107891, 107892, 107893, 107894, 107895]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Append To List
${sourceList}
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Append To List
${destinationList}
${objectList}
ELSE
Append To List
${filterList}
${objectList}
Adds ``values`` to the end of ``list``.
${filterList}
${objectList}
${objectIds} = [107882, 107883, 107884, 107885, 107886, 107887, 107888, 107889, 107890, 107891, 107892, 107893, 107894, 107895]
${sourceList} = [{'objectId': 107882, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}, {'objectId': 107884, 'protocolField': 'TSG_SECURITY_SOURCE_LOCATION'}, {'objectId': 107885, 'protocolField': 'TSG_FILED_GTP_IMSI'}, ...
${destinationList} = [{'objectId': 107889, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}, {'objectId': 107890, 'protocolField': 'TSG_SECURITY_DESTINATION_LOCATION'}, {'objectId': 107891, 'protocolField': 'TSG_SECURITY...
${filterList} = [{'filter': [{'objectId': 107892, 'protocolField': 'TSG_FIELD_HTTP_URL'}]}, {'filter': [{'objectId': 107894, 'protocolField': 'TSG_FIELD_HTTP_HOST'}]}]
Serialize ``obj`` to a JSON formatted ``str``.
${sourceList}
${sourceList}
${sourceList} = [{"objectId": 107882, "protocolField": "TSG_SECURITY_SOURCE_ADDR"}, {"objectId": 107884, "protocolField": "TSG_SECURITY_SOURCE_LOCATION"}, {"objectId": 107885, "protocolField": "TSG_FILED_GTP_IMSI"}, ...
Serialize ``obj`` to a JSON formatted ``str``.
${destinationList}
${destinationList}
${destinationList} = [{"objectId": 107889, "protocolField": "TSG_SECURITY_DESTINATION_ADDR"}, {"objectId": 107890, "protocolField": "TSG_SECURITY_DESTINATION_LOCATION"}, {"objectId": 107891, "protocolField": "TSG_SECURITY...
Serialize ``obj`` to a JSON formatted ``str``.
${filterList}
${filterList}
${filterList} = [{"filter": [{"objectId": 107892, "protocolField": "TSG_FIELD_HTTP_URL"}]}, {"filter": [{"objectId": 107894, "protocolField": "TSG_FIELD_HTTP_HOST"}]}]
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"source": null
"source":${sourceList}
${policyJson}
${policyJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"destination": null
"destination":${destinationList}
${policyJson}
${policyJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"filterList": null
"filterList":${filterList}
${policyJson}
${policyJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...
Displays the given messages in the log file as keyword arguments.
处理策略数据:
"opAction": "add"
"returnData": 1
"policyName": "autotest"
"policyType": "tsg_security"
"action": "allow"
"userTags": ""
"doBlacklist": 0
"doLog": 1
"policyDesc": "autotest"
"effectiveRange":
"userRegion":
"appIdObjects":
"appSelectorObjects":
"isValid": 1
"scheduleId":
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
opAction
${return}
${opAction}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
opAction
${return} = PASS
${opAction} = add
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${opAction}" != "${EMPTY}"
Replace String
${policyJson}
"opAction": "add"
"opAction": "${opAction}"
ELSE
Set Variable
${policyJson}
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"opAction": "add"
"opAction": "${opAction}"
${policyJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
returnData
${return}
${returnData}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
returnData
${return} = PASS
${returnData} = 1
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${returnData}" != "${EMPTY}"
Replace String
${policyJson}
"returnData": 1
"returnData": "${returnData}"
ELSE
Set Variable
${policyJson}
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"returnData": 1
"returnData": "${returnData}"
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest",...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
policyName
${return}
${policyName}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
policyName
${return} = PASS
${policyName} = autotestdeny
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${policyName}" != "None"
Replace String
${policyJson}
"policyName": "autotest"
"policyName": "${policyName}"
ELSE
Replace String
${policyJson}
"policyName": "autotest"
"policyName": "${testName}"
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"policyName": "autotest"
"policyName": "${policyName}"
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestdeny", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autote...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
policyType
${return}
${policyType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
policyType
${return} = PASS
${policyType} = tsg_security
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${policyType}" != "None"
Replace String
${policyJson}
"policyType": "tsg_security"
"policyType": "${policyType}"
ELSE
Set Variable
${policyJson}
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"policyType": "tsg_security"
"policyType": "${policyType}"
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestdeny", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autote...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
action
${return}
${action}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
action
${return} = PASS
${action} = deny
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${action}" != "None"
Replace String
${policyJson}
"action": "allow"
"action": "${action}"
ELSE
Set Variable
${policyJson}}
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"action": "allow"
"action": "${action}"
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestdeny", "policyType": "tsg_security", "action": "deny", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotes...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
method
${return}
${method}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
method
${return} = PASS
${method} = block
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
userTags
${return}
${userTags}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
userTags
${return} = PASS
${userTags} =
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${userTags}" != "None"
Replace String
${policyJson}
"userTags": null
"userTags": ${userTags}
ELSE
Set Variable
${policyJson}
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"userTags": null
"userTags": ${userTags}
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestdeny", "policyType": "tsg_security", "action": "deny", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotes...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
doBlacklist
${return}
${doBlacklist}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
doBlacklist
${return} = PASS
${doBlacklist} = 0
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${doBlacklist}" != "None"
Replace String
${policyJson}
"doBlacklist": 0
"doBlacklist": ${doBlacklist}
ELSE
Set Variable
${policyJson}
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"doBlacklist": 0
"doBlacklist": ${doBlacklist}
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestdeny", "policyType": "tsg_security", "action": "deny", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotes...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
doLog
${return}
${doLog}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
doLog
${return} = PASS
${doLog} = 1
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${doLog}" != "None"
Replace String
${policyJson}
"doLog": 1
"doLog": ${doLog}
ELSE
Set Variable
${policyJson}
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"doLog": 1
"doLog": ${doLog}
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestdeny", "policyType": "tsg_security", "action": "deny", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotes...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
policyDesc
${return}
${policyDesc}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
policyDesc
${return} = PASS
${policyDesc} = autotest
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${policyDesc}" != "None"
Replace String
${policyJson}
"policyDesc": "autotest"
"policyDesc": "${policyDesc}"
ELSE
Set Variable
${policyJson}
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"policyDesc": "autotest"
"policyDesc": "${policyDesc}"
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestdeny", "policyType": "tsg_security", "action": "deny", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotes...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
effectiveRange
${return}
${effectiveRange}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
effectiveRange
${return} = PASS
${effectiveRange} = None
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${effectiveRange}" != "None"
Replace String
${policyJson}
"effectiveRange": null
"effectiveRange": ${effectiveRange}
ELSE
Replace String
${policyJson}
"effectiveRange": null
"effectiveRange": {}
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"effectiveRange": null
"effectiveRange": {}
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestdeny", "policyType": "tsg_security", "action": "deny", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotes...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
userRegion
${return}
${userRegion}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
userRegion
${return} = PASS
${userRegion} = None
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
code
${return}
${code}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
code
${return} = PASS
${code} = 403
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
message
${return}
${message}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
message
Dictionary does not contain key 'message'.
${return} = FAIL
${message} = Dictionary does not contain key 'message'.
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
html_profile
${return}
${html_profile}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
html_profile
${return} = PASS
${html_profile} = 2551
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${html_profile}" != "None"
Set Variable
${html_profile}
ELSE
Set Variable
${message}
${message}
Returns the given values which can then be assigned to a variables.
${html_profile}
${message} = 2551
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${html_profile}" != "None"
Set Variable
html_profile
ELSE
Set Variable
message
${messageKey}
Returns the given values which can then be assigned to a variables.
html_profile
${messageKey} = html_profile
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
keyring
${return}
${keyring}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
keyring
Dictionary does not contain key 'keyring'.
${return} = FAIL
${keyring} = Dictionary does not contain key 'keyring'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${keyring}" != "None"
Set Variable
${keyring}
ELSE
Set Variable
""
${keyring}
Returns the given values which can then be assigned to a variables.
""
${keyring} = ""
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
decryption
${return}
${decryption}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
decryption
Dictionary does not contain key 'decryption'.
${return} = FAIL
${decryption} = Dictionary does not contain key 'decryption'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${decryption}" != "None"
Set Variable
${decryption}
ELSE
Set Variable
""
${decryption}
Returns the given values which can then be assigned to a variables.
""
${decryption} = ""
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
decrypt_mirror
${return}
${decrypt_mirror}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
decrypt_mirror
Dictionary does not contain key 'decrypt_mirror'.
${return} = FAIL
${decrypt_mirror} = Dictionary does not contain key 'decrypt_mirror'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${decrypt_mirror}" != "None"
Set Variable
${decrypt_mirror}
ELSE
Set Variable
""
${decrypt_mirror}
Returns the given values which can then be assigned to a variables.
""
${decrypt_mirror} = ""
Serialize ``obj`` to a JSON formatted ``str``.
${decrypt_mirror}
${decrypt_mirror}
${decrypt_mirror} = "\"\""
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
appIdObjects
${return}
${appIdObjects}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
appIdObjects
${return} = PASS
${appIdObjects} = ['http']
Returns a list containing given items.
${appIdObjectIds}
${appIdObjectIds} = []
Displays the given messages in the log file as keyword arguments.
userRegionStr由:动作,协议,动作参数等决定,待完成;userregion在allow,monitor动作时多个协议为空;deny,多个协议时为子动作;Intercept,多个协议为空;http为,ssl为,判断appid对象的个数。
Returns the given values which can then be assigned to a variables.
${userRegionStr}
${userRegionStr} =
Returns a value from the given ``dictionary`` based on the given ``key``.
${objprotol}
${key}
${appObjId}
${appObjId} = 75744
Adds ``values`` to the end of ``list``.
${appIdObjectIds}
${appObjId}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${method}" == "block" or "${method}" == "alert"
Set Variable
{"protocol":"${key}","method": "${method}","code":${code},"${messageKey}":${message}}
ELSE IF
"${action}" == "deny"
Set Variable
{"protocol":"${key}","method": "${method}"}
ELSE IF
"${action}" == "intercept" and "${key}" == "ssl"
Set Variable
{"protocol":"SSL","keyring": ${keyring},"decryption":${decryption},"decrypt_mirror":${decrypt_mirror}}
ELSE
Set Variable
{"protocol":"HTTP"}
${userRegionStr}
Returns the given values which can then be assigned to a variables.
{"protocol":"${key}","method": "${method}","code":${code},"${messageKey}":${message}}
${userRegionStr} = {"protocol":"http","method": "block","code":403,"html_profile":2551}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${appIdObjects}" != "None"
Replace String
${policyJson}
"appIdObjects": [null]
"appIdObjects": ${appIdObjectIds}
ELSE
Set Variable
${policyJson}
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"appIdObjects": [null]
"appIdObjects": ${appIdObjectIds}
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestdeny", "policyType": "tsg_security", "action": "deny", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotes...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"userRegion": null
"userRegion": ${userRegionStr}
${policyJson}
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestdeny", "policyType": "tsg_security", "action": "deny", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotes...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"userRegion": null
"userRegion": {}
${policyJson}
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestdeny", "policyType": "tsg_security", "action": "deny", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotes...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
appSelectorObjects
${return}
${appSelectorObjects}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
appSelectorObjects
${return} = PASS
${appSelectorObjects} = None
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL"
Set Variable
${appSelectorObjects}
ELSE
Set Variable
${EMPTY}
${appSelectorObjects}
Returns the given values which can then be assigned to a variables.
${appSelectorObjects}
${appSelectorObjects} = None
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${appSelectorObjects}" != "None"
Replace String
${policyJson}
"appSelectorObjects": "add"
"appSelectorObjects": ${appSelectorObjects}
ELSE
Set Variable
${policyJson}
${policyJson}
Returns the given values which can then be assigned to a variables.
${policyJson}
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestdeny", "policyType": "tsg_security", "action": "deny", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotes...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
isValid
${return}
${isValid}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
isValid
${return} = PASS
${isValid} = 1
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL"
Set Variable
${isValid}
ELSE
Set Variable
${EMPTY}
${appSelectorObjects}
Returns the given values which can then be assigned to a variables.
${isValid}
${appSelectorObjects} = 1
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${isValid}" != "None"
Replace String
${policyJson}
"isValid": 1
"isValid": ${isValid}
ELSE
Set Variable
${policyJson}
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"isValid": 1
"isValid": ${isValid}
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestdeny", "policyType": "tsg_security", "action": "deny", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotes...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
scheduleId
${return}
${scheduleId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
scheduleId
${return} = PASS
${scheduleId} = None
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL"
Set Variable
${scheduleId}
ELSE
Set Variable
${EMPTY}
${scheduleId}
Returns the given values which can then be assigned to a variables.
${scheduleId}
${scheduleId} = None
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${scheduleId}" != "None"
Replace String
${policyJson}
"scheduleId": [null]
"scheduleId": ${scheduleId}
ELSE
Set Variable
${policyJson}
${policyJson}
Returns the given values which can then be assigned to a variables.
${policyJson}
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestdeny", "policyType": "tsg_security", "action": "deny", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotes...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
[null]
[]
${policyJson}
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestdeny", "policyType": "tsg_security", "action": "deny", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotes...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${policyJson}
${policyJson}
${policyJson} = {'opAction': 'add', 'returnData': '1', 'policyList': {'policyName': 'autotestdeny', 'policyType': 'tsg_security', 'action': 'deny', 'userTags': '', 'doBlacklist': 0, 'doLog': 1, 'policyDesc': 'autotes...
场景策略:secuiryt、proxy策略
数据分离,测试数据来自对应的yaml文件
参数 ${policyList}
${policyJson}
${policyIds}
Displays the given messages in the log file as keyword arguments.
参数
${filepath}读取文件路径
${filename}读取文件名
${keywords}获取数据关键字
Displays the given messages in the log file as keyword arguments.
创建策略
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${policyList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestdeny", "policyType": "tsg_security", "action": "deny", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotes...
${policyUrl}
${bodyJson}
${version2}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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
}
To JSON using : pretty_print=False
${response} = {'code': 200, 'msg': 'Success', 'data': {'policyList': [{'action': 'deny', 'appIdObjects': [75744], 'appSelectorObjects': [], 'destination': [{'objectId': 107889, 'protocolField': 'TSG_SECURITY_DESTIN...
${response} = {'code': 200, 'msg': 'Success', 'data': {'policyList': [{'action': 'deny', 'appIdObjects': [75744], 'appSelectorObjects': [], 'destination': [{'objectId': 107889, 'protocolField': 'TSG_SECURITY_DESTIN...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
GetPolicyIds
${response}
ELSE
Create List
${policyIds}
获取结果中的策略类型及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]}]
${response}
Returns a list containing given items.
${policyIds}
${policyIds} = []
Returns a list containing given items.
${policy['policyId']}
${policyIdList}
${policyIdList} = [52341]
Creates and returns a dictionary based on the given ``items``.
policyType=${policy['policyType']}
policyIds=${policyIdList}
${policyObj}
${policyObj} = {'policyType': 'tsg_security', 'policyIds': [52341]}
Adds ``values`` to the end of ``list``.
${policyIds}
${policyObj}
Logs the given message with the given level.
${policyIds}
[{'policyType': 'tsg_security', 'policyIds': [52341]}]
${policyIds} = [{'policyType': 'tsg_security', 'policyIds': [52341]}]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${policyIds} = [{'policyType': 'tsg_security', 'policyIds': [52341]}]
${objectId} = [107882, 107883, 107884, 107885, 107886, 107887, 107888, 107889, 107890, 107891, 107892, 107893, 107894, 107895]
${policyId} = [{'policyType': 'tsg_security', 'policyIds': [52341]}]
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectIds}
${objectId}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${policyIds}
${policyId}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Logs the given message with the given level.
passssssssss
passssssssss
组织单个策略数据${modleFilePath}策略模板文件路径 ${policyData}从数据文件中获取的单个策略数据
${key}
${keyword}
${objectId}
${policyId}
Displays the given messages in the log file as keyword arguments.
获取模板
Displays the given messages in the log file as keyword arguments.
${policyModeJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${policyModeJson}
${policyJson}
${policyJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...
Displays the given messages in the log file as keyword arguments.
用data数据替换模板内容生成策略新增数据
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
condation
${condation}
${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...
解析策略条件,根据key值判断其在source、destation、filter中
${condation}
${objectIds}
${sourceList}
${destinationList}
${filterList}
Displays the given messages in the log file as keyword arguments.
循环读取对象list
Returns a list containing given items.
${sourceList}
${sourceList} = []
Returns a list containing given items.
${destinationList}
${destinationList} = []
Returns a list containing given items.
${filterList}
${filterList} = []
Returns a list containing given items.
${objectIdsList}
${objectIdsList} = []
Returns a value from the given ``dictionary`` based on the given ``key``.
${key}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_ADDR
处理对象
${key}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_ADDR
处理对象
${objectData}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_ADDR
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objList
${objList}
${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...
Displays the given messages in the log file as keyword arguments.
${objJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${objModeJson}
${objJson}
${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Returns the given values which can then be assigned to a variables.
${objListMode}
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectType
${return}
${objectType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectType
${return} = PASS
${objectType} = ip
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectType}" != "None"
Replace String
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "s...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectSubType
${return}
${objectSubType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectSubType
${return} = PASS
${objectSubType} = endpoint
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" != "None"
Replace String
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectId
${return}
${objectId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectId
Dictionary does not contain key 'objectId'.
${return} = FAIL
${objectId} = Dictionary does not contain key 'objectId'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"objectId": null
"objectId":${objectId}
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"opAction": "add"
"option": "update"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...
Returns a list containing given items.
${objectJsonList}
${objectJsonList} = []
Evaluates the given expression in Python and returns the results.
type(${objList})
${objListType}
${objListType} = <class 'list'>
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'ip': '255.255.255.255', 'port': '0-65535'}, {'ip': '255.255.255.255', 'port': '1-65535'}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"ip": "255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.255", "port": "1-65535"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"ip": "255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.255", "port": "1-65535"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"ip": "255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.255", "port": "1-65535"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addIt...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'ip': '255.255.255.1-255.255.255.255', 'port': '0-65535'}, {'ip': '255.255.255.2/24', 'port': '1-65535'}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"ip": "255.255.255.1-255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.2/24", "port": "1-65535"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"ip": "255.255.255.1-255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.2/24", "port": "1-65535"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"ip": "255.255.255.1-255.255.255.255", "port": "0-65535"}, {"ip": "255.255.255.2/24", "port": "1-65535"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "su...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addIt...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Creates and returns a dictionary based on the given ``items``.
opAction=add
returnData=1
objectList=${objectJsonList}
${objectData}
${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定...
${objectData}
${rescode}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${ipList}对象dict
Displays the given messages in the log file as keyword arguments.
创建IP
Returns a value from the given ``dictionary`` based on the given ``key``.
${ipList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${ipList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u535...
${objectUrl}
${bodyJson}
${version}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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
}
To JSON using : pretty_print=False
${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.255', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '0', 'clientPort2':...
${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.255', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '0', 'clientPort2':...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
getObjectListIds
${response}
ELSE
Create List
${objectIds}
获取结果中的对象ID
${response}
Logs the given message with the given level.
Call Get-ObjectIds
Call Get-ObjectIds
Returns a list containing given items.
${objectIds}
${objectIds} = []
Returns the given values which can then be assigned to a variables.
${EMPTY}
${objectIdsTemp}
${objectIdsTemp} =
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${value}
data
${return}
${data}
Returns a value from the given ``dictionary`` based on the given ``key``.
${value}
data
${return} = PASS
${data} = {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.255', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '0', 'clientPort2': '65535', 'clientPortFormat': 'range', '...
Returns from the enclosing user keyword if ``condition`` is true.
"${return}"=="FAIL"
${objectIdsTemp}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
${objectIds} = [107896, 107897]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${rescode} = 200
${objectIds} = [107896, 107897]
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Runs the given keyword with the given arguments, if ``condition`` is true.
"${protocolField}" != "None"
Set Variable
${protocolField}
${protocolField}
Returns the given values which can then be assigned to a variables.
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_ADDR
Returns a list containing given items.
${objectsList}
${objectsList} = []
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107896, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107896, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
${objectIds} = [107896, 107897]
${objectList} = {'objectId': 107896, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Set Variable
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Set Variable
${objectList}
ELSE
OrangeFilter
${objectList}
${objectList}
Returns the given values which can then be assigned to a variables.
${objectList}
${objectList} = {'objectId': 107896, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}
${objectIds} = [107896, 107897]
${objectList} = {'objectId': 107896, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}
Returns and logs the length of the given item as an integer.
${objectIdsList}
${len}
Length is 0
${len} = 0
Runs the given keyword with the given arguments, if ``condition`` is true.
${len} != 0
AppendListToList
${objectIdsList}
${objectIds}
ELSE
Set Variable
${objectIds}
${objectIdsList}
Returns the given values which can then be assigned to a variables.
${objectIds}
${objectIdsList} = [107896, 107897]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Append To List
${sourceList}
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Append To List
${destinationList}
${objectList}
ELSE
Append To List
${filterList}
${objectList}
Adds ``values`` to the end of ``list``.
${sourceList}
${objectList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${key}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_LOCATION
处理对象
${key}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_LOCATION
处理对象
${objectData}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_LOCATION
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objList
${objList}
${objList} = [{'addItemList': [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}, {'keywordArray': ['China.Duyun.*']}]}]
Displays the given messages in the log file as keyword arguments.
${objJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${objModeJson}
${objJson}
${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Returns the given values which can then be assigned to a variables.
${objListMode}
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectType
${return}
${objectType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectType
${return} = PASS
${objectType} = ip
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectType}" != "None"
Replace String
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "s...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectSubType
${return}
${objectSubType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectSubType
${return} = PASS
${objectSubType} = geo_location
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" != "None"
Replace String
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectId
${return}
${objectId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectId
Dictionary does not contain key 'objectId'.
${return} = FAIL
${objectId} = Dictionary does not contain key 'objectId'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"objectId": null
"objectId":${objectId}
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"opAction": "add"
"option": "update"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...
Returns a list containing given items.
${objectJsonList}
${objectJsonList} = []
Evaluates the given expression in Python and returns the results.
type(${objList})
${objListType}
${objListType} = <class 'list'>
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}, {'keywordArray': ['China.Duyun.*']}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}, {"keywordArray": ["China.Duyun.*"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}, {"keywordArray": ["China.Duyun.*"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}, {"keywordArray": ["China.Duyun.*"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'geo_location', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'a...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Creates and returns a dictionary based on the given ``items``.
opAction=add
returnData=1
objectList=${objectJsonList}
${objectData}
${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'geo_location', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单...
${objectData}
${rescode}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${ipList}对象dict
Displays the given messages in the log file as keyword arguments.
创建IP
Returns a value from the given ``dictionary`` based on the given ``key``.
${ipList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${ipList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\...
${objectUrl}
${bodyJson}
${version}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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
}
To JSON using : pretty_print=False
${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...
${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...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
getObjectListIds
${response}
ELSE
Create List
${objectIds}
获取结果中的对象ID
${response}
Logs the given message with the given level.
Call Get-ObjectIds
Call Get-ObjectIds
Returns a list containing given items.
${objectIds}
${objectIds} = []
Returns the given values which can then be assigned to a variables.
${EMPTY}
${objectIdsTemp}
${objectIdsTemp} =
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${value}
data
${return}
${data}
Returns a value from the given ``dictionary`` based on the given ``key``.
${value}
data
${return} = PASS
${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...
Returns from the enclosing user keyword if ``condition`` is true.
"${return}"=="FAIL"
${objectIdsTemp}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
${objectIds} = [107898]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${rescode} = 200
${objectIds} = [107898]
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Runs the given keyword with the given arguments, if ``condition`` is true.
"${protocolField}" != "None"
Set Variable
${protocolField}
${protocolField}
Returns the given values which can then be assigned to a variables.
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_LOCATION
Returns a list containing given items.
${objectsList}
${objectsList} = []
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107898, 'protocolField': 'TSG_SECURITY_SOURCE_LOCATION'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
${objectIds} = [107898]
${objectList} = {'objectId': 107898, 'protocolField': 'TSG_SECURITY_SOURCE_LOCATION'}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Set Variable
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Set Variable
${objectList}
ELSE
OrangeFilter
${objectList}
${objectList}
Returns the given values which can then be assigned to a variables.
${objectList}
${objectList} = {'objectId': 107898, 'protocolField': 'TSG_SECURITY_SOURCE_LOCATION'}
${objectIds} = [107898]
${objectList} = {'objectId': 107898, 'protocolField': 'TSG_SECURITY_SOURCE_LOCATION'}
Returns and logs the length of the given item as an integer.
${objectIdsList}
${len}
Length is 2
${len} = 2
Runs the given keyword with the given arguments, if ``condition`` is true.
${len} != 0
AppendListToList
${objectIdsList}
${objectIds}
ELSE
Set Variable
${objectIds}
${objectIdsList}
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectIdsList}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
${objectIdsList} = [107896, 107897, 107898]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Append To List
${sourceList}
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Append To List
${destinationList}
${objectList}
ELSE
Append To List
${filterList}
${objectList}
Adds ``values`` to the end of ``list``.
${sourceList}
${objectList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${key}
protocolField
${protocolField}
${protocolField} = TSG_FILED_GTP_IMSI
处理对象
${key}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_FILED_GTP_IMSI
处理对象
${objectData}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_FILED_GTP_IMSI
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objList
${objList}
${objList} = [{'addItemList': [{'keywordArray': ['123*']}, {'keywordArray': ['456*']}, {'keywordArray': ['12345678912345*']}]}]
Displays the given messages in the log file as keyword arguments.
${objJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${objModeJson}
${objJson}
${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Returns the given values which can then be assigned to a variables.
${objListMode}
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectType
${return}
${objectType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectType
${return} = PASS
${objectType} = mobile_identity
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectType}" != "None"
Replace String
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectSubType
${return}
${objectSubType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectSubType
${return} = PASS
${objectSubType} = imsi
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" != "None"
Replace String
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "t...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectId
${return}
${objectId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectId
Dictionary does not contain key 'objectId'.
${return} = FAIL
${objectId} = Dictionary does not contain key 'objectId'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"objectId": null
"objectId":${objectId}
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "t...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"opAction": "add"
"option": "update"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "t...
Returns a list containing given items.
${objectJsonList}
${objectJsonList} = []
Evaluates the given expression in Python and returns the results.
type(${objList})
${objListType}
${objListType} = <class 'list'>
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'keywordArray': ['123*']}, {'keywordArray': ['456*']}, {'keywordArray': ['12345678912345*']}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["456*"]}, {"keywordArray": ["12345678912345*"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["456*"]}, {"keywordArray": ["12345678912345*"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["456*"]}, {"keywordArray": ["12345678912345*"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "t...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "t...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'mobile_identity', 'objectSubType': 'imsi', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Creates and returns a dictionary based on the given ``items``.
opAction=add
returnData=1
objectList=${objectJsonList}
${objectData}
${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'mobile_identity', 'objectSubType': 'imsi', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'aut...
${objectData}
${rescode}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${ipList}对象dict
Displays the given messages in the log file as keyword arguments.
创建IP
Returns a value from the given ``dictionary`` based on the given ``key``.
${ipList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${ipList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "mobile_identity", "objectSubType": "imsi", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "aut...
${objectUrl}
${bodyJson}
${version}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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
}
To JSON using : pretty_print=False
${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...
${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...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
getObjectListIds
${response}
ELSE
Create List
${objectIds}
获取结果中的对象ID
${response}
Logs the given message with the given level.
Call Get-ObjectIds
Call Get-ObjectIds
Returns a list containing given items.
${objectIds}
${objectIds} = []
Returns the given values which can then be assigned to a variables.
${EMPTY}
${objectIdsTemp}
${objectIdsTemp} =
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${value}
data
${return}
${data}
Returns a value from the given ``dictionary`` based on the given ``key``.
${value}
data
${return} = PASS
${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...
Returns from the enclosing user keyword if ``condition`` is true.
"${return}"=="FAIL"
${objectIdsTemp}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
${objectIds} = [107899]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${rescode} = 200
${objectIds} = [107899]
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Runs the given keyword with the given arguments, if ``condition`` is true.
"${protocolField}" != "None"
Set Variable
${protocolField}
${protocolField}
Returns the given values which can then be assigned to a variables.
${protocolField}
${protocolField} = TSG_FILED_GTP_IMSI
Returns a list containing given items.
${objectsList}
${objectsList} = []
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107899, 'protocolField': 'TSG_FILED_GTP_IMSI'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
${objectIds} = [107899]
${objectList} = {'objectId': 107899, 'protocolField': 'TSG_FILED_GTP_IMSI'}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Set Variable
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Set Variable
${objectList}
ELSE
OrangeFilter
${objectList}
${objectList}
Returns the given values which can then be assigned to a variables.
${objectList}
${objectList} = {'objectId': 107899, 'protocolField': 'TSG_FILED_GTP_IMSI'}
${objectIds} = [107899]
${objectList} = {'objectId': 107899, 'protocolField': 'TSG_FILED_GTP_IMSI'}
Returns and logs the length of the given item as an integer.
${objectIdsList}
${len}
Length is 3
${len} = 3
Runs the given keyword with the given arguments, if ``condition`` is true.
${len} != 0
AppendListToList
${objectIdsList}
${objectIds}
ELSE
Set Variable
${objectIds}
${objectIdsList}
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectIdsList}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
${objectIdsList} = [107896, 107897, 107898, 107899]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Append To List
${sourceList}
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Append To List
${destinationList}
${objectList}
ELSE
Append To List
${filterList}
${objectList}
Adds ``values`` to the end of ``list``.
${sourceList}
${objectList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${key}
protocolField
${protocolField}
${protocolField} = TSG_FILED_GTP_PHONE_NUMBER
处理对象
${key}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_FILED_GTP_PHONE_NUMBER
处理对象
${objectData}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_FILED_GTP_PHONE_NUMBER
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objList
${objList}
${objList} = [{'addItemList': [{'keywordArray': ['123*']}, {'keywordArray': ['$123456789012345']}, {'keywordArray': ['12345']}]}]
Displays the given messages in the log file as keyword arguments.
${objJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${objModeJson}
${objJson}
${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Returns the given values which can then be assigned to a variables.
${objListMode}
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectType
${return}
${objectType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectType
${return} = PASS
${objectType} = mobile_identity
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectType}" != "None"
Replace String
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectSubType
${return}
${objectSubType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectSubType
${return} = PASS
${objectSubType} = phone_number
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" != "None"
Replace String
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectD...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectId
${return}
${objectId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectId
Dictionary does not contain key 'objectId'.
${return} = FAIL
${objectId} = Dictionary does not contain key 'objectId'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"objectId": null
"objectId":${objectId}
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectD...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"opAction": "add"
"option": "update"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectD...
Returns a list containing given items.
${objectJsonList}
${objectJsonList} = []
Evaluates the given expression in Python and returns the results.
type(${objList})
${objListType}
${objListType} = <class 'list'>
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'keywordArray': ['123*']}, {'keywordArray': ['$123456789012345']}, {'keywordArray': ['12345']}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["$123456789012345"]}, {"keywordArray": ["12345"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["$123456789012345"]}, {"keywordArray": ["12345"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["123*"]}, {"keywordArray": ["$123456789012345"]}, {"keywordArray": ["12345"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectD...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"mobile_identity", "objectSubType":"phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectD...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'mobile_identity', 'objectSubType': 'phone_number', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjec...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Creates and returns a dictionary based on the given ``items``.
opAction=add
returnData=1
objectList=${objectJsonList}
${objectData}
${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'mobile_identity', 'objectSubType': 'phone_number', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectNam...
${objectData}
${rescode}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${ipList}对象dict
Displays the given messages in the log file as keyword arguments.
创建IP
Returns a value from the given ``dictionary`` based on the given ``key``.
${ipList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${ipList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "mobile_identity", "objectSubType": "phone_number", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectNam...
${objectUrl}
${bodyJson}
${version}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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
}
To JSON using : pretty_print=False
${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...
${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...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
getObjectListIds
${response}
ELSE
Create List
${objectIds}
获取结果中的对象ID
${response}
Logs the given message with the given level.
Call Get-ObjectIds
Call Get-ObjectIds
Returns a list containing given items.
${objectIds}
${objectIds} = []
Returns the given values which can then be assigned to a variables.
${EMPTY}
${objectIdsTemp}
${objectIdsTemp} =
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${value}
data
${return}
${data}
Returns a value from the given ``dictionary`` based on the given ``key``.
${value}
data
${return} = PASS
${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...
Returns from the enclosing user keyword if ``condition`` is true.
"${return}"=="FAIL"
${objectIdsTemp}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
${objectIds} = [107900]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${rescode} = 200
${objectIds} = [107900]
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Runs the given keyword with the given arguments, if ``condition`` is true.
"${protocolField}" != "None"
Set Variable
${protocolField}
${protocolField}
Returns the given values which can then be assigned to a variables.
${protocolField}
${protocolField} = TSG_FILED_GTP_PHONE_NUMBER
Returns a list containing given items.
${objectsList}
${objectsList} = []
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107900, 'protocolField': 'TSG_FILED_GTP_PHONE_NUMBER'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
${objectIds} = [107900]
${objectList} = {'objectId': 107900, 'protocolField': 'TSG_FILED_GTP_PHONE_NUMBER'}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Set Variable
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Set Variable
${objectList}
ELSE
OrangeFilter
${objectList}
${objectList}
Returns the given values which can then be assigned to a variables.
${objectList}
${objectList} = {'objectId': 107900, 'protocolField': 'TSG_FILED_GTP_PHONE_NUMBER'}
${objectIds} = [107900]
${objectList} = {'objectId': 107900, 'protocolField': 'TSG_FILED_GTP_PHONE_NUMBER'}
Returns and logs the length of the given item as an integer.
${objectIdsList}
${len}
Length is 4
${len} = 4
Runs the given keyword with the given arguments, if ``condition`` is true.
${len} != 0
AppendListToList
${objectIdsList}
${objectIds}
ELSE
Set Variable
${objectIds}
${objectIdsList}
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectIdsList}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
${objectIdsList} = [107896, 107897, 107898, 107899, 107900]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Append To List
${sourceList}
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Append To List
${destinationList}
${objectList}
ELSE
Append To List
${filterList}
${objectList}
Adds ``values`` to the end of ``list``.
${sourceList}
${objectList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${key}
protocolField
${protocolField}
${protocolField} = TSG_FILED_GTP_APN
处理对象
${key}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_FILED_GTP_APN
处理对象
${objectData}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_FILED_GTP_APN
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objList
${objList}
${objList} = [{'addItemList': [{'keywordArray': ['*uawei.org']}, {'keywordArray': ['$huawei.com']}, {'keywordArray': ['$www.huawei.com']}]}]
Displays the given messages in the log file as keyword arguments.
${objJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${objModeJson}
${objJson}
${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Returns the given values which can then be assigned to a variables.
${objListMode}
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectType
${return}
${objectType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectType
${return} = PASS
${objectType} = apn
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectType}" != "None"
Replace String
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectSubType
${return}
${objectSubType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectSubType
${return} = PASS
${objectSubType} =
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" != "None"
Replace String
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectId
${return}
${objectId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectId
Dictionary does not contain key 'objectId'.
${return} = FAIL
${objectId} = Dictionary does not contain key 'objectId'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"objectId": null
"objectId":${objectId}
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"opAction": "add"
"option": "update"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...
Returns a list containing given items.
${objectJsonList}
${objectJsonList} = []
Evaluates the given expression in Python and returns the results.
type(${objList})
${objListType}
${objListType} = <class 'list'>
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'keywordArray': ['*uawei.org']}, {'keywordArray': ['$huawei.com']}, {'keywordArray': ['$www.huawei.com']}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"keywordArray": ["*uawei.org"]}, {"keywordArray": ["$huawei.com"]}, {"keywordArray": ["$www.huawei.com"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["*uawei.org"]}, {"keywordArray": ["$huawei.com"]}, {"keywordArray": ["$www.huawei.com"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["*uawei.org"]}, {"keywordArray": ["$huawei.com"]}, {"keywordArray": ["$www.huawei.com"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"apn", "objectSubType":"", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "subObject...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'apn', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addItemList'...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Creates and returns a dictionary based on the given ``items``.
opAction=add
returnData=1
objectList=${objectJsonList}
${objectData}
${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'apn', 'objectSubType': '', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'o...
${objectData}
${rescode}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${ipList}对象dict
Displays the given messages in the log file as keyword arguments.
创建IP
Returns a value from the given ``dictionary`` based on the given ``key``.
${ipList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${ipList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "apn", "objectSubType": "", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u63...
${objectUrl}
${bodyJson}
${version}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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
}
To JSON using : pretty_print=False
${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...
${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...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
getObjectListIds
${response}
ELSE
Create List
${objectIds}
获取结果中的对象ID
${response}
Logs the given message with the given level.
Call Get-ObjectIds
Call Get-ObjectIds
Returns a list containing given items.
${objectIds}
${objectIds} = []
Returns the given values which can then be assigned to a variables.
${EMPTY}
${objectIdsTemp}
${objectIdsTemp} =
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${value}
data
${return}
${data}
Returns a value from the given ``dictionary`` based on the given ``key``.
${value}
data
${return} = PASS
${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...
Returns from the enclosing user keyword if ``condition`` is true.
"${return}"=="FAIL"
${objectIdsTemp}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
${objectIds} = [107901]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${rescode} = 200
${objectIds} = [107901]
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Runs the given keyword with the given arguments, if ``condition`` is true.
"${protocolField}" != "None"
Set Variable
${protocolField}
${protocolField}
Returns the given values which can then be assigned to a variables.
${protocolField}
${protocolField} = TSG_FILED_GTP_APN
Returns a list containing given items.
${objectsList}
${objectsList} = []
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107901, 'protocolField': 'TSG_FILED_GTP_APN'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
${objectIds} = [107901]
${objectList} = {'objectId': 107901, 'protocolField': 'TSG_FILED_GTP_APN'}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Set Variable
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Set Variable
${objectList}
ELSE
OrangeFilter
${objectList}
${objectList}
Returns the given values which can then be assigned to a variables.
${objectList}
${objectList} = {'objectId': 107901, 'protocolField': 'TSG_FILED_GTP_APN'}
${objectIds} = [107901]
${objectList} = {'objectId': 107901, 'protocolField': 'TSG_FILED_GTP_APN'}
Returns and logs the length of the given item as an integer.
${objectIdsList}
${len}
Length is 5
${len} = 5
Runs the given keyword with the given arguments, if ``condition`` is true.
${len} != 0
AppendListToList
${objectIdsList}
${objectIds}
ELSE
Set Variable
${objectIds}
${objectIdsList}
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectIdsList}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
${objectIdsList} = [107896, 107897, 107898, 107899, 107900, 107901]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Append To List
${sourceList}
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Append To List
${destinationList}
${objectList}
ELSE
Append To List
${filterList}
${objectList}
Adds ``values`` to the end of ``list``.
${sourceList}
${objectList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${key}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_ADDR
处理对象
${key}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_ADDR
处理对象
${objectData}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_ADDR
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objList
${objList}
${objList} = [{'addItemList': [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'learningDepth': '2', 'agingTime': '12', 'voteClientNum': '10', 'learnedIpLimit': '1000'}]}]
Displays the given messages in the log file as keyword arguments.
${objJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${objModeJson}
${objJson}
${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Returns the given values which can then be assigned to a variables.
${objListMode}
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectType
${return}
${objectType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectType
${return} = PASS
${objectType} = ip
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectType}" != "None"
Replace String
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "s...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectSubType
${return}
${objectSubType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectSubType
${return} = PASS
${objectSubType} = ip_learning
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" != "None"
Replace String
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", ...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectId
${return}
${objectId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectId
Dictionary does not contain key 'objectId'.
${return} = FAIL
${objectId} = Dictionary does not contain key 'objectId'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"objectId": null
"objectId":${objectId}
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", ...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"opAction": "add"
"option": "update"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", ...
Returns a list containing given items.
${objectJsonList}
${objectJsonList} = []
Evaluates the given expression in Python and returns the results.
type(${objList})
${objListType}
${objListType} = <class 'list'>
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'learningDepth': '2', 'agingTime': '12', 'voteClientNum': '10', 'learnedIpLimit': '1000'}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${addItemList}
[{"
"
${addItemList} = "fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${addItemList}
"}]
"
${addItemList} = "fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", ...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType":"ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", ...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'ip_learning', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'ad...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Creates and returns a dictionary based on the given ``items``.
opAction=add
returnData=1
objectList=${objectJsonList}
${objectData}
${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'ip_learning', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单i...
${objectData}
${rescode}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${ipList}对象dict
Displays the given messages in the log file as keyword arguments.
创建IP
Returns a value from the given ``dictionary`` based on the given ``key``.
${ipList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${ipList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u...
${objectUrl}
${bodyJson}
${version}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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
}
To JSON using : pretty_print=False
${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '...
${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
getObjectListIds
${response}
ELSE
Create List
${objectIds}
获取结果中的对象ID
${response}
Logs the given message with the given level.
Call Get-ObjectIds
Call Get-ObjectIds
Returns a list containing given items.
${objectIds}
${objectIds} = []
Returns the given values which can then be assigned to a variables.
${EMPTY}
${objectIdsTemp}
${objectIdsTemp} =
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${value}
data
${return}
${data}
Returns a value from the given ``dictionary`` based on the given ``key``.
${value}
data
${return} = PASS
${data} = {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '#31739C', 'isDisplay': None, 'isExclusio...
Returns from the enclosing user keyword if ``condition`` is true.
"${return}"=="FAIL"
${objectIdsTemp}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
${objectIds} = [107902]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${rescode} = 200
${objectIds} = [107902]
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Runs the given keyword with the given arguments, if ``condition`` is true.
"${protocolField}" != "None"
Set Variable
${protocolField}
${protocolField}
Returns the given values which can then be assigned to a variables.
${protocolField}
${protocolField} = TSG_SECURITY_SOURCE_ADDR
Returns a list containing given items.
${objectsList}
${objectsList} = []
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107902, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
${objectIds} = [107902]
${objectList} = {'objectId': 107902, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Set Variable
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Set Variable
${objectList}
ELSE
OrangeFilter
${objectList}
${objectList}
Returns the given values which can then be assigned to a variables.
${objectList}
${objectList} = {'objectId': 107902, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}
${objectIds} = [107902]
${objectList} = {'objectId': 107902, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}
Returns and logs the length of the given item as an integer.
${objectIdsList}
${len}
Length is 6
${len} = 6
Runs the given keyword with the given arguments, if ``condition`` is true.
${len} != 0
AppendListToList
${objectIdsList}
${objectIds}
ELSE
Set Variable
${objectIds}
${objectIdsList}
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectIdsList}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
${objectIdsList} = [107896, 107897, 107898, 107899, 107900, 107901, 107902]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Append To List
${sourceList}
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Append To List
${destinationList}
${objectList}
ELSE
Append To List
${filterList}
${objectList}
Adds ``values`` to the end of ``list``.
${sourceList}
${objectList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${key}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_ADDR
处理对象
${key}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_ADDR
处理对象
${objectData}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_ADDR
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objList
${objList}
${objList} = [{'addItemList': [{'ip': '255.255.255.254', 'port': '65535'}, {'ip': '255.255.255.254', 'port': '1'}]}]
Displays the given messages in the log file as keyword arguments.
${objJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${objModeJson}
${objJson}
${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Returns the given values which can then be assigned to a variables.
${objListMode}
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectType
${return}
${objectType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectType
Dictionary does not contain key 'objectType'.
${return} = FAIL
${objectType} = Dictionary does not contain key 'objectType'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectType}" != "None"
Replace String
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectSubType
${return}
${objectSubType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectSubType
Dictionary does not contain key 'objectSubType'.
${return} = FAIL
${objectSubType} = Dictionary does not contain key 'objectSubType'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" != "None"
Replace String
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectId
${return}
${objectId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectId
Dictionary does not contain key 'objectId'.
${return} = FAIL
${objectId} = Dictionary does not contain key 'objectId'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"objectId": null
"objectId":${objectId}
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"opAction": "add"
"option": "update"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Returns a list containing given items.
${objectJsonList}
${objectJsonList} = []
Evaluates the given expression in Python and returns the results.
type(${objList})
${objListType}
${objListType} = <class 'list'>
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'ip': '255.255.255.254', 'port': '65535'}, {'ip': '255.255.255.254', 'port': '1'}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"ip": "255.255.255.254", "port": "65535"}, {"ip": "255.255.255.254", "port": "1"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"ip": "255.255.255.254", "port": "65535"}, {"ip": "255.255.255.254", "port": "1"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"ip": "255.255.255.254", "port": "65535"}, {"ip": "255.255.255.254", "port": "1"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'addIt...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Creates and returns a dictionary based on the given ``items``.
opAction=add
returnData=1
objectList=${objectJsonList}
${objectData}
${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'endpoint', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定...
${objectData}
${rescode}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${ipList}对象dict
Displays the given messages in the log file as keyword arguments.
创建IP
Returns a value from the given ``dictionary`` based on the given ``key``.
${ipList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${ipList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u535...
${objectUrl}
${bodyJson}
${version}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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
}
To JSON using : pretty_print=False
${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.254', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '65535', 'clientPor...
${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.254', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '65535', 'clientPor...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
getObjectListIds
${response}
ELSE
Create List
${objectIds}
获取结果中的对象ID
${response}
Logs the given message with the given level.
Call Get-ObjectIds
Call Get-ObjectIds
Returns a list containing given items.
${objectIds}
${objectIds} = []
Returns the given values which can then be assigned to a variables.
${EMPTY}
${objectIdsTemp}
${objectIdsTemp} =
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${value}
data
${return}
${data}
Returns a value from the given ``dictionary`` based on the given ``key``.
${value}
data
${return} = PASS
${data} = {'objectList': [{'addItemList': [{'addrType': 4, 'clientIp1': '255.255.255.254', 'clientIp2': '32', 'clientIpFormat': 'CIDR', 'clientPort1': '65535', 'clientPort2': '65535', 'clientPortFormat': 'range...
Returns from the enclosing user keyword if ``condition`` is true.
"${return}"=="FAIL"
${objectIdsTemp}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
${objectIds} = [107903]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${rescode} = 200
${objectIds} = [107903]
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Runs the given keyword with the given arguments, if ``condition`` is true.
"${protocolField}" != "None"
Set Variable
${protocolField}
${protocolField}
Returns the given values which can then be assigned to a variables.
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_ADDR
Returns a list containing given items.
${objectsList}
${objectsList} = []
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107903, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
${objectIds} = [107903]
${objectList} = {'objectId': 107903, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Set Variable
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Set Variable
${objectList}
ELSE
OrangeFilter
${objectList}
${objectList}
Returns the given values which can then be assigned to a variables.
${objectList}
${objectList} = {'objectId': 107903, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}
${objectIds} = [107903]
${objectList} = {'objectId': 107903, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}
Returns and logs the length of the given item as an integer.
${objectIdsList}
${len}
Length is 7
${len} = 7
Runs the given keyword with the given arguments, if ``condition`` is true.
${len} != 0
AppendListToList
${objectIdsList}
${objectIds}
ELSE
Set Variable
${objectIds}
${objectIdsList}
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectIdsList}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
${objectIdsList} = [107896, 107897, 107898, 107899, 107900, 107901, 107902, 107903]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Append To List
${sourceList}
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Append To List
${destinationList}
${objectList}
ELSE
Append To List
${filterList}
${objectList}
Adds ``values`` to the end of ``list``.
${destinationList}
${objectList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${key}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_LOCATION
处理对象
${key}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_LOCATION
处理对象
${objectData}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_LOCATION
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objList
${objList}
${objList} = [{'addItemList': [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}]}]
Displays the given messages in the log file as keyword arguments.
${objJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${objModeJson}
${objJson}
${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Returns the given values which can then be assigned to a variables.
${objListMode}
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectType
${return}
${objectType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectType
Dictionary does not contain key 'objectType'.
${return} = FAIL
${objectType} = Dictionary does not contain key 'objectType'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectType}" != "None"
Replace String
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectSubType
${return}
${objectSubType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectSubType
${return} = PASS
${objectSubType} = geo_location
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" != "None"
Replace String
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test"...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectId
${return}
${objectId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectId
Dictionary does not contain key 'objectId'.
${return} = FAIL
${objectId} = Dictionary does not contain key 'objectId'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"objectId": null
"objectId":${objectId}
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test"...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"opAction": "add"
"option": "update"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test"...
Returns a list containing given items.
${objectJsonList}
${objectJsonList} = []
Evaluates the given expression in Python and returns the results.
type(${objList})
${objListType}
${objListType} = <class 'list'>
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'keywordArray': ['Algeria.*']}, {'keywordArray': ['China.Duyun.*']}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Returns the given values which can then be assigned to a variables.
${addItemList}
${addItemList} = [{"keywordArray": ["Algeria.*"]}, {"keywordArray": ["China.Duyun.*"]}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test"...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test"...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'geo_location', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'a...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Creates and returns a dictionary based on the given ``items``.
opAction=add
returnData=1
objectList=${objectJsonList}
${objectData}
${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'geo_location', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单...
${objectData}
${rescode}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${ipList}对象dict
Displays the given messages in the log file as keyword arguments.
创建IP
Returns a value from the given ``dictionary`` based on the given ``key``.
${ipList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${ipList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "geo_location", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\...
${objectUrl}
${bodyJson}
${version}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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
}
To JSON using : pretty_print=False
${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...
${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...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
getObjectListIds
${response}
ELSE
Create List
${objectIds}
获取结果中的对象ID
${response}
Logs the given message with the given level.
Call Get-ObjectIds
Call Get-ObjectIds
Returns a list containing given items.
${objectIds}
${objectIds} = []
Returns the given values which can then be assigned to a variables.
${EMPTY}
${objectIdsTemp}
${objectIdsTemp} =
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${value}
data
${return}
${data}
Returns a value from the given ``dictionary`` based on the given ``key``.
${value}
data
${return} = PASS
${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...
Returns from the enclosing user keyword if ``condition`` is true.
"${return}"=="FAIL"
${objectIdsTemp}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
${objectIds} = [107904]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${rescode} = 200
${objectIds} = [107904]
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Runs the given keyword with the given arguments, if ``condition`` is true.
"${protocolField}" != "None"
Set Variable
${protocolField}
${protocolField}
Returns the given values which can then be assigned to a variables.
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_LOCATION
Returns a list containing given items.
${objectsList}
${objectsList} = []
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107904, 'protocolField': 'TSG_SECURITY_DESTINATION_LOCATION'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
${objectIds} = [107904]
${objectList} = {'objectId': 107904, 'protocolField': 'TSG_SECURITY_DESTINATION_LOCATION'}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Set Variable
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Set Variable
${objectList}
ELSE
OrangeFilter
${objectList}
${objectList}
Returns the given values which can then be assigned to a variables.
${objectList}
${objectList} = {'objectId': 107904, 'protocolField': 'TSG_SECURITY_DESTINATION_LOCATION'}
${objectIds} = [107904]
${objectList} = {'objectId': 107904, 'protocolField': 'TSG_SECURITY_DESTINATION_LOCATION'}
Returns and logs the length of the given item as an integer.
${objectIdsList}
${len}
Length is 8
${len} = 8
Runs the given keyword with the given arguments, if ``condition`` is true.
${len} != 0
AppendListToList
${objectIdsList}
${objectIds}
ELSE
Set Variable
${objectIds}
${objectIdsList}
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectIdsList}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
${objectIdsList} = [107896, 107897, 107898, 107899, 107900, 107901, 107902, 107903, 107904]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Append To List
${sourceList}
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Append To List
${destinationList}
${objectList}
ELSE
Append To List
${filterList}
${objectList}
Adds ``values`` to the end of ``list``.
${destinationList}
${objectList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${key}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_ADDR
处理对象
${key}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_ADDR
处理对象
${objectData}
${objectIds}
${objectList}
Displays the given messages in the log file as keyword arguments.
针对位置进行处理
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
protocolField
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_ADDR
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objList
${objList}
${objList} = [{'addItemList': [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'learningDepth': '2', 'agingTime': '12', 'voteClientNum': '10', 'learnedIpLimit': '1000'}]}]
Displays the given messages in the log file as keyword arguments.
${objJson}对象模板取自全局变量
Returns the given values which can then be assigned to a variables.
${objModeJson}
${objJson}
${objJson} = {"datafomat": "complate", "opAction": "add", "returnData": 1, "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "obj...
Returns the given values which can then be assigned to a variables.
${objListMode}
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectType
${return}
${objectType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectType
Dictionary does not contain key 'objectType'.
${return} = FAIL
${objectType} = Dictionary does not contain key 'objectType'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectType}" != "None"
Replace String
${objectJson}
"objectType": "ip"
"objectType":"${objectType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType": "endpoint", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectSubType
${return}
${objectSubType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectSubType
${return} = PASS
${objectSubType} = ip_learning
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" != "None"
Replace String
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"objectSubType": "endpoint"
"objectSubType":"${objectSubType}"
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${objectData}
objectId
${return}
${objectId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objectData}
objectId
Dictionary does not contain key 'objectId'.
${return} = FAIL
${objectId} = Dictionary does not contain key 'objectId'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"objectId": null
"objectId":${objectId}
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectId}" != "None"
Replace String
${objectJson}
"opAction": "add"
"option": "update"
ELSE
Set Variable
${objectJson}
${objectJson}
Returns the given values which can then be assigned to a variables.
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...
Returns a list containing given items.
${objectJsonList}
${objectJsonList} = []
Evaluates the given expression in Python and returns the results.
type(${objList})
${objListType}
${objListType} = <class 'list'>
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${obj}
addItemList
${return}
${addItemList}
Returns a value from the given ``dictionary`` based on the given ``key``.
${obj}
addItemList
${return} = PASS
${addItemList} = [{'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'learningDepth': '2', 'agingTime': '12', 'voteClientNum': '10', 'learnedIpLimit': '1000'}]
Serialize ``obj`` to a JSON formatted ``str``.
${addItemList}
${addItemList}
${addItemList} = [{"fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
[{"
"
ELSE
Set Variable
${addItemList}
${addItemList}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${addItemList}
[{"
"
${addItemList} = "fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"}]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${addItemList}
"}]
"
ELSE
Set Variable
${addItemList}
${addItemList}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${addItemList}
"}]
"
${addItemList} = "fromFqdns": ["$www.baidu.com", "*jd.com"], "fromProtocol": "HTTP,SSL", "learningDepth": "2", "agingTime": "12", "voteClientNum": "10", "learnedIpLimit": "1000"
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${objectSubType}" == "ip_learning"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
ELSE IF
"${return}"!="FAIL"
Replace String
${objectJson}
"addItemList": [null]
"addItemList": ${addItemList}
ELSE
Set Variable
${objectJson}
${objectJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
"addItemList": [null]
"addItemList": [], ${addItemList}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${objectJson}
[null]
[]
${objectJson}
${objectJson} = [{"objectId": null, "objectType": "ip", "objectSubType":"ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u5355ip\u6307\u5b9a\u7aef\u53e3", "objectDesc": "test",...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${objectJson}
${objDictionary}
${objDictionary} = [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'ip_learning', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单ip指定端口', 'objectDesc': 'test', 'subObjectIds': [], 'ad...
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectJsonList}
${objDictionary}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Creates and returns a dictionary based on the given ``items``.
opAction=add
returnData=1
objectList=${objectJsonList}
${objectData}
${objectData} = {'opAction': 'add', 'returnData': '1', 'objectList': [{'objectId': None, 'objectType': 'ip', 'objectSubType': 'ip_learning', 'isValid': 1, 'isInitialize': 0, 'isExclusion': 0, 'objectName': 'auttest单i...
${objectData}
${rescode}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${ipList}对象dict
Displays the given messages in the log file as keyword arguments.
创建IP
Returns a value from the given ``dictionary`` based on the given ``key``.
${ipList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${ipList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "objectList": [{"objectId": null, "objectType": "ip", "objectSubType": "ip_learning", "isValid": 1, "isInitialize": 0, "isExclusion": 0, "objectName": "auttest\u...
${objectUrl}
${bodyJson}
${version}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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
}
To JSON using : pretty_print=False
${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '...
${response} = {'code': 200, 'msg': 'Success', 'data': {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
getObjectListIds
${response}
ELSE
Create List
${objectIds}
获取结果中的对象ID
${response}
Logs the given message with the given level.
Call Get-ObjectIds
Call Get-ObjectIds
Returns a list containing given items.
${objectIds}
${objectIds} = []
Returns the given values which can then be assigned to a variables.
${EMPTY}
${objectIdsTemp}
${objectIdsTemp} =
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${value}
data
${return}
${data}
Returns a value from the given ``dictionary`` based on the given ``key``.
${value}
data
${return} = PASS
${data} = {'objectList': [{'addItemList': [], 'agingTime': 12, 'deleteItemIds': [], 'fromFqdns': ['$www.baidu.com', '*jd.com'], 'fromProtocol': 'HTTP,SSL', 'iconColor': '#31739C', 'isDisplay': None, 'isExclusio...
Returns from the enclosing user keyword if ``condition`` is true.
"${return}"=="FAIL"
${objectIdsTemp}
Adds ``values`` to the end of ``list``.
${objectIds}
${object['objectId']}
${objectIds} = [107905]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${rescode} = 200
${objectIds} = [107905]
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Runs the given keyword with the given arguments, if ``condition`` is true.
"${protocolField}" != "None"
Set Variable
${protocolField}
${protocolField}
Returns the given values which can then be assigned to a variables.
${protocolField}
${protocolField} = TSG_SECURITY_DESTINATION_ADDR
Returns a list containing given items.
${objectsList}
${objectsList} = []
Creates and returns a dictionary based on the given ``items``.
objectId=${objectIds}[0]
protocolField=${protocolField}
${objectList}
${objectList} = {'objectId': 107905, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}
Adds ``values`` to the end of ``list``.
${objectsList}
${objectList}
${objectIds} = [107905]
${objectList} = {'objectId': 107905, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Set Variable
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Set Variable
${objectList}
ELSE
OrangeFilter
${objectList}
${objectList}
Returns the given values which can then be assigned to a variables.
${objectList}
${objectList} = {'objectId': 107905, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}
${objectIds} = [107905]
${objectList} = {'objectId': 107905, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}
Returns and logs the length of the given item as an integer.
${objectIdsList}
${len}
Length is 9
${len} = 9
Runs the given keyword with the given arguments, if ``condition`` is true.
${len} != 0
AppendListToList
${objectIdsList}
${objectIds}
ELSE
Set Variable
${objectIds}
${objectIdsList}
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectIdsList}
${objectIds}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
${objectIdsList} = [107896, 107897, 107898, 107899, 107900, 107901, 107902, 107903, 107904, 107905]
Runs the given keyword with the given arguments, if ``condition`` is true.
"${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"
Append To List
${sourceList}
${objectList}
ELSE IF
"${protocolField}" == "TSG_SECURITY_DESTINATION_ADDR" or "${protocolField}" == "TSG_SECURITY_DESTINATION_LOCATION" or "${protocolField}" == "TSG_SECURITY_DESTINATION_ASN"
Append To List
${destinationList}
${objectList}
ELSE
Append To List
${filterList}
${objectList}
Adds ``values`` to the end of ``list``.
${destinationList}
${objectList}
${objectIds} = [107896, 107897, 107898, 107899, 107900, 107901, 107902, 107903, 107904, 107905]
${sourceList} = [{'objectId': 107896, 'protocolField': 'TSG_SECURITY_SOURCE_ADDR'}, {'objectId': 107898, 'protocolField': 'TSG_SECURITY_SOURCE_LOCATION'}, {'objectId': 107899, 'protocolField': 'TSG_FILED_GTP_IMSI'}, ...
${destinationList} = [{'objectId': 107903, 'protocolField': 'TSG_SECURITY_DESTINATION_ADDR'}, {'objectId': 107904, 'protocolField': 'TSG_SECURITY_DESTINATION_LOCATION'}, {'objectId': 107905, 'protocolField': 'TSG_SECURITY...
${filterList} = []
Serialize ``obj`` to a JSON formatted ``str``.
${sourceList}
${sourceList}
${sourceList} = [{"objectId": 107896, "protocolField": "TSG_SECURITY_SOURCE_ADDR"}, {"objectId": 107898, "protocolField": "TSG_SECURITY_SOURCE_LOCATION"}, {"objectId": 107899, "protocolField": "TSG_FILED_GTP_IMSI"}, ...
Serialize ``obj`` to a JSON formatted ``str``.
${destinationList}
${destinationList}
${destinationList} = [{"objectId": 107903, "protocolField": "TSG_SECURITY_DESTINATION_ADDR"}, {"objectId": 107904, "protocolField": "TSG_SECURITY_DESTINATION_LOCATION"}, {"objectId": 107905, "protocolField": "TSG_SECURITY...
Serialize ``obj`` to a JSON formatted ``str``.
${filterList}
${filterList}
${filterList} = []
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"source": null
"source":${sourceList}
${policyJson}
${policyJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"destination": null
"destination":${destinationList}
${policyJson}
${policyJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"filterList": null
"filterList":${filterList}
${policyJson}
${policyJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...
Displays the given messages in the log file as keyword arguments.
处理策略数据:
"opAction": "add"
"returnData": 1
"policyName": "autotest"
"policyType": "tsg_security"
"action": "allow"
"userTags": ""
"doBlacklist": 0
"doLog": 1
"policyDesc": "autotest"
"effectiveRange":
"userRegion":
"appIdObjects":
"appSelectorObjects":
"isValid": 1
"scheduleId":
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
opAction
${return}
${opAction}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
opAction
${return} = PASS
${opAction} = add
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${opAction}" != "${EMPTY}"
Replace String
${policyJson}
"opAction": "add"
"opAction": "${opAction}"
ELSE
Set Variable
${policyJson}
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"opAction": "add"
"opAction": "${opAction}"
${policyJson} = {"opAction": "add", "returnData": 1, "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest", "...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
returnData
${return}
${returnData}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
returnData
${return} = PASS
${returnData} = 1
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${returnData}" != "${EMPTY}"
Replace String
${policyJson}
"returnData": 1
"returnData": "${returnData}"
ELSE
Set Variable
${policyJson}
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"returnData": 1
"returnData": "${returnData}"
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotest", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "autotest",...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
policyName
${return}
${policyName}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
policyName
${return} = PASS
${policyName} = autotestintercept
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${policyName}" != "None"
Replace String
${policyJson}
"policyName": "autotest"
"policyName": "${policyName}"
ELSE
Replace String
${policyJson}
"policyName": "autotest"
"policyName": "${testName}"
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"policyName": "autotest"
"policyName": "${policyName}"
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestintercept", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "a...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
policyType
${return}
${policyType}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
policyType
${return} = PASS
${policyType} = tsg_security
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${policyType}" != "None"
Replace String
${policyJson}
"policyType": "tsg_security"
"policyType": "${policyType}"
ELSE
Set Variable
${policyJson}
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"policyType": "tsg_security"
"policyType": "${policyType}"
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestintercept", "policyType": "tsg_security", "action": "allow", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc": "a...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
action
${return}
${action}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
action
${return} = PASS
${action} = intercept
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${action}" != "None"
Replace String
${policyJson}
"action": "allow"
"action": "${action}"
ELSE
Set Variable
${policyJson}}
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"action": "allow"
"action": "${action}"
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestintercept", "policyType": "tsg_security", "action": "intercept", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc"...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
method
${return}
${method}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
method
Dictionary does not contain key 'method'.
${return} = FAIL
${method} = Dictionary does not contain key 'method'.
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
userTags
${return}
${userTags}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
userTags
${return} = PASS
${userTags} =
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${userTags}" != "None"
Replace String
${policyJson}
"userTags": null
"userTags": ${userTags}
ELSE
Set Variable
${policyJson}
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"userTags": null
"userTags": ${userTags}
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestintercept", "policyType": "tsg_security", "action": "intercept", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc"...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
doBlacklist
${return}
${doBlacklist}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
doBlacklist
${return} = PASS
${doBlacklist} = 0
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${doBlacklist}" != "None"
Replace String
${policyJson}
"doBlacklist": 0
"doBlacklist": ${doBlacklist}
ELSE
Set Variable
${policyJson}
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"doBlacklist": 0
"doBlacklist": ${doBlacklist}
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestintercept", "policyType": "tsg_security", "action": "intercept", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc"...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
doLog
${return}
${doLog}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
doLog
${return} = PASS
${doLog} = 1
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${doLog}" != "None"
Replace String
${policyJson}
"doLog": 1
"doLog": ${doLog}
ELSE
Set Variable
${policyJson}
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"doLog": 1
"doLog": ${doLog}
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestintercept", "policyType": "tsg_security", "action": "intercept", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc"...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
policyDesc
${return}
${policyDesc}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
policyDesc
${return} = PASS
${policyDesc} = autotest
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${policyDesc}" != "None"
Replace String
${policyJson}
"policyDesc": "autotest"
"policyDesc": "${policyDesc}"
ELSE
Set Variable
${policyJson}
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"policyDesc": "autotest"
"policyDesc": "${policyDesc}"
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestintercept", "policyType": "tsg_security", "action": "intercept", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc"...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
effectiveRange
${return}
${effectiveRange}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
effectiveRange
${return} = PASS
${effectiveRange} = None
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${effectiveRange}" != "None"
Replace String
${policyJson}
"effectiveRange": null
"effectiveRange": ${effectiveRange}
ELSE
Replace String
${policyJson}
"effectiveRange": null
"effectiveRange": {}
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"effectiveRange": null
"effectiveRange": {}
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestintercept", "policyType": "tsg_security", "action": "intercept", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc"...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
userRegion
${return}
${userRegion}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
userRegion
${return} = PASS
${userRegion} = None
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
code
${return}
${code}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
code
Dictionary does not contain key 'code'.
${return} = FAIL
${code} = Dictionary does not contain key 'code'.
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
message
${return}
${message}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
message
Dictionary does not contain key 'message'.
${return} = FAIL
${message} = Dictionary does not contain key 'message'.
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
html_profile
${return}
${html_profile}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
html_profile
Dictionary does not contain key 'html_profile'.
${return} = FAIL
${html_profile} = Dictionary does not contain key 'html_profile'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${html_profile}" != "None"
Set Variable
${html_profile}
ELSE
Set Variable
${message}
${message}
Returns the given values which can then be assigned to a variables.
${message}
${message} = Dictionary does not contain key 'message'.
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${html_profile}" != "None"
Set Variable
html_profile
ELSE
Set Variable
message
${messageKey}
Returns the given values which can then be assigned to a variables.
message
${messageKey} = message
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
keyring
${return}
${keyring}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
keyring
${return} = PASS
${keyring} = 1
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${keyring}" != "None"
Set Variable
${keyring}
ELSE
Set Variable
""
${keyring}
Returns the given values which can then be assigned to a variables.
${keyring}
${keyring} = 1
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
decryption
${return}
${decryption}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
decryption
${return} = PASS
${decryption} = 1
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${decryption}" != "None"
Set Variable
${decryption}
ELSE
Set Variable
""
${decryption}
Returns the given values which can then be assigned to a variables.
${decryption}
${decryption} = 1
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
decrypt_mirror
${return}
${decrypt_mirror}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
decrypt_mirror
${return} = PASS
${decrypt_mirror} = {'enable': 1, 'mirror_profile': 493}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${decrypt_mirror}" != "None"
Set Variable
${decrypt_mirror}
ELSE
Set Variable
""
${decrypt_mirror}
Returns the given values which can then be assigned to a variables.
${decrypt_mirror}
${decrypt_mirror} = {'enable': 1, 'mirror_profile': 493}
Serialize ``obj`` to a JSON formatted ``str``.
${decrypt_mirror}
${decrypt_mirror}
${decrypt_mirror} = {"enable": 1, "mirror_profile": 493}
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
appIdObjects
${return}
${appIdObjects}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
appIdObjects
${return} = PASS
${appIdObjects} = ['http', 'ssl']
Returns a list containing given items.
${appIdObjectIds}
${appIdObjectIds} = []
Displays the given messages in the log file as keyword arguments.
userRegionStr由:动作,协议,动作参数等决定,待完成;userregion在allow,monitor动作时多个协议为空;deny,多个协议时为子动作;Intercept,多个协议为空;http为,ssl为,判断appid对象的个数。
Returns the given values which can then be assigned to a variables.
${userRegionStr}
${userRegionStr} =
Returns a value from the given ``dictionary`` based on the given ``key``.
${objprotol}
${key}
${appObjId}
${appObjId} = 75744
Adds ``values`` to the end of ``list``.
${appIdObjectIds}
${appObjId}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${method}" == "block" or "${method}" == "alert"
Set Variable
{"protocol":"${key}","method": "${method}","code":${code},"${messageKey}":${message}}
ELSE IF
"${action}" == "deny"
Set Variable
{"protocol":"${key}","method": "${method}"}
ELSE IF
"${action}" == "intercept" and "${key}" == "ssl"
Set Variable
{"protocol":"SSL","keyring": ${keyring},"decryption":${decryption},"decrypt_mirror":${decrypt_mirror}}
ELSE
Set Variable
{"protocol":"HTTP"}
${userRegionStr}
Returns the given values which can then be assigned to a variables.
{"protocol":"HTTP"}
${userRegionStr} = {"protocol":"HTTP"}
Returns a value from the given ``dictionary`` based on the given ``key``.
${objprotol}
${key}
${appObjId}
${appObjId} = 77159
Adds ``values`` to the end of ``list``.
${appIdObjectIds}
${appObjId}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${method}" == "block" or "${method}" == "alert"
Set Variable
{"protocol":"${key}","method": "${method}","code":${code},"${messageKey}":${message}}
ELSE IF
"${action}" == "deny"
Set Variable
{"protocol":"${key}","method": "${method}"}
ELSE IF
"${action}" == "intercept" and "${key}" == "ssl"
Set Variable
{"protocol":"SSL","keyring": ${keyring},"decryption":${decryption},"decrypt_mirror":${decrypt_mirror}}
ELSE
Set Variable
{"protocol":"HTTP"}
${userRegionStr}
Returns the given values which can then be assigned to a variables.
{"protocol":"SSL","keyring": ${keyring},"decryption":${decryption},"decrypt_mirror":${decrypt_mirror}}
${userRegionStr} = {"protocol":"SSL","keyring": 1,"decryption":1,"decrypt_mirror":{"enable": 1, "mirror_profile": 493}}
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${appIdObjects}" != "None"
Replace String
${policyJson}
"appIdObjects": [null]
"appIdObjects": ${appIdObjectIds}
ELSE
Set Variable
${policyJson}
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"appIdObjects": [null]
"appIdObjects": ${appIdObjectIds}
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestintercept", "policyType": "tsg_security", "action": "intercept", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc"...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"userRegion": null
"userRegion": ${userRegionStr}
${policyJson}
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestintercept", "policyType": "tsg_security", "action": "intercept", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc"...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"userRegion": null
"userRegion": {}
${policyJson}
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestintercept", "policyType": "tsg_security", "action": "intercept", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc"...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
appSelectorObjects
${return}
${appSelectorObjects}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
appSelectorObjects
${return} = PASS
${appSelectorObjects} = None
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL"
Set Variable
${appSelectorObjects}
ELSE
Set Variable
${EMPTY}
${appSelectorObjects}
Returns the given values which can then be assigned to a variables.
${appSelectorObjects}
${appSelectorObjects} = None
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${appSelectorObjects}" != "None"
Replace String
${policyJson}
"appSelectorObjects": "add"
"appSelectorObjects": ${appSelectorObjects}
ELSE
Set Variable
${policyJson}
${policyJson}
Returns the given values which can then be assigned to a variables.
${policyJson}
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestintercept", "policyType": "tsg_security", "action": "intercept", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc"...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
isValid
${return}
${isValid}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
isValid
${return} = PASS
${isValid} = 1
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL"
Set Variable
${isValid}
ELSE
Set Variable
${EMPTY}
${appSelectorObjects}
Returns the given values which can then be assigned to a variables.
${isValid}
${appSelectorObjects} = 1
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${isValid}" != "None"
Replace String
${policyJson}
"isValid": 1
"isValid": ${isValid}
ELSE
Set Variable
${policyJson}
${policyJson}
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
"isValid": 1
"isValid": ${isValid}
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestintercept", "policyType": "tsg_security", "action": "intercept", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc"...
Runs the given keyword with the given arguments and ignores possible error.
Get From Dictionary
${policyData}
scheduleId
${return}
${scheduleId}
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyData}
scheduleId
${return} = PASS
${scheduleId} = None
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL"
Set Variable
${scheduleId}
ELSE
Set Variable
${EMPTY}
${scheduleId}
Returns the given values which can then be assigned to a variables.
${scheduleId}
${scheduleId} = None
Runs the given keyword with the given arguments, if ``condition`` is true.
"${return}"!="FAIL" and "${scheduleId}" != "None"
Replace String
${policyJson}
"scheduleId": [null]
"scheduleId": ${scheduleId}
ELSE
Set Variable
${policyJson}
${policyJson}
Returns the given values which can then be assigned to a variables.
${policyJson}
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestintercept", "policyType": "tsg_security", "action": "intercept", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc"...
Replaces ``search_for`` in the given ``string`` with ``replace_with``.
${policyJson}
[null]
[]
${policyJson}
${policyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestintercept", "policyType": "tsg_security", "action": "intercept", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc"...
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
${policyJson}
${policyJson}
${policyJson} = {'opAction': 'add', 'returnData': '1', 'policyList': {'policyName': 'autotestintercept', 'policyType': 'tsg_security', 'action': 'intercept', 'userTags': '', 'doBlacklist': 0, 'doLog': 1, 'policyDesc'...
场景策略:secuiryt、proxy策略
数据分离,测试数据来自对应的yaml文件
参数 ${policyList}
${policyJson}
${policyIds}
Displays the given messages in the log file as keyword arguments.
参数
${filepath}读取文件路径
${filename}读取文件名
${keywords}获取数据关键字
Displays the given messages in the log file as keyword arguments.
创建策略
Returns a value from the given ``dictionary`` based on the given ``key``.
${policyList}
returnData
${returnData}
${returnData} = 1
Serialize ``obj`` to a JSON formatted ``str``.
${policyList}
${bodyJson}
${bodyJson} = {"opAction": "add", "returnData": "1", "policyList": {"policyName": "autotestintercept", "policyType": "tsg_security", "action": "intercept", "userTags": "", "doBlacklist": 0, "doLog": 1, "policyDesc"...
${policyUrl}
${bodyJson}
${version2}
${response}
Returns the given values which can then be assigned to a variables.
{"Authorization":"${token}","Content-Type":"application/json"}
${headers}
${headers} = {"Authorization":"e7e248dc-6514-4437-aad8-c80d27ac5ea1&425&","Content-Type":"application/json"}
Create Session: create a HTTP session to a server
api
http://${host}:${port}/${apiVersion}
${headers}
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
Send a POST request on the session object found using the
given `alias`
api
${requestUri}
data=${data}
${response}
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
${response} = <Response [200]>
Logs the given message with the given level.
return data =${response}
return data =<Response [200]>
Fails if objects are unequal after converting them to strings.
${response.status_code}
200
Argument types are:
<class 'int'>
<type 'unicode'>
Convert a string to a JSON object
${response.content}
${response}
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
}
To JSON using : pretty_print=False
${response} = {'code': 200, 'msg': 'Success', 'data': {'policyList': [{'action': 'intercept', 'appIdObjects': [75744, 77159], 'appSelectorObjects': [], 'destination': [{'objectId': 107903, 'protocolField': 'TSG_SEC...
${response} = {'code': 200, 'msg': 'Success', 'data': {'policyList': [{'action': 'intercept', 'appIdObjects': [75744, 77159], 'appSelectorObjects': [], 'destination': [{'objectId': 107903, 'protocolField': 'TSG_SEC...
Runs the given keyword with the given arguments, if ``condition`` is true.
"${returnData}" == "1"
GetPolicyIds
${response}
ELSE
Create List
${policyIds}
获取结果中的策略类型及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]}]
${response}
Returns a list containing given items.
${policyIds}
${policyIds} = []
Returns a list containing given items.
${policy['policyId']}
${policyIdList}
${policyIdList} = [52342]
Creates and returns a dictionary based on the given ``items``.
policyType=${policy['policyType']}
policyIds=${policyIdList}
${policyObj}
${policyObj} = {'policyType': 'tsg_security', 'policyIds': [52342]}
Adds ``values`` to the end of ``list``.
${policyIds}
${policyObj}
Logs the given message with the given level.
${policyIds}
[{'policyType': 'tsg_security', 'policyIds': [52342]}]
${policyIds} = [{'policyType': 'tsg_security', 'policyIds': [52342]}]
Returns the given values which can then be assigned to a variables.
${response['code']}
${rescode}
${rescode} = 200
Fails if objects are unequal after converting them to strings.
${rescode}
200
Argument types are:
<class 'int'>
<type 'unicode'>
${policyIds} = [{'policyType': 'tsg_security', 'policyIds': [52342]}]
${objectId} = [107896, 107897, 107898, 107899, 107900, 107901, 107902, 107903, 107904, 107905]
${policyId} = [{'policyType': 'tsg_security', 'policyIds': [52342]}]
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${objectIds}
${objectId}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
把${addList}逐个添加到${souceList},然后返回 ${souceList}
入参:${souceList} ${addList}
出:参${souceList}
${policyIds}
${policyId}
Displays the given messages in the log file as keyword arguments.
参数${objids}拼接后的list;参数${objectIds}对象ids
Displays the given messages in the log file as keyword arguments.
如果参数${objectIds}返回多个id则逐个添加
Adds ``values`` to the end of ``list``.
${souceList}
${objdict}
${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,...
${policyIds} = [{'policyType': 'tsg_security', 'policyIds': [52340]}, {'policyType': 'tsg_security', 'policyIds': [52341]}, {'policyType': 'tsg_security', 'policyIds': [52342]}]
admission
basic
adc_api
adc_log
adc_verify
tsg_adc
tsg_adc_wp
tsg_bf_api
tsg_device
Runs the given keyword with the given arguments, if ``condition`` is true.
'${loginType}' == 'api'
BifangLogoutAndDelLocalIP
ELSE IF
'${loginType}' != '${None}'
UiLogoutAndDelLocalIP
tsg_adc
tsg_bf_api
Logs the given message with the given level.
ApiLogoutAndDelLocalIP
ApiLogoutAndDelLocalIP
Logs the given message with the given level.
to_LogoutAndDelLocalIP_LogoutAndDelLocalIP
to_LogoutAndDelLocalIP_LogoutAndDelLocalIP
Runs the given keyword with the given arguments, if ``condition`` is true.
${addTsgUIAPIFlag}==1
SecurityPolicyAllowTSGUIAPIDEL
Runs the given keyword with the given arguments, if ``condition`` is true.
${addTestClentIPFlag}==1
DelLocalIPObject
tsg_adc
tsg_bf_api
http
*Sends a POST request to the endpoint.*
/${version}/user/logout
headers=${headers}
assertions
*Asserts the field as JSON object.*
response body
assertions
*Asserts the field as JSON integer.*
$.code
200
assertions
*Asserts the field as JSON integer.*
$.code
${rescode}
${rescode} = [200]
Critical Tests
All Tests
admission
basic
Gap Tsg Api
Gap Tsg Api.Case
Gap Tsg Api.Case.Security
Gap Tsg Api.Case.Security.Http
Gap Tsg Api.Case.Security.Http.Demo
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.