7a6bdbd8eb
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> |
||
---|---|---|
.. | ||
controllers | ||
policies | ||
__init__.py | ||
api_config.py | ||
app.py | ||
policy.py | ||
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