Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GÉANT Service Orchestrator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GÉANT Orchestration and Automation Team
GAP
GÉANT Service Orchestrator
Merge requests
!215
Feature/nat 468 refactor auth
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Feature/nat 468 refactor auth
feature/NAT-468-refactor-auth
into
develop
Overview
0
Commits
8
Pipelines
13
Changes
5
Merged
Mohammad Torkashvand
requested to merge
feature/NAT-468-refactor-auth
into
develop
1 year ago
Overview
0
Commits
8
Pipelines
13
Changes
5
Expand
0
0
Merge request reports
Viewing commit
05f70d48
Prev
Next
Show latest version
5 files
+
3
−
94
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
Search (e.g. *.vue) (Ctrl+P)
05f70d48
remove proccess api
· 05f70d48
Mohammad Torkashvand
authored
10 months ago
gso/api/v1/processes.py deleted
100644 → 0
+
0
−
40
Options
"""
Process related endpoints.
"""
from
typing
import
Any
from
uuid
import
UUID
from
fastapi
import
APIRouter
,
Depends
,
HTTPException
,
status
from
orchestrator.db
import
ProcessStepTable
from
orchestrator.schemas.base
import
OrchestratorBaseModel
from
orchestrator.security
import
authorize
router
=
APIRouter
(
prefix
=
"
/processes
"
,
tags
=
[
"
Processes
"
],
dependencies
=
[
Depends
(
authorize
)])
class
CallBackResultsBaseModel
(
OrchestratorBaseModel
):
"""
Base model for callback results.
"""
callback_results
:
dict
@router.get
(
"
/steps/{step_id}/callback-results
"
,
status_code
=
status
.
HTTP_200_OK
,
response_model
=
CallBackResultsBaseModel
)
def
callback_results
(
step_id
:
UUID
)
->
dict
[
str
,
Any
]:
"""
Retrieve callback results for a specific process step.
:param step_id: The unique identifier of the process step.
:type step_id: UUID
:return: Dictionary containing callback results.
:rtype: dict[str, Any]
:raises HTTPException: 404 status code if the specified step_id is not found or if the
'
callback_result
'
key
is not present in the state.
"""
step
=
ProcessStepTable
.
query
.
filter
(
ProcessStepTable
.
step_id
==
step_id
).
first
()
if
not
(
step
and
step
.
state
.
get
(
"
callback_result
"
,
None
)):
raise
HTTPException
(
status_code
=
status
.
HTTP_404_NOT_FOUND
,
detail
=
"
Callback result not found.
"
)
return
{
"
callback_results
"
:
step
.
state
[
"
callback_result
"
]}
Loading