!109 modify detectyion envirnmnet interface
From: @xuezhizone Reviewed-by: @xingwei-liu Signed-off-by: @xingwei-liu
This commit is contained in:
commit
43562a019c
45
0056-modify-detection-envirnment-interface.patch
Normal file
45
0056-modify-detection-envirnment-interface.patch
Normal file
@ -0,0 +1,45 @@
|
||||
From f4604d225a9db3e9c18c3eb8de5cde28cd7c2c55 Mon Sep 17 00:00:00 2001
|
||||
From: lixin <lixinb@uniontech.com>
|
||||
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
|
||||
|
||||
@ -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 <xuezhixin@uniontech.com> - 1.0.2-56
|
||||
- 0056-modify-detection-envirnment-interface.patch
|
||||
|
||||
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-55
|
||||
- 0055-add-envirnment-detection-interface-before-migration.patch
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user