Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat new server implementation #131

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

SteBaum
Copy link

@SteBaum SteBaum commented Jan 9, 2024

Discussion

This PR is a server started from scratch.

Choice between two different endpoint specifications regarding the url path and categorization:

Choice 1
configurations
GET: /api/v1/configurations
GET: /api/v1/configurations/history
GET: /api/v1/configurations/validate
GET: /api/v1/configurations/services
GET: /api/v1/configurations/services/{service_id}
PUT: /api/v1/configurations/services/{service_id}
GET: /api/v1/configurations/services/{service_id}/variables
PUT: /api/v1/configurations/services/{service_id}/variables
PATCH: /api/v1/configurations/services/{service_id}/variables
GET: /api/v1/configurations/services/{service_id}/schema
GET: /api/v1/configurations/services{service_id}/history
GET: /api/v1/configurations/services/{service_id}/components
GET: /api/v1/configurations/services/{service_id}/components/{component_id}
PUT: /api/v1/configurations/services/{service_id}/components/{component_id}
GET: /api/v1/configurations/services/{service_id}/components/{component_id}/variables
PUT: /api/v1/configurations/services/{service_id}/components/{component_id}/variables
PATCH: /api/v1/configurations/services/{service_id}/components/{component_id}/variables
GET: /api/v1/configurations/services/{service_id}/components/{component_id}/history

deployments
GET: /api/v1/deployments
GET: /api/v1/deployments/{deployement_id}
GET: /api/v1/deployments/{deployement_id}/operations/{operation_order}

deploy
POST: /api/v1/deploy
GET: /api/v1/deploy

operations
GET: /api/v1/operations

plan
GET: /api/v1/plan
POST: /api/v1/plan/dag
POST: /api/v1/plan/operations
POST: /api/v1/plan/resume
POST: /api/v1/plan/reconfigure
POST: /api/v1/plan/import
POST: /api/v1/plan/custom

default
GET: /
Choice 2

The configurations category has been splitted in two categories status and variables. The rest is identical; below are the changes :

status
GET: /api/v1/status
GET: /api/v1/status/history
GET: /api/v1/status/{service_id}
PUT: /api/v1/status/{service_id}
GET: /api/v1/status/{service_id}/history]
GET: /api/v1/status/{service_id}/components
GET: /api/v1/status/{service_id}/components/{component_id}
PUT: /api/v1/status/{service_id}/components/{component_id}
GET: /api/v1/status/{service_id}/components/{component_id}/history

variables
GET: /api/v1/variables/validate
GET: /api/v1/variables/{service_id}
PUT: /api/v1/variables/{service_id}
PATCH: /api/v1/variables/{service_id}
GET: /api/v1/variables/{service_id}/schema
GET: /api/v1/variables/{service_id}/components/{component_id}
PUT: /api/v1/variables/{service_id}/components/{component_id}
PATCH: /api/v1/variables/{service_id}/components/{component_id}

Functionalities are identical in both versions, just the path and category is different. More details of the endpoints can be seen in the swagger.

To see the second choice in the swagger, modify line 5 in main.py from from tdp_server.api.v1.api import api_router to from tdp_server.api.v2.api import api_router.

Agreements

@SteBaum SteBaum force-pushed the feat-new-server-implementation branch from 2fe1597 to c5109ce Compare January 9, 2024 14:02
@SteBaum SteBaum force-pushed the feat-new-server-implementation branch from c5109ce to 784dfc4 Compare January 12, 2024 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant