1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-04 22:28:12 +00:00
gns3-server/gns3server/api/routes/controller/__init__.py

143 lines
3.5 KiB
Python
Raw Normal View History

2020-10-02 06:37:50 +00:00
#
# Copyright (C) 2020 GNS3 Technologies Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from fastapi import APIRouter, Depends
2020-10-02 06:37:50 +00:00
from . import controller
from . import appliances
from . import computes
from . import drawings
from . import gns3vm
from . import links
from . import nodes
from . import notifications
from . import projects
from . import snapshots
from . import symbols
from . import templates
from . import images
from . import users
2021-05-15 05:40:02 +00:00
from . import groups
2021-05-25 09:04:59 +00:00
from . import roles
from . import permissions
2020-10-02 06:37:50 +00:00
from .dependencies.authentication import get_current_active_user
2020-10-02 06:37:50 +00:00
router = APIRouter()
2020-10-24 05:05:53 +00:00
router.include_router(controller.router, tags=["Controller"])
router.include_router(users.router, prefix="/users", tags=["Users"])
2021-05-15 05:40:02 +00:00
router.include_router(
groups.router,
dependencies=[Depends(get_current_active_user)],
prefix="/groups",
tags=["Users groups"]
)
router.include_router(
2021-05-25 09:04:59 +00:00
roles.router,
dependencies=[Depends(get_current_active_user)],
2021-05-25 09:04:59 +00:00
prefix="/roles",
tags=["Roles"]
)
router.include_router(
2021-05-27 07:58:44 +00:00
permissions.router,
dependencies=[Depends(get_current_active_user)],
2021-05-25 09:04:59 +00:00
prefix="/permissions",
tags=["Permissions"]
)
router.include_router(
images.router,
dependencies=[Depends(get_current_active_user)],
prefix="/images",
tags=["Images"]
)
router.include_router(
2021-05-25 09:04:59 +00:00
templates.router,
dependencies=[Depends(get_current_active_user)],
prefix="/templates",
2021-05-25 09:04:59 +00:00
tags=["Templates"]
)
router.include_router(
2021-05-25 09:04:59 +00:00
projects.router,
dependencies=[Depends(get_current_active_user)],
2021-05-25 09:04:59 +00:00
prefix="/projects",
tags=["Projects"])
router.include_router(
nodes.router,
dependencies=[Depends(get_current_active_user)],
prefix="/projects/{project_id}/nodes",
tags=["Nodes"]
)
router.include_router(
links.router,
dependencies=[Depends(get_current_active_user)],
prefix="/projects/{project_id}/links",
tags=["Links"]
)
router.include_router(
2021-05-25 09:04:59 +00:00
drawings.router,
dependencies=[Depends(get_current_active_user)],
2021-05-25 09:04:59 +00:00
prefix="/projects/{project_id}/drawings",
tags=["Drawings"])
router.include_router(
symbols.router,
prefix="/symbols", tags=["Symbols"]
)
router.include_router(
2021-05-25 09:04:59 +00:00
snapshots.router,
dependencies=[Depends(get_current_active_user)],
2021-05-25 09:04:59 +00:00
prefix="/projects/{project_id}/snapshots",
tags=["Snapshots"])
router.include_router(
2021-05-25 09:04:59 +00:00
computes.router,
dependencies=[Depends(get_current_active_user)],
2021-05-25 09:04:59 +00:00
prefix="/computes",
tags=["Computes"]
)
router.include_router(
2021-05-25 09:04:59 +00:00
notifications.router,
dependencies=[Depends(get_current_active_user)],
2021-05-25 09:04:59 +00:00
prefix="/notifications",
tags=["Notifications"])
router.include_router(
2021-05-25 09:04:59 +00:00
appliances.router,
dependencies=[Depends(get_current_active_user)],
2021-05-25 09:04:59 +00:00
prefix="/appliances",
tags=["Appliances"]
)
router.include_router(
2021-05-25 09:04:59 +00:00
gns3vm.router,
deprecated=True,
dependencies=[Depends(get_current_active_user)],
2021-05-25 09:04:59 +00:00
prefix="/gns3vm",
tags=["GNS3 VM"]
)