代码拉取完成,页面将自动刷新
同步操作将从 openEuler/migration-tools 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
# SPDX-License-Identifier: MulanPubL-2.0-or-later
import json
from flask import Flask, request, Response
from func.share import *
from urls import agent_mods
app = Flask(__name__)
def check_methods():
if request.method == 'POST':
data = request.get_data()
json_data = json.loads(data)
mod = agent_mods.get(json_data['mod'])
if mod:
response_str = mod(data)
return response_str
@app.route('/check_environment', methods=['GET', 'POST'])
def mt_check_environment():
mod = check_methods()
if mod:
return Response(mod, content_type='application/json')
@app.route('/check_storage', methods=['GET', 'POST'])
def mt_check_storage():
mod = check_methods()
if mod:
return Response(mod, content_type='application/json')
@app.route('/check_os', methods=['GET', 'POST'])
def mt_check_os():
mod = check_methods()
if mod:
return Response(mod, content_type='application/json')
@app.route('/check_progress', methods=['GET', 'POST'])
def mt_check_progress():
mod = check_methods()
if mod:
return Response(mod, content_type='application/json')
@app.route('/check_user', methods=['GET', 'POST'])
def mt_check_user():
mod = check_methods()
if mod:
return Response(mod, content_type='application/json')
@app.route('/check_repo', methods=['GEt', 'POST'])
def mt_check_repo():
mod = check_methods()
if mod:
return Response(mod, content_type='application/json')
@app.route('/check_os_kernel', methods=['GET', 'POST'])
def mt_check_os_kernel():
mod = check_methods()
if mod:
return Response(mod, content_type='application/json')
@app.route('/check_repo_kernel', methods=['GET', 'POST'])
def mt_check_repo_kernel():
mod = check_methods()
if mod:
return Response(mod, content_type='application/json')
@app.route('/check_migration_progress', methods=['GET', 'POST'])
def mt_check_migration_progress():
mod = check_methods()
if mod:
return Response(mod, content_type='application/json')
@app.route('/export_migration_reports', methods=['GET', 'POST'])
def mt_export_migration_reports():
mod = check_methods()
if mod:
return Response(mod, content_type='application/json')
@app.route('/migration_details', methods=['GET', 'POST'])
def mt_migration_details():
mod = check_methods()
if mod:
return Response(mod, content_type='application/json')
@app.route('/system_migration', methods=['GET', 'POST'])
def mt_system_migration():
mod = check_methods()
if mod:
return Response(mod, content_type='application/json')
if __name__ == '__main__':
app.config["JSON_AS_ASCII"] = False
uos_sysmig_conf = json.loads(get_sysmig_conf())
ip = json.loads(uos_sysmig_conf).get('agentip').strip()[1:-1]
port = int(json.loads(uos_sysmig_conf).get('agentport').strip()[1:-1])
app.run(debug=True, host=ip, port=port)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。