distcloud/distributedcloud/dcorch/api
Guilherme Schons a78743a115 Add inactive param for import-load on dcorch api proxy
This change added a parameter called 'inactive' to load-import workflow
on dcorch to allow import a previous release (ISO).

Test Plan:
PASS: (AIO-SX) failed to import the current version
PASS: (AIO-SX) failed to import the current version
with active param

PASS: (AIO-SX) import the new version
PASS: (AIO-SX) import new version with local param

PASS: (AIO-SX) failed to import the previous release
PASS: (AIO-SX) import the previous release with inactive param

PASS: DC (--os-region-name SystemController) success to import
currently version with active param
PASS: DC (--os-region-name SystemController) failed to import
currently version

PASS: DC (--os-region-name SystemController) import new version
PASS: DC (--os-region-name SystemController) import new version
with local param

PASS: DC (--os-region-name SystemController) import previous
release with inactive param
PASS: DC (--os-region-name SystemController) failed to import
previous release

PASS: DC (--os-region-name SystemController) extracted ISO files
to the controller (/var/www/pages/feed/rel-version)

Story: 2010611
Task: 47509
Depends-On: https://review.opendev.org/c/starlingx/config/+/875186

Signed-off-by: Guilherme Schons <guilherme.dossantosschons@windriver.com>
Change-Id: Icd45c687d7f94eb5acb6d8c42366273de157c257
2023-03-05 21:57:33 +00:00
..
controllers Minor Code Change Based on Py39 Pylint Feedback 2022-08-10 13:12:24 -04:00
policies Implement access control for DC API 2022-09-22 18:26:35 -03:00
proxy Add inactive param for import-load on dcorch api proxy 2023-03-05 21:57:33 +00:00
__init__.py Move content to subdir to support relocated packaging 2019-11-04 13:57:02 -05:00
api_config.py Move content to subdir to support relocated packaging 2019-11-04 13:57:02 -05:00
app.py Move content to subdir to support relocated packaging 2019-11-04 13:57:02 -05:00
policy.py Implement access control for DC API 2022-09-22 18:26:35 -03:00
README.rst Move content to subdir to support relocated packaging 2019-11-04 13:57:02 -05:00

api

DC Orchestrator API is Web Server Gateway Interface (WSGI) applications 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 Orchestrator Engine through the queue. If the job will be processed by DC Orchestrator Engine in synchronous way, the DC Orchestrator API will wait for the response from the DC Orchestrator Engine. Otherwise, the DC Orchestrator API will send response to the API caller first, and then send the job to DC Orchestrator Engine in asynchronous way.

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

Multiple DC Orchestrator API will be designed and run in stateless mode, persistent data will be accessed (read and write) from the DC Orchestrator 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

apicfg.py:

API configuration loading and init

enforcer.py

Enforces policies on the version2 API's