OpenStack: Cleanup project objects

# Delete VMs
openstack server list --project=test-project --os-cloud=prod-user1
openstack server delete ${VM_ID}
 
# Delete floating ip
openstack floating ip list --project=test-project --os-cloud=prod-user1
openstack floating ip delete ${FLOATING_IP_1} 1.2.3.4
 
# Delete router
openstack router list --project=test-project --os-cloud=prod-user1
openstack subnet list --project=test-project --os-cloud=prod-user1
openstack router remove subnet ${ROUTER_ID} ${SUBNET_ID}
openstack router delete ${ROUTER_ID}
 
# Delete subnet
openstack subnet list --project=test-project --os-cloud=prod-user1
openstack subnet delete ${SUBNET_ID}
 
# Delete network
openstack network list --project=test-project --os-cloud=prod-user1
openstack network delete ${NETWORK_ID}
 
# Delete security group
openstack security group list --project=test-project --os-cloud=prod-user1
openstack security group delete ${SECURITY_GROUP_ID}
 
# Delete keypair
openstack keypair list
openstack keypair delete ${KEYPAIR_ID}
 
# Delete project (admin only)
openstack project list --domain everyware --os-cloud=prod-user1
openstack project delete ${PROJECT_ID}

Optional

# Delete ports
openstack port list --project=test-project --os-cloud=dev
openstack port delete 454ad2a7-b9a8-4d57-ba2f-93e482b40302
 
# Delete specific security group rules
openstack security group rule list test-project-sec
openstack security group rule delete 49f472b6-afa8-479d-bc92-49cde49161f4
openstack security group rule delete 9a5a601c-fdad-419a-acf8-919b25dc93b5
 
# Delete domain
openstack domain list --os-cloud=prod-pko
openstack domain delete foo

Links
https://docs.openstack.org/python-openstackclient/latest/cli/command-list.html