Files
distcloud/distributedcloud/dcmanager/api
Raphael Lima 30b4b76315 Update FmClient to accept the endpoint argument
This commit allows specifying the endpoint URL when creating a
FmClient instance. This eliminates the need for the 'get_endpoint()'
call within FmClient, avoiding an unnecessary request.

Test plan:
1. PASS: Unmanage a subcloud and verify that all sync status, except
   dc-cert are moved to unknown.
2. PASS: Manage a subcloud and verify that all sync status are in-sync.
3. PASS: Turn a subcloud off and verify that its availability and sync
   status are updated.
4. PASS: Turn a subcloud on and verify that its availability and sync
   status are updated.
5. PASS: Run dcmanager subcloud show when executing all of the steps
   above and verify that the firmware audit is updated correctly.
6. PASS: Apply a development patch in all of the subclouds and verify
   that they complete.

Story: 2011106
Task: 50412

Change-Id: I31469ac25495dbef316134c3830b510665ac41bc
Signed-off-by: Raphael Lima <Raphael.Lima@windriver.com>
2024-06-26 12:18:56 -03:00
..
2024-01-18 21:51:25 +00:00
2024-01-18 21:51:25 +00:00

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