Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Add REST API base implementation #132

Merged
merged 1 commit into from
Nov 22, 2022
Merged

Add REST API base implementation #132

merged 1 commit into from
Nov 22, 2022

Conversation

F-X64
Copy link
Member

@F-X64 F-X64 commented Nov 22, 2022

This PR adds a new structure to the project:
src/rhelocator/api/
Hosts the REST API server creation logic and configuration environment.

..api/routes
Hosts the individual endpoints for GCP, (AWS, Azure not implemented yet)

..api/schema
Hosts the individual swagger schema definitions for GCP, (AWS, Azure not implemented yet)

What is missing?

  • AWS / Azure
  • production build of REST server
  • running the REST server in the entrypoint of the locator container

How to run the server:
poetry run rhelocator-updater serve --file-path

by default the server will start on 127.0.0.1:5000

API endpoints are reachable through
127.0.0.1:5000/api/gcp

Swagger documentation is available
http://127.0.0.1:5000/apidocs/

Notes:

  • had to deactivate mypy test of untyped decorators.

Solves #14 , #96
Enables #47, #128, #129, #130, #131

Copy link
Member

@miyunari miyunari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really nice to me! Thank you for doing this :)

@miyunari miyunari merged commit 4300929 into main Nov 22, 2022
@miyunari miyunari deleted the initialize-api-endpoint branch November 22, 2022 15:59
@F-X64 F-X64 added this to the Convert and serve image data milestone Nov 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants