distcloud/distributedcloud/dcmanager/db
rsujay 8ca98d3ee1 Update subcloud admin parameters in db
The current restrictions for network reconfiguration post-install is problematic for correcting or updating network configuration for Subcloud deployments or supporting Subcloud rehoming procedures.

The proposed solution is to decouple the Distributed Cloud networking operations from the management network by introducing a new admin network type that will be used for the addressing and routing between the central System Controller and the Subcloud.

Currently, network parameters are not able to be modified via the dcmanager subcloud update CLI.  This commit allows a subcloud to modify the current network parameters  via the dcmanager subcloud update CLI and have that be reflected in the dcmanager DB (subcloud entity).

Test-plan: Debian

dcmanager subcloud update --admin-subnet --admin-gateway-ip --admin-node-0-address --admin-node-1-address
dcmanager subcloud show

Negative Testing :

1. Test dcmanager subcloud update  command with invalid admin-subnet .
Example:
dcmanager subcloud update --admin-subnet 254.254.254.2 --admin-gateway-ip 192.168.101.1 --admin-node-0-address 192.168.101.5 --admin-node-1-address 192.168.101.49 subcloud1
dcmanager subcloud show subcloud1
Result:  dcmanager subcloud update  should not update invalid admin-subnet  IP .

2. Test dcmanager subcloud update  command  with invalid admin-gateway-ip , admin-node-0-address & admin-node-1-address . It should not allow subcloud update with invalid admin IP.

3. Test dcmanager subcloud update --description without updating admin parameters in a subcloud .
Example:
dcmanager subcloud update --description mks subcloud1
dcmanager subcloud show
Expected result : It should not update any admin parameters (admin-subnet, admin-gateway-ip , admin-node-0-address & admin-node-1-address)  in a subcloud . It should only update subcloud description.

Story: 2010319
Task: 46962

Signed-off-by: rsujay <ramkrishna.sujay@windriver.com>
Change-Id: I4cbaab5add873eb4264182645042bff1ee7f2456
2023-01-13 07:43:57 +00:00
..
sqlalchemy Update subcloud admin parameters in db 2023-01-13 07:43:57 +00:00
__init__.py Move content to subdir to support relocated packaging 2019-11-04 13:57:02 -05:00
api.py Update subcloud admin parameters in db 2023-01-13 07:43:57 +00:00
utils.py Minor Code Change Based on Py39 Pylint Feedback 2022-08-10 13:12:24 -04:00