!108 add envirnment detection interface before migration
From: @xuezhizone Reviewed-by: @xingwei-liu Signed-off-by: @xingwei-liu
This commit is contained in:
commit
1c37fc22c6
@ -0,0 +1,54 @@
|
|||||||
|
From 25a688b1ada05e7bf2a713cbdac2df127dbf7104 Mon Sep 17 00:00:00 2001
|
||||||
|
From: lixin <lixinb@uniontech.com>
|
||||||
|
Date: Mon, 13 Nov 2023 09:44:30 +0800
|
||||||
|
Subject: [PATCH] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E5=89=8D=E7=8E=AF=E5=A2=83?=
|
||||||
|
=?UTF-8?q?=E6=A3=80=E6=B5=8B=E6=8E=A5=E5=8F=A3?=
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
---
|
||||||
|
index.py | 13 ++++++++++++-
|
||||||
|
1 file changed, 12 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/index.py b/index.py
|
||||||
|
index d76404e..2faae57 100644
|
||||||
|
--- a/index.py
|
||||||
|
+++ b/index.py
|
||||||
|
@@ -12,7 +12,6 @@ from flask import Flask, render_template, url_for, request, redirect, make_respo
|
||||||
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
mods = {
|
||||||
|
- 'check_environment': migration.check_environment,
|
||||||
|
'check_storage': migration.check_storage,
|
||||||
|
'check_os': migration.check_os,
|
||||||
|
'check_os_kernel': migration.check_os_kernel,
|
||||||
|
@@ -33,6 +32,7 @@ mods = {
|
||||||
|
'get_kernel_data': server.get_kernel_data,
|
||||||
|
'check_repo': migration.check_repo,
|
||||||
|
'get_repo_data': server.get_repo_data,
|
||||||
|
+ 'check_environment':migration.check_environment,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -145,6 +145,17 @@ def get_repo_data():
|
||||||
|
return Response(mod, content_type='application/json')
|
||||||
|
|
||||||
|
|
||||||
|
+@app.route('/check_environment', methods=['GET', 'POST'])
|
||||||
|
+def check_environment():
|
||||||
|
+ """
|
||||||
|
+ agent迁移前环境检查任务
|
||||||
|
+ :return:
|
||||||
|
+ """
|
||||||
|
+ mod = check_methods()
|
||||||
|
+ if mod:
|
||||||
|
+ return Response(mod, content_type='application/json')
|
||||||
|
+
|
||||||
|
+
|
||||||
|
@app.route('/', methods=['GET', 'POST'])
|
||||||
|
def MT_index():
|
||||||
|
"""
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: migration-tools
|
Name: migration-tools
|
||||||
Version: 1.0.2
|
Version: 1.0.2
|
||||||
Release: 54
|
Release: 55
|
||||||
License: MulanPSL-2.0
|
License: MulanPSL-2.0
|
||||||
Summary: A tool to help users migrate the Centos system to the UOS system and openEuler system
|
Summary: A tool to help users migrate the Centos system to the UOS system and openEuler system
|
||||||
Source0: %{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
@ -61,6 +61,8 @@ Patch51: 0051-add-basic-system-detection-information-and-upload-the-database.
|
|||||||
Patch52: 0052-increase-the-weight-of-abi-detection-result.patch
|
Patch52: 0052-increase-the-weight-of-abi-detection-result.patch
|
||||||
Patch53: 0053-get-repository-detection-result.patch
|
Patch53: 0053-get-repository-detection-result.patch
|
||||||
Patch54: 0054-removed-detection-abi-script.patch
|
Patch54: 0054-removed-detection-abi-script.patch
|
||||||
|
Patch55: 0055-add-envirnment-detection-interface-before-migration.patch
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
@ -160,6 +162,9 @@ rm -rf /usr/bin/migration-tools
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-55
|
||||||
|
- 0055-add-envirnment-detection-interface-before-migration.patch
|
||||||
|
|
||||||
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-54
|
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-54
|
||||||
- 0054-removed-detection-abi-script.patch
|
- 0054-removed-detection-abi-script.patch
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user