Rest framework (#24)

* Add rest framework for API: First Commit

* modify some shell scripts to make variable references safer; modify some python scripts to reduce the code complexity and cyclomatic complexity of functions.

* Add REST API for some webvirtcloud functions. Instance list/delete/create, compute list/delete/create, storages-network list/retrieve. Add swagger and redoc for API interface

* update requirements

Co-authored-by: herengui <herengui@uniontech.com>
This commit is contained in:
catborise
2022-08-22 15:12:33 +03:00
committed by GitHub
parent 92254401dc
commit cfce71ec2b
42 changed files with 1170 additions and 348 deletions

View File

@@ -22,10 +22,12 @@ INSTALLED_APPS = [
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
"rest_framework",
"django_bootstrap5",
"django_icons",
"django_otp",
"django_otp.plugins.otp_totp",
"drf_yasg",
"accounts",
"admin",
"appsettings",
@@ -40,6 +42,7 @@ INSTALLED_APPS = [
"virtsecrets",
"logs",
"qr_code",
"rest_framework",
]
MIDDLEWARE = [
@@ -211,7 +214,7 @@ SOCKETIO_PUBLIC_PORT = 6081
SOCKETIO_PUBLIC_PATH = "socket.io/"
# List of console listen addresses
QEMU_CONSOLE_LISTEN_ADDRESSES = (
QEMU_CONSOLE_LISTENER_ADDRESSES = (
("127.0.0.1", "Localhost"),
("0.0.0.0", "All interfaces"),
)