add param name_prefix to make name used by register_blueprint() unique
(cherry picked from commit 7202e1fafba777861b619ea236d1c6b6e038b651)
This commit is contained in:
parent
73a7b12cc8
commit
325129e244
@ -0,0 +1,32 @@
|
|||||||
|
From aaf6e6d7808f00ae0db6f1ef9c8d02fbd3f62319 Mon Sep 17 00:00:00 2001
|
||||||
|
From: zhouyihang <zhouyihang3@h-partners.com>
|
||||||
|
Date: Sat, 23 Aug 2022 15:54:15 -0500
|
||||||
|
Subject: [PATCH] add param name_prefix to make name used by register_blueprint() unique
|
||||||
|
|
||||||
|
---
|
||||||
|
src/pylorax/api/server.py | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/pylorax/api/server.py b/src/pylorax/api/server.py
|
||||||
|
index 1c42d94..fd2a9ff 100644
|
||||||
|
--- a/src/pylorax/api/server.py
|
||||||
|
+++ b/src/pylorax/api/server.py
|
||||||
|
@@ -85,7 +85,7 @@ def bad_request(error):
|
||||||
|
return jsonify(status=False, errors=[{ "id": HTTP_ERROR, "code": error.code, "msg": error.name }]), error.code
|
||||||
|
|
||||||
|
# Register the v0 API on /api/v0/
|
||||||
|
-server.register_blueprint(v0_api, url_prefix="/api/v0/")
|
||||||
|
+server.register_blueprint(v0_api, url_prefix="/api/v0/", name_prefix="v0")
|
||||||
|
|
||||||
|
# Register the v1 API on /api/v1/
|
||||||
|
# Use v0 routes by default
|
||||||
|
@@ -99,5 +99,5 @@ skip_rules = [
|
||||||
|
"/projects/source/info/<source_names>",
|
||||||
|
"/projects/source/new",
|
||||||
|
]
|
||||||
|
-server.register_blueprint(v0_api, url_prefix="/api/v1/", skip_rules=skip_rules)
|
||||||
|
-server.register_blueprint(v1_api, url_prefix="/api/v1/")
|
||||||
|
+server.register_blueprint(v0_api, url_prefix="/api/v1/", skip_rules=skip_rules, name_prefix="v1")
|
||||||
|
+server.register_blueprint(v1_api, url_prefix="/api/v1/", name_prefix="v1")
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
10
lorax.spec
10
lorax.spec
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
Name: lorax
|
Name: lorax
|
||||||
Version: 33.6
|
Version: 33.6
|
||||||
Release: 6
|
Release: 7
|
||||||
Summary: A set of tools used to create bootable images
|
Summary: A set of tools used to create bootable images
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: https://github.com/weldr/lorax
|
URL: https://github.com/weldr/lorax
|
||||||
@ -25,6 +25,7 @@ Patch12: backport-Improve-lmc-no-virt-error-handling.patch
|
|||||||
Patch13: backport-Add-POSTIN-scriptlet-error-to-the-log-monitor-list.patch
|
Patch13: backport-Add-POSTIN-scriptlet-error-to-the-log-monitor-list.patch
|
||||||
Patch14: backport-Remove-LD_PRELOAD-libgomp.so.1-from-lmc-no-virt.patch
|
Patch14: backport-Remove-LD_PRELOAD-libgomp.so.1-from-lmc-no-virt.patch
|
||||||
Patch15: backport-runtime-install-don-t-install-notification-daemon.patch
|
Patch15: backport-runtime-install-don-t-install-notification-daemon.patch
|
||||||
|
Patch16: add-param-name_prefix-to-make-name-used-by-register_blueprint-unique.patch
|
||||||
|
|
||||||
BuildRequires: python3-devel python3-sphinx_rtd_theme python3-magic
|
BuildRequires: python3-devel python3-sphinx_rtd_theme python3-magic
|
||||||
BuildRequires: python3-pytest python3-pytest-mock python3-pocketlint python3-gevent
|
BuildRequires: python3-pytest python3-pytest-mock python3-pocketlint python3-gevent
|
||||||
@ -132,6 +133,7 @@ build images, etc. from the command line.
|
|||||||
%patch13 -p1
|
%patch13 -p1
|
||||||
%patch14 -p1
|
%patch14 -p1
|
||||||
%patch15 -p1
|
%patch15 -p1
|
||||||
|
%patch16 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%make_build
|
%make_build
|
||||||
@ -213,6 +215,12 @@ getent passwd weldr >/dev/null 2>&1 || useradd -r -g weldr -d / -s /sbin/nologin
|
|||||||
%{_mandir}/man1/*.1*
|
%{_mandir}/man1/*.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Aug 13 2022 zhouyihang <zhouyihang3@h-partners.com> - 33.6-7
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:add param name_prefix to make name used by register_blueprint() unique
|
||||||
|
|
||||||
* Sat May 07 2022 gaihuiying <eaglegai@163.com> - 33.6-6
|
* Sat May 07 2022 gaihuiying <eaglegai@163.com> - 33.6-6
|
||||||
- use python3-pytest instead of python3-nose
|
- use python3-pytest instead of python3-nose
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user