Hi, Please check https://review.opendev.org/c/openstack/python-openstackclient/+/734485 <https://review.opendev.org/c/openstack/python-openstackclient/+/734485> out. This is a followup of the ospurge, which bases on the project cleanup functionality built into OpenStackSDK. Idea is to replace “openstack project purge” functionality to completely rely on SDK only. Please also leave comments whether this works for you or not. Regards, Artem
On 18. Jan 2021, at 17:24, Christian Rohmann <christian.rohmann@inovex.de> wrote:
Hello Openstack-Discuss,
I was wondering what the right approach to clean up all resources of a project was in order for it to be deleted?
1) There is ospurge (https://opendev.org/x/ospurge) which works, but seems kind of abandoned looking at the last commits and pending issues (https://bugs.launchpad.net/ospurge). Will there still be any further development of this tool?
2) Then there is the project purge command (https://docs.openstack.org/python-openstackclient/victoria/cli/command-objec...) introduced with the Pike release (https://docs.openstack.org/releasenotes/python-openstackclient/pike.html#rel... // https://bugs.launchpad.net/python-openstackclient/+bug/1584596 // https://review.opendev.org/c/openstack/python-openstackclient/+/367673/).
While it seems only natural to have the cleanup / purge functionality built into the openstack client, I was wondering .. .
a) if all potentially existing resources types are covered and this can fully replace ospurge to allow any project to be cleaned up and deleted? What about i.e. Networks, Containers or objects?
b) Also ospurge seems to still have some extended options to target or exclude certain resources by using the following options:
[--resource {Backups,Snapshots,Volumes,Zones,Images,Stacks,FloatingIPs,RouterInterfaces,Routers,Ports,Networks,SecurityGroups,Servers,LoadBalancers,Receivers,Policies,Clusters,Profiles,Objects,Containers}] [--exclude-resource {Backups,Snapshots,Volumes,Zones,Images,Stacks,FloatingIPs,RouterInterfaces,Routers,Ports,Networks,SecurityGroups,Servers,LoadBalancers,Receivers,Policies,Clusters,Profiles,Objects,Containers}]
those options are not (yet) available for the "project purge" command of the openstack client.
With regards,
Christian