{"id":27968704,"url":"https://github.com/ging/delete_os_tenant_resources","last_synced_at":"2025-05-07T21:06:39.332Z","repository":{"id":35665246,"uuid":"39940437","full_name":"ging/delete_os_tenant_resources","owner":"ging","description":"python code to delete the resources of the tenant","archived":false,"fork":false,"pushed_at":"2015-07-30T09:36:38.000Z","size":158,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"develop","last_synced_at":"2025-05-07T21:06:35.921Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ging.png","metadata":{"files":{"readme":"README.rst","changelog":"change_password.py","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-30T08:42:40.000Z","updated_at":"2015-09-24T09:19:26.000Z","dependencies_parsed_at":"2022-09-11T05:01:58.922Z","dependency_job_id":null,"html_url":"https://github.com/ging/delete_os_tenant_resources","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ging%2Fdelete_os_tenant_resources","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ging%2Fdelete_os_tenant_resources/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ging%2Fdelete_os_tenant_resources/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ging%2Fdelete_os_tenant_resources/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ging","download_url":"https://codeload.github.com/ging/delete_os_tenant_resources/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252954429,"owners_count":21830904,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-07T21:06:38.717Z","updated_at":"2025-05-07T21:06:39.316Z","avatar_url":"https://github.com/ging.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"==========================\ndelete_os_tenant_resources\n==========================\n\n\nDescription\n-----------\n\nThis is a script to list/delete the resources of a tenant (and also the keypairs of the user)\n\nIt uses the OpenStack Pythons API:\n\n* python-keystoneclient\n* python-novaclient\n* python-glanceclient\n* python-cinderclient\n* python-neutronclient\n* python-swiftclient\n\nComponents\n----------\n\n\nHow to use\n----------\n\nThe procedure works by invoking the scripts corresponding to different phases:\n\n*phase0: phase0_generateuserlist.py. This scripts generate the list of expired\ntrial users. The output of the script is the file users_lists.txt. This script\nrequires the admin credential.\n\n*phase1: phase1_resetpasswords.py. This scripts has as input the file\nusers_list.txt. It sets a new random password for each user and generates the file\nusers_credentials.txt with the user, password and tenant for each user. This\nscript also requires the admin credential.\n\n*phase2: phase2_stopvms.py. This scripts does not delete anything, yet. It\nstops the VMs of the users and makes private their shared images. The idea is\nto grant a grace period to users to detect that their resources are not\navailable before they are beyond redemption. This script does not require the\nadmin account, because it applies the user' credential from users_credentials.txt.\nIt generates the file imagesinuse.pickle.\n\n*phase2b: phase2b_detectimagesinuse.py. This is an optional script, to detect images\nowned by the user, but in use by other tenants. Theoretically deleting a image\nin use by a VM doesn't break the VM, but if you prefer avoid deleting that\nimages, invoke this script before phase3. The script purge_images.py may be\ninvoked after, to delete the images with no VM anymore. This script requires\nthe admin credential.\n\n*phase3: phase3_delete.py. This is the point of no return. Resources are\nremoved and cannot be recovered. This script does not require the admin\ncredential, because it applies the user's credential from users_credentials.txt.\n\n*phase4: phase4_change_category.py. Change the type of user from trial to basic\nThis script requires the admin credential. It reads the file users_to_delete.txt.\n\n\n\nLicense\n-------\n\n\\(c) 2015 Telefónica I+D, Apache License 2.0\n\n\n.. REFERENCES\n\n.. _FIWARE Lab: http://www.fiware.org/lab/\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fging%2Fdelete_os_tenant_resources","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fging%2Fdelete_os_tenant_resources","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fging%2Fdelete_os_tenant_resources/lists"}