From cf2acf6619221a7ec1e4b2dcd0f3569f366bb30a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E7=92=90?= Date: Tue, 27 Feb 2024 15:55:14 +0800 Subject: [PATCH] Add get network monitoring information external interface to get_net_info.py --- category/get_net_info.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/category/get_net_info.py b/category/get_net_info.py index 95dc6aa..4d56f78 100644 --- a/category/get_net_info.py +++ b/category/get_net_info.py @@ -84,4 +84,12 @@ def __get_devices_info(self): for i,cmd_result in enumerate(res_list): split = '=' if i == len(res_list)-1 else '-' res += FileOperation.wrap_output_format(cmd_name, cmd_result, split) - return Command.cmd_write_file(res, self.__default_file_name) \ No newline at end of file + return Command.cmd_write_file(res, self.__default_file_name) + +def get_info(self): + ''' + Get network monitoring information external interface + ''' + if not self.__get_devices(): + return False + self.__get_devices_info() \ No newline at end of file -- Gitee