Lucas Ratusznei Fonseca 334170f842 Add semantic check for bootstrap address version in subcloud-add
This change adds a semantic check to subcloud-add to ensure that the
provided bootstrap IP is the same version as the system controller's
primary OAM address pool. Both bootstrap-address from CLI and
bootstrap_address from INSTALL_VALUES are checked.

Test plan

Setup: IPv4 DX System Controller

[PASS] Add subcloud using IPv4 --bootstrap-address in CLI, check that
       command succeeds.
[PASS] Add subcloud using IPv6 --bootstrap-address in CLI, check that
       command fails.
[PASS] Add subcloud using IPv4 bootstrap_address in INSTALL_VALUES,
       check that command succeeds.
[PASS] Add subcloud using IPv6 bootstrap_address in INSTALL_VALUES,
       check that command fails.

Story: 2011027
Task: 50650
Change-Id: If75bd681c92818234914061b1e123a93ea6cab08
Signed-off-by: Lucas Ratusznei Fonseca <lucas.ratuszneifonseca@windriver.com>
2024-07-29 09:43:58 -03:00
..
2024-07-03 15:52:22 -03: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