8196e7f946
Group of the current managed subclouds which are supposed to be duplicated in a peer site as secondary subclouds. This commit add subcloud-peer-group APIs of create/delete/update/show/list/ list-subclouds of a subcloud-peer-group Update setting peer-group for subcloud, Using DB of subclouds' 'peer_group_id' Column. Update subcloud update API, add peer_group parameter Usage: Add a subcloud to peer-group: dcmanager subcloud update SUBCLOUD --peer-group PEER_GROUP Remove a subcloud from peer-group: dcmanager subcloud update SUBCLOUD --peer-group none Test Plan: 1. PASS - Create a subcloud-peer-group 2. PASS - Update an existing subcloud's peer-group to a existing subcloud-peer-group successfully; 3. PASS - Verify subcloud-peer-group list-subclouds can get the expected Subcloud above successfully; 4. PASS - Update group_priority/group_state/max_subcloud_rehoming/ system_leader_id/system_leader_name of a subcloud-peer-group successfully; 5. PASS - Check can get subcloud status of a subcloud-peer-group successfully; 6. PASS - Delete a subcloud-peer-group completes successfully. 7. PASS - Delete a subcloud-peer-group while it still has subclouds associated to it. the subclouds' peer-group-id is auto set to None successfully; 8. PASS - Add a subcloud, update the peer-group-id as a non-existing subcloud-peer-group, get error message successfully; 9. PASS - Update subcloud peer group with invalid group_priority/group_state/max_subcloud_rehoming/ system_leader_id/system_leader_name Story: 2010852 Task: 48485 Change-Id: I93d0808b8cf02eba0e6f687007df42e2d2ea1848 Signed-off-by: Wang Tao <tao.wang@windriver.com> |
||
---|---|---|
.. | ||
controllers | ||
policies | ||
README.rst | ||
__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