Skip to content
Snippets Groups Projects
Commit de05845d authored by ml bonhomme's avatar ml bonhomme :bee: Committed by Erwan Rouchet
Browse files

Document RetrieveAgentActions query params

parent 278d4f50
No related branches found
No related tags found
1 merge request!2109Document RetrieveAgentActions query params
......@@ -6,7 +6,7 @@ from textwrap import dedent
from django.db.models import Count, Q
from django.shortcuts import get_object_or_404, redirect
from django.utils import timezone
from drf_spectacular.utils import OpenApiExample, extend_schema, extend_schema_view
from drf_spectacular.utils import OpenApiExample, OpenApiParameter, extend_schema, extend_schema_view
from rest_framework.authentication import SessionAuthentication, TokenAuthentication
from rest_framework.exceptions import ValidationError
from rest_framework.generics import (
......@@ -213,7 +213,23 @@ class AgentsState(ListAPIView):
)
@extend_schema(tags=["ponos"])
@extend_schema(
tags=["ponos"],
parameters=[
OpenApiParameter(
'cpu_load',
type=float,
description="Current CPU usage for this agent",
required=True
),
OpenApiParameter(
'ram_load',
type=float,
description="Current RAM usage for this agent",
required=True
),
]
)
class AgentActions(RetrieveAPIView):
"""
Fetch the next actions an agent should perform.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment