How to Clean up OpenStack Tenants and User-created Objects in Avi Controller

Background

Avi Vantage imports OpenStack tenants to Avi Controller when an OpenStack user logs in. If the tenants are removed from OpenStack, Avi Controller does not delete these tenants automatically. User-created Avi objects (virtual services, pool, etc.), which are no longer required also need manual cleanup.

Instructions

After deleting tenants from OpenStack, call the following Avi REST API to clean up Avi objects.


https://<controller-ip>/api/openstack-cleanup

This REST API deletes the redundant Avi objects (virtual service, pool, Service Engines, etc.) created in the Avi Controller under each deleted OpenStack tenant. It might take a good amount of time to delete Avi Service Engines. If required, run the REST API a couple of times to clean up Avi objects completely. Once all such objects are deleted, the deleted OpenStack tenants are also deleted from the Avi Controller.