distcloud/distributedcloud/dcmanager/api
Susendra Selvaraj 7a6bdbd8eb Remove unused methods in alarm manager
Below unused methods are removed -
1. _determine_version_cap definition is unused and there are no
   references to it in the code
2. 'summary' uses invalid decorator -
   @index.when(method='summary', template='json').
3. _get_alarm_summary method was only used by 'summary'
   method which is removed

Test plan:
1. Pass: Run UT coverage with this change.
         Coverage improved from 73% to 97%.
2. Pass: Run 'dcmanager alarm summary' command.
         There is no functional impact.

Story: 2007082
Task: 49564

Change-Id: I552d62a4c160ea52a1d17167d095d569786d254f
Signed-off-by: Susendra Selvaraj <susendra.selvaraj@windriver.com>
2024-02-13 10:39:31 -05:00
..
controllers Remove unused methods in alarm manager 2024-02-13 10:39:31 -05:00
policies Update tox pylint/pep8 for dcmanager 2024-01-18 21:51:25 +00: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 Move content to subdir to support relocated packaging 2019-11-04 13:57:02 -05: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