Prune stale resourcepools,resources,dms and alarms 11/14811/5
authorvpachchi <vineela.pachchipulusu@windriver.com>
Tue, 12 Aug 2025 09:44:22 +0000 (05:44 -0400)
committervpachchi <vineela.pachchipulusu@windriver.com>
Wed, 13 Aug 2025 12:14:48 +0000 (08:14 -0400)
commitdcc9046040af3d5b73dbb5695df8a007b5d3480d
treedd16c439011b6233655b3d9b8484f51fb9a305c6
parent1a2fe9a1913cbc81eef73628ddc3e9d40c2ae3ec
Prune stale resourcepools,resources,dms and alarms

Prune DB resource pools that don't exist in the authoritative source.

Steps for each prune cycle:

Retrieve current pool IDs from client for the specified ocloud
Get pool IDs from the database
For each pool ID that exists only in DB:
Remove all alarms associated with resources in that pool
Delete all resources belonging to that pool
Remove the resource pool itself

Test Plan:
PASS- Verify if the pruned respools,resources,alarms are not displayed
PASS- Resgression tests are passed

Change-Id: Idb4900e560d3b97a99d73d03ddd22cb295eb056c
Signed-off-by: vpachchi <vineela.pachchipulusu@windriver.com>
o2ims/service/watcher/ocloud_watcher.py
o2ims/service/watcher/resourcepool_watcher.py