Skip to content

Commit

Permalink
fix: guest router configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex4386 committed Feb 8, 2021
1 parent 36120f6 commit 329fa2a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions API/v1/GuestMetrics/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from fastapi import APIRouter

from API.v1.GuestMetrics.info import router as _info_router

guest_router = APIRouter()
guest_router.include_router(_info_router, tags=["guest"])
4 changes: 2 additions & 2 deletions API/v1/GuestMetrics/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
from API.v1.GuestMetrics.serialize import serialize
from app.settings import Settings

guest_router = APIRouter()
router = APIRouter()


@guest_router.get("/{cluster_id}/guest/{guest_uuid}", tags=["guest"])
@router.get("/{cluster_id}/guest/{guest_uuid}", tags=["guest"])
async def guest_get_by_uuid(
cluster_id: str = Path(default=None, title="cluster_id", description="Cluster ID"),
guest_uuid: str = Path(default=None, title="guest_uuid", description="Guest UUID"),
Expand Down
2 changes: 1 addition & 1 deletion API/v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from XenGarden.session import create_session

from API.v1.Console import console_router
from API.v1.GuestMetrics.info import guest_router
from API.v1.GuestMetrics import guest_router
from API.v1.Host import host_router
from API.v1.root import root_router
from API.v1.SR import sr_router
Expand Down

0 comments on commit 329fa2a

Please sign in to comment.