!89 add an interface to obtain kernrel information
From: @xuezhizone Reviewed-by: @xingwei-liu Signed-off-by: @xingwei-liu
This commit is contained in:
commit
af94853881
46
0036-add-an-interface-to-obtain-kernel-information.patch
Normal file
46
0036-add-an-interface-to-obtain-kernel-information.patch
Normal file
@ -0,0 +1,46 @@
|
||||
From b3450704f0ebc4092848a0764d888898a47cece7 Mon Sep 17 00:00:00 2001
|
||||
From: lixin <lixinb@uniontech.com>
|
||||
Date: Fri, 10 Nov 2023 14:02:24 +0800
|
||||
Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=86=85=E6=A0=B8=E6=95=B0?=
|
||||
=?UTF-8?q?=E6=8D=AE=E6=8E=A5=E5=8F=A3?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
---
|
||||
index.py | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/index.py b/index.py
|
||||
index f0bf10d..f6a171f 100644
|
||||
--- a/index.py
|
||||
+++ b/index.py
|
||||
@@ -31,6 +31,7 @@ mods = {
|
||||
'delete_host_info': server.delete_host_info,
|
||||
'check_info': migration.check_info,
|
||||
'check_kernel': migration.check_kernel,
|
||||
+ 'get_kernel_data': server.get_kernel_data,
|
||||
}
|
||||
|
||||
|
||||
@@ -110,6 +111,17 @@ def check_kernel():
|
||||
return Response(mod, content_type='application/json')
|
||||
|
||||
|
||||
+@app.route('/get_kernel_data', methods=['GET', 'POST'])
|
||||
+def get_kernel_data():
|
||||
+ """
|
||||
+ 获取系统内核和仓库内核版本
|
||||
+ :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
|
||||
Version: 1.0.2
|
||||
Release: 35
|
||||
Release: 36
|
||||
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
|
||||
@ -42,7 +42,7 @@ Patch32: 0032-add-migration.py-to-migration-function.patch
|
||||
Patch33: 0033-check-system-kernrel.patch
|
||||
Patch34: 0034-add-centos7-and-centos8-migration-interface.patch
|
||||
Patch35: 0035-the-migration-process-can-choose-not-to-migrate-the-kernel.patch
|
||||
|
||||
Patch36: 0036-add-an-interface-to-obtain-kernel-information.patch
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: systemd
|
||||
@ -141,6 +141,9 @@ rm -rf /usr/bin/migration-tools
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-36
|
||||
- 0036-add-an-interface-to-obtain-kernel-information.patch
|
||||
|
||||
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-35
|
||||
- 0035-the-migration-process-can-choose-not-to-migrate-the-kernel.patch
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user