From 92a8793c4c1976310a9885476f4177ed8623bade Mon Sep 17 00:00:00 2001 From: xuezhixin Date: Wed, 6 Nov 2024 16:15:49 +0800 Subject: [PATCH] modify detectyion envirnmnet interface --- ...odify-detection-envirnment-interface.patch | 45 +++++++++++++++++++ migration-tools.spec | 7 ++- 2 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 0056-modify-detection-envirnment-interface.patch diff --git a/0056-modify-detection-envirnment-interface.patch b/0056-modify-detection-envirnment-interface.patch new file mode 100644 index 0000000..9776dd3 --- /dev/null +++ b/0056-modify-detection-envirnment-interface.patch @@ -0,0 +1,45 @@ +From f4604d225a9db3e9c18c3eb8de5cde28cd7c2c55 Mon Sep 17 00:00:00 2001 +From: lixin +Date: Mon, 13 Nov 2023 09:52:09 +0800 +Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=8E=AF=E5=A2=83=E6=A3=80?= + =?UTF-8?q?=E6=9F=A5=E6=8E=A5=E5=8F=A3?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +--- + views/migration.py | 18 +++++++++++++++--- + 1 file changed, 15 insertions(+), 3 deletions(-) + +diff --git a/views/migration.py b/views/migration.py +index a628694..b7eaefa 100644 +--- a/views/migration.py ++++ b/views/migration.py +@@ -88,9 +88,21 @@ def check_services(data, url): + + + def check_environment(data): +- services = check_services(data, '/check_environment') +- if services: +- return services ++ """ ++ agent迁移前环境检查任务 ++ :param data: ++ :return: ++ """ ++ agent_ip_list = json.loads(data).get('agent_ip') ++ data = json.loads(data) ++ url = '/check_environment' ++ for i in agent_ip_list: ++ get_task_id_sql = "select task_id from cur_task where agent_ip='%s'" % i ++ task_id = DBHelper().execute(get_task_id_sql).fetchall() ++ data['task_id'] = task_id[0][0] ++ json_data = json.dumps(data) ++ send_task_to_agent(json_data, url, i) ++ return 'success' + + + def check_os(data): +-- +2.20.1 + diff --git a/migration-tools.spec b/migration-tools.spec index ba8e97f..4d47d8a 100644 --- a/migration-tools.spec +++ b/migration-tools.spec @@ -1,6 +1,6 @@ Name: migration-tools Version: 1.0.2 -Release: 55 +Release: 56 License: MulanPSL-2.0 Summary: A tool to help users migrate the Centos system to the UOS system and openEuler system Source0: %{name}-%{version}.tar.gz @@ -62,7 +62,7 @@ Patch52: 0052-increase-the-weight-of-abi-detection-result.patch Patch53: 0053-get-repository-detection-result.patch Patch54: 0054-removed-detection-abi-script.patch Patch55: 0055-add-envirnment-detection-interface-before-migration.patch - +Patch56: 0056-modify-detection-envirnment-interface.patch BuildArch: noarch @@ -162,6 +162,9 @@ rm -rf /usr/bin/migration-tools %endif %changelog +* Tue Nov 5 2024 xuezhixin - 1.0.2-56 +- 0056-modify-detection-envirnment-interface.patch + * Tue Nov 5 2024 xuezhixin - 1.0.2-55 - 0055-add-envirnment-detection-interface-before-migration.patch -- Gitee