Files
distcloud/distributedcloud/dcmanager/api
Tee Ngo af14a6f65c DCManager update for Redfish subcloud restore
In this commit, dcmanager api and manager are updated to
support the restore of a Redfish capable subcloud from
backup data.

Unit tests will be added in a separate commit.

Tests:
  - Restore request without install (not yet supported)
  - Restore request for a subcloud that is currently in 'managed'
    state
  - Load is not in dc-vault
  - Mandatory restore value (backup_filename) is not present
  - Specified backup file cannot be found
  - Subcloud restore with backup data on the target (i.e.
    backup tarball is under /opt/platform-backup)
  - Subcloud restore with backup data on the system controller
    (i.e. on_box_data = false)
  - Simulate install failure
  - Simulate check target failure
  - Batch subcloud restore
  - Subcloud restore retry
  - Subcloud restore with patches

Task: 41725
Story: 2008573
Depends-On: https://review.opendev.org/c/starlingx/ansible-playbooks/+/777046
Change-Id: I8134c535e39231837727811475b0f01b2ccddb63
Signed-off-by: Tee Ngo <tee.ngo@windriver.com>
2021-02-26 14:09:40 -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