distcloud/distributedcloud/dcmanager/api
Gustavo Pereira 3c9a9314ca Add enroll command to backend
This commit introduces the enroll command endpoint.

Test Plan:

PASS: Deploy a system controller and run subcloud add
enroll without bootstrap-values. Verify that the API
returns an error.

PASS: Deploy a system controller and run subcloud add
enroll passing all required parameters. Verify in
dcmanager log that the API returned a success code.

Change-Id: I525d26166dbb7d7afcb26b96191b5045eee7b52d
Signed-off-by: Gustavo Pereira <gustavo.lyrapereira@windriver.com>
2024-04-24 15:56:15 -03:00
..
controllers Add enroll command to backend 2024-04-24 15:56:15 -03:00
policies Update tox pylint/pep8 for dcmanager 2024-01-18 21:51:25 +00:00
README.rst Move content to subdir to support relocated packaging 2019-11-04 13:57:02 -05:00
__init__.py Move content to subdir to support relocated packaging 2019-11-04 13:57:02 -05:00
api_config.py Implement access control for DC API 2022-09-22 18:26:35 -03:00
app.py Update tox pylint/pep8 for dcmanager 2024-01-18 21:51:25 +00:00
policy.py Update tox pylint/pep8 for dcmanager 2024-01-18 21:51:25 +00:00

README.rst

api

DC Manager API is Web Server Gateway Interface (WSGI) application to receive and process API calls, including keystonemiddleware to do the authentication, parameter check and validation, convert API calls to job rpc message, and then send the job to DC Manager Manager through the queue. If the job will be processed by DC Manager Manager in synchronous way, the DC Manager API will wait for the response from the DC Manager Manager. Otherwise, the DC Manager API will send response to the API caller first, and then send the job to DC Manager Manager in asynchronous way.

Multiple DC Manager API could run in parallel, and also can work in multi-worker mode.

Multiple DC Manager API will be designed and run in stateless mode, persistent data will be accessed (read and write) from the DC Manager Database through the DAL module.

Setup and encapsulate the API WSGI app

app.py:

Setup and encapsulate the API WSGI app, including integrate the keystonemiddleware app

api_config.py:

API configuration loading and init

enforcer.py

Enforces policies on the version2 APIs