Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arkindex
Backend
Commits
de05845d
Commit
de05845d
authored
1 year ago
by
ml bonhomme
Committed by
Erwan Rouchet
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Document RetrieveAgentActions query params
parent
278d4f50
No related branches found
No related tags found
1 merge request
!2109
Document RetrieveAgentActions query params
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
arkindex/ponos/api.py
+18
-2
18 additions, 2 deletions
arkindex/ponos/api.py
with
18 additions
and
2 deletions
arkindex/ponos/api.py
+
18
−
2
View file @
de05845d
...
...
@@ -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.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment