diff options
| author | hebingning <[email protected]> | 2022-11-21 09:44:33 +0800 |
|---|---|---|
| committer | hebingning <[email protected]> | 2022-11-21 09:44:33 +0800 |
| commit | 2ebcadc6cba05fd2b8d8cc7d0ced403684feb330 (patch) | |
| tree | 2ea6b2b56c73edcd9726a706d98105f46486fb37 | |
| parent | 19cd5e94c7ebe83f2e41ab7a102a3d7dfffe1186 (diff) | |
| parent | b81e9cf3c2c2b6fc23d7faffafd2d331d858c4b3 (diff) | |
Merge branch 'develop' of https://git.mesalab.cn/dongxiaoyan/gap_tsg_api.git into develop
| -rw-r--r-- | control/business.py | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/control/business.py b/control/business.py index 2344f7b..4d9c6bd 100644 --- a/control/business.py +++ b/control/business.py @@ -809,7 +809,7 @@ def callbaock_upload_result_file(file_path, instructNo, tsglogger): r_callback_upload_file_test = json.loads(r_callback_upload_file.text, encoding="utf-8") except Exception as e: n += 1 - tsglogger.error("调用总结果{}的绝对路径接口失败".format(data)) + tsglogger.error("调用上传文件时,文件:{}上传失败".format(data)) tsglogger.error(e) tsglogger.error("异常:{}".format((traceback.format_exc()))) continue @@ -950,10 +950,16 @@ def generate_caselist_client_info_list(f_dict, execute_case_list, tsglogger): manageIp = item_dict["manageIp"] manageUser = item_dict["authUsername"] managePassword = base64.b64decode(item_dict["authPin"]).decode() + """ + ipv4和ipv6参数全部提取,直接使用下面提取即可 if item_dict["endpoints"][0]["ip"] != None or item_dict["endpoints"][0]["ip"] != "": operationIp = item_dict["endpoints"][0]["ip"] + ipv6OperationIp = item_dict["endpoints"][0]["ipv6"] else: - operationIp = item_dict["endpoints"][0]["ipv6"] + operationIp = item_dict["endpoints"][0]["ip"] + """ + operationIp = item_dict["endpoints"][0]["ip"] + ipv6OperationIp = item_dict["endpoints"][0]["ipv6"] client_filter_dict0["clientSystem"] = clientSystem client_filter_dict0["systemVersion"] = systemVersion @@ -965,6 +971,7 @@ def generate_caselist_client_info_list(f_dict, execute_case_list, tsglogger): client_filter_dict0["manageUser"] = manageUser client_filter_dict0["managePassword"] = managePassword client_filter_dict0["operationIp"] = operationIp + client_filter_dict0["ipv6OperationIp"] = ipv6OperationIp client_filter_list1.append(copy.deepcopy(client_filter_dict0)) client_info_list1 = client_filter_list1 tsglogger.debug(f"过程参数,client_info_list1:{client_info_list1}") @@ -1399,12 +1406,13 @@ def get_ip_by_udp(destip): if __name__ == "__main__": + file_path = ['/opt/test/automation/tasks/2022110911510003000153357442/report.html', '/opt/test/automation/tasks/2022110911510003000153357442/log.html', '/opt/test/automation/tasks/2022110911510003000153357442/output_2022110911510003000153357442.xml'] + instructNo = "2022110911510003000153357442" + tsglogger = tsglogger_fun(instructNo=instructNo) + callbaock_upload_result_file(file_path, instructNo, tsglogger) + print(21) - b = get_ip_by_udp("8.8.8.8") - print(b) - c = get_ip_by_udp("10.10.10.158") - print(c) + print(2222) - print(2222) |
