distcloud/distributedcloud/dcmanager/api
Victor Romano 77faee83d2 Add subcloud deploy install option to dcmanager
This commit adds the command "subcloud deploy install" to dcmanager.
It runs the subcloud install step only. The install values file is
optional if it has already been provided in the previous phase
using subcloud deploy create.

Test Plan:
  Success cases:
  - PASS: Install passing install_values and verify that the subcloud
          was successfully installed.
  - PASS: Install without passing install_values and verify that the
          subcloud was successfully installed using install data
          previously saved in db.
  - PASS: Install passing current release and verify that the
          subcloud was successfully installed.
  - PASS: Install passing previous release and verify that the
          subcloud was successfully installed.
  - PASS: Repeat previous tests but directly call the API (using
          CURL) instead of using the CLI.
  Failure cases:
  - PASS: Verify that it's not possible to run the install if deploy
          state is not 'create-complete', 'pre-install-failed',
          'install-failed' or 'install-complete'.
  - PASS: Call the API directly, passing bmc-password as plain text
          as opposed to b64encoded and verify that the response
          contains the correct error code and message.

Story: 2010756
Task: 48056

Signed-off-by: Victor Romano <victor.gluzromano@windriver.com>
Change-Id: I3a9f4e8c2f39964b2b0b784181bc78494f3078a2
2023-06-26 15:35:50 -03:00
..
controllers Add subcloud deploy install option to dcmanager 2023-06-26 15:35:50 -03:00
policies Add subcloud deploy install option to dcmanager 2023-06-26 15:35:50 -03: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 DC Manager API request audit logging 2022-02-24 21:01:00 +00:00
policy.py Implement access control for DC API 2022-09-22 18:26:35 -03: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