From d8386d00efeabd5ee6a4eb0d2103db3a15637891 Mon Sep 17 00:00:00 2001 From: xuezhixin Date: Wed, 6 Nov 2024 16:10:52 +0800 Subject: [PATCH] add envirnment detection interface before migration --- ...detection-interface-before-migration.patch | 54 +++++++++++++++++++ migration-tools.spec | 7 ++- 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 0055-add-envirnment-detection-interface-before-migration.patch diff --git a/0055-add-envirnment-detection-interface-before-migration.patch b/0055-add-envirnment-detection-interface-before-migration.patch new file mode 100644 index 0000000..0f4155f --- /dev/null +++ b/0055-add-envirnment-detection-interface-before-migration.patch @@ -0,0 +1,54 @@ +From 25a688b1ada05e7bf2a713cbdac2df127dbf7104 Mon Sep 17 00:00:00 2001 +From: lixin +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 + diff --git a/migration-tools.spec b/migration-tools.spec index 005204d..ba8e97f 100644 --- a/migration-tools.spec +++ b/migration-tools.spec @@ -1,6 +1,6 @@ Name: migration-tools Version: 1.0.2 -Release: 54 +Release: 55 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 @@ -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 Patch53: 0053-get-repository-detection-result.patch Patch54: 0054-removed-detection-abi-script.patch +Patch55: 0055-add-envirnment-detection-interface-before-migration.patch + BuildArch: noarch @@ -160,6 +162,9 @@ rm -rf /usr/bin/migration-tools %endif %changelog +* Tue Nov 5 2024 xuezhixin - 1.0.2-55 +- 0055-add-envirnment-detection-interface-before-migration.patch + * Tue Nov 5 2024 xuezhixin - 1.0.2-54 - 0054-removed-detection-abi-script.patch -- Gitee