{ "info": { "author": "The OSPurge contributors", "author_email": "UNKNOWN", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Environment :: OpenStack", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: Apache Software License", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5" ], "description": "OpenStack project resources cleaner\n===================================\n\nWhat is OSPurge ?\n-----------------\n\n* ``ospurge`` is a standalone client-side tool that aims at\n deleting all resources, taking into account their interdependencies,\n in a specified OpenStack project.\n\n* ``ospurge`` ensures in a quick and automated way that no resource is\n left behind when a project is deleted.\n\n* ``ospurge`` can be used by a cloud administrator, this means a user with the\n admin role, to cleanup any project or by a non-privileged user to cleanup his\n own project.\n\n\nSupported resources\n-------------------\n\nAt the moment it is possible to purge the following resources from a project:\n\n* Floating IP\n* Glance Images\n* Instances\n* Networks\n* Routers\n* Security groups\n* Swift containers\n* Swift objects\n* Volumes / Volume snapshots / Volume backups\n\n\nExit codes\n----------\n\nThe following codes are returned when ``ospurge`` exits:\n\n* ``Code 0``: Process exited successfully\n* ``Code 1``: Something went wrong (check the logs)\n\n\nInstallation\n------------\n\nCreate a Python 3 virtual environment:\n\n.. code-block:: console\n\n $ python3 -m venv ospurge\n $ source ospurge/bin/activate\n\nInstall ``ospurge`` with ``pip``:\n\n.. code-block:: console\n\n $ python3 -m pip install git+https://git.openstack.org/openstack/ospurge\n $ OR, to checkout at commit 328f6\n $ python3 -m pip install git+https://git.openstack.org/openstack/ospurge@328f6\n\nAvailable options can be displayed with ``ospurge -h``:\n\n.. code-block:: console\n\n $ ospurge -h\n usage: ospurge [-h] [--verbose] [--dry-run] [--delete-shared-resources]\n (--purge-project ID_OR_NAME | --purge-own-project)\n [--os-cloud ] [--os-auth-type ]\n [--os-auth-url OS_AUTH_URL] [--os-domain-id OS_DOMAIN_ID]\n [--os-domain-name OS_DOMAIN_NAME]\n [--os-project-id OS_PROJECT_ID]\n [--os-project-name OS_PROJECT_NAME]\n [--os-project-domain-id OS_PROJECT_DOMAIN_ID]\n [--os-project-domain-name OS_PROJECT_DOMAIN_NAME]\n [--os-trust-id OS_TRUST_ID]\n [--os-default-domain-id OS_DEFAULT_DOMAIN_ID]\n [--os-default-domain-name OS_DEFAULT_DOMAIN_NAME]\n [--os-user-id OS_USER_ID] [--os-username OS_USERNAME]\n [--os-user-domain-id OS_USER_DOMAIN_ID]\n [--os-user-domain-name OS_USER_DOMAIN_NAME]\n [--os-password OS_PASSWORD] [--insecure]\n [--os-cacert ] [--os-cert ]\n [--os-key ] [--timeout ]\n [--os-service-type ] [--os-service-name ]\n [--os-interface ] [--os-region-name ]\n [--os-endpoint-override ] [--os-api-version ]\n\n Purge resources from an Openstack project.\n\n optional arguments:\n -h, --help show this help message and exit\n --verbose Makes output verbose\n --dry-run List project's resources\n --delete-shared-resources\n Whether to delete shared resources (public images and\n external networks)\n --admin-role-name ADMIN_ROLE_NAME\n Name of admin role. Defaults to 'admin'. This role\n will be temporarily granted on the project to purge to\n the authenticated user.\n --purge-project ID_OR_NAME\n ID or Name of project to purge. This option requires\n to authenticate with admin credentials.\n --purge-own-project Purge resources of the project used to authenticate.\n Useful if you don't have the admin credentials of the\n cloud.\n --os-cloud Named cloud to connect to\n --os-auth-type , --os-auth-plugin \n Authentication type to use\n\n Authentication Options:\n Options specific to the password plugin.\n\n --os-auth-url OS_AUTH_URL\n Authentication URL\n --os-domain-id OS_DOMAIN_ID\n Domain ID to scope to\n --os-domain-name OS_DOMAIN_NAME\n Domain name to scope to\n --os-project-id OS_PROJECT_ID, --os-tenant-id OS_PROJECT_ID\n Project ID to scope to\n --os-project-name OS_PROJECT_NAME, --os-tenant-name OS_PROJECT_NAME\n Project name to scope to\n --os-project-domain-id OS_PROJECT_DOMAIN_ID\n Domain ID containing project\n --os-project-domain-name OS_PROJECT_DOMAIN_NAME\n Domain name containing project\n --os-trust-id OS_TRUST_ID\n Trust ID\n --os-default-domain-id OS_DEFAULT_DOMAIN_ID\n Optional domain ID to use with v3 and v2 parameters.\n It will be used for both the user and project domain\n in v3 and ignored in v2 authentication.\n --os-default-domain-name OS_DEFAULT_DOMAIN_NAME\n Optional domain name to use with v3 API and v2\n parameters. It will be used for both the user and\n project domain in v3 and ignored in v2 authentication.\n --os-user-id OS_USER_ID\n User id\n --os-username OS_USERNAME, --os-user-name OS_USERNAME\n Username\n --os-user-domain-id OS_USER_DOMAIN_ID\n User's domain id\n --os-user-domain-name OS_USER_DOMAIN_NAME\n User's domain name\n --os-password OS_PASSWORD\n User's password\n\n API Connection Options:\n Options controlling the HTTP API Connections\n\n --insecure Explicitly allow client to perform \"insecure\" TLS\n (https) requests. The server's certificate will not be\n verified against any certificate authorities. This\n option should be used with caution.\n --os-cacert \n Specify a CA bundle file to use in verifying a TLS\n (https) server certificate. Defaults to\n env[OS_CACERT].\n --os-cert \n Defaults to env[OS_CERT].\n --os-key Defaults to env[OS_KEY].\n --timeout Set request timeout (in seconds).\n\n Service Options:\n Options controlling the specialization of the API Connection from\n information found in the catalog\n\n --os-service-type \n Service type to request from the catalog\n --os-service-name \n Service name to request from the catalog\n --os-interface \n API Interface to use [public, internal, admin]\n --os-region-name \n Region of the cloud to use\n --os-endpoint-override \n Endpoint to use instead of the endpoint in the catalog\n --os-api-version \n Which version of the service API to use\n\n\n\nExample usage\n-------------\n\nTo remove a project, credentials have to be provided. The usual OpenStack\nenvironment variables can be used. When launching the ``ospurge`` script, the\nproject to be cleaned up has to be provided, by using either the\n``--purge-project`` option or the ``--purge-own-project`` option. When the\ncommand returns, any resources that belong to the project will have been\ndefinitively deleted.\n\n* Setting OpenStack credentials:\n\n.. code-block:: console\n\n $ export OS_USERNAME=admin\n $ export OS_PASSWORD=password\n $ export OS_TENANT_NAME=admin\n $ export OS_AUTH_URL=http://localhost:5000/v2.0\n\n* Removing resources:\n\n.. code-block:: console\n\n $ ./ospurge --verbose --purge-project demo\n WARNING:root:2016-10-27 20:59:12,001:Going to list and/or delete resources from project 'demo'\n INFO:root:2016-10-27 20:59:12,426:Going to delete VM (id='be1cce96-fd4c-49fc-9029-db410d376258', name='cb63bb6c-de93-4213-9998-68c2a532018a')\n INFO:root:2016-10-27 20:59:12,967:Waiting for check_prerequisite() in FloatingIPs\n INFO:root:2016-10-27 20:59:15,169:Waiting for check_prerequisite() in FloatingIPs\n INFO:root:2016-10-27 20:59:19,258:Going to delete Floating IP (id='14846ada-334a-4447-8763-829364bb0d18')\n INFO:root:2016-10-27 20:59:19,613:Going to delete Snapshot (id='2e7aa42f-5596-49bf-976a-e572e6c96224', name='cb63bb6c-de93-4213-9998-68c2a532018a')\n INFO:root:2016-10-27 20:59:19,953:Going to delete Volume Backup (id='64a8b6d8-021e-4680-af58-0a5a04d29ed2', name='cb63bb6c-de93-4213-9998-68c2a532018a'\n INFO:root:2016-10-27 20:59:20,717:Going to delete Router Interface (id='7240a5df-eb83-447b-8966-f7ad2a583bb9', router_id='7057d141-29c7-4596-8312-16b441012083')\n INFO:root:2016-10-27 20:59:27,009:Going to delete Router Interface (id='fbae389d-ff69-4649-95cb-5ec8a8a64d03', router_id='7057d141-29c7-4596-8312-16b441012083')\n INFO:root:2016-10-27 20:59:28,672:Going to delete Router (id='7057d141-29c7-4596-8312-16b441012083', name='router1')\n INFO:root:2016-10-27 20:59:31,365:Going to delete Port (id='09e452bf-804d-489a-889c-be0eda7ecbca', network_id='e282fc84-7c79-4d47-a94c-b74f7a775682)'\n INFO:root:2016-10-27 20:59:32,398:Going to delete Security Group (id='7028fbd2-c998-428d-8d41-28293c3de052', name='6256fb6c-0118-4f18-8424-0f68aadb9457')\n INFO:root:2016-10-27 20:59:33,668:Going to delete Network (id='dd33dd12-4c3e-4162-8a5c-23941922271f', name='private')\n INFO:root:2016-10-27 20:59:36,119:Going to delete Image (id='39df8b40-3acd-404c-935c-d9f15732dfa6', name='cb63bb6c-de93-4213-9998-68c2a532018a')\n INFO:root:2016-10-27 20:59:36,953:Going to delete Volume (id='f482283a-25a9-419e-af92-81ec8c62e1cd', name='cb63bb6c-de93-4213-9998-68c2a532018a')\n INFO:root:2016-10-27 20:59:48,790:Going to delete Object 'cb63bb6c-de93-4213-9998-68c2a532018a.raw' from Container 'cb63bb6c-de93-4213-9998-68c2a532018a'\n INFO:root:2016-10-27 20:59:48,895:Going to delete Container (name='6256fb6c-0118-4f18-8424-0f68aadb9457')\n INFO:root:2016-10-27 20:59:48,921:Going to delete Container (name='volumebackups')\n\n* Projects can be deleted with the ``python-openstackclient`` command-line\n interface:\n\n.. code-block:: console\n\n $ openstack project delete \n\n* Users can be deleted with the ``python-openstackclient`` command-line\n interface:\n\n.. code-block:: console\n\n $ openstack user delete \n\n\nHow to extend\n-------------\n\nGiven the ever-widening OpenStack ecosystem, OSPurge can't support every\nOpenStack services. We intend to support in-tree, only the 'core' services.\nFortunately, OSPurge is easily extensible. All you have to do is add a new\nPython module in the ``resources`` package and define one or more Python\nclass(es) that subclass ``ospurge.resources.base.ServiceResource``. Your module\nwill automatically be loaded and your methods called. Have a look at the\n``main.main`` and ``main.runner`` functions to fully understand the mechanism.\n\nNote: We won't accept any patch that broaden what OSPurge supports, beyond\nthe core services.\n\n\nHow to contribute\n-----------------\n\nOSPurge is hosted on the OpenStack infrastructure and is using\n`Gerrit `_ to\nmanage contributions. You can contribute to the project by following the\n`OpenStack Development workflow `_.\n\nStart hacking right away with:\n\n.. code-block:: console\n\n $ git clone git://git.openstack.org/openstack/ospurge\n\n\nDesign decisions\n----------------\n* OSPurge depends on `os-client-config`_ to manage authentication. This way,\n environment variables (OS_*) and CLI options are properly handled.\n\n* OSPurge is built on top of `shade`_. shade is a simple client library for\n interacting with OpenStack clouds. With shade, OSPurge can focus on the\n cleaning resources logic and not on properly building the various Python\n OpenStack clients and dealing with their not-so-intuitive API.\n\n.. _shade: https://github.com/openstack-infra/shade/\n.. _os-client-config: https://github.com/openstack/os-client-config", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/openstack/ospurge", "keywords": "openstack", "license": "Apache-2", "maintainer": null, "maintainer_email": null, "name": "ospurge", "package_url": "https://pypi.org/project/ospurge/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/ospurge/", "project_urls": { "Homepage": "https://github.com/openstack/ospurge" }, "release_url": "https://pypi.org/project/ospurge/2.0.0/", "requires_dist": null, "requires_python": null, "summary": "OpenStack resources cleanup script", "version": "2.0.0" }, "last_serial": 2564311, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "315501d9cff11513af0f59277b413581", "sha256": "5ec3ec900345ae2dfa09df43a80c0fca90bad4337daf36a139dc5d0ac5bf865c" }, "downloads": -1, "filename": "ospurge-0.1.1.tar.gz", "has_sig": false, "md5_digest": "315501d9cff11513af0f59277b413581", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18536, "upload_time": "2014-02-20T13:06:21", "url": "https://files.pythonhosted.org/packages/e1/77/d022da2e2588186a6139482bc8e398d720761e0629c24e83d87fd462b81e/ospurge-0.1.1.tar.gz" } ], "0.1.1.dev19.g77dc946": [ { "comment_text": "", "digests": { "md5": "abfc72ad64150b3b30d54926d9d60834", "sha256": "08654ca7b4bc7f97d3f3f23cbd7945981b5cd18bb903833454bc963720d15173" }, "downloads": -1, "filename": "ospurge-0.1.1.dev19.g77dc946.tar.gz", "has_sig": false, "md5_digest": "abfc72ad64150b3b30d54926d9d60834", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18552, "upload_time": "2014-02-20T10:27:09", "url": "https://files.pythonhosted.org/packages/25/b6/f469e37ef15e91b9d9e61f296fb20cc88571b5aeaba0bc75d4206250ed84/ospurge-0.1.1.dev19.g77dc946.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "ad89c880d0bfcce91a10284df51c0916", "sha256": "d9f71b5968e76f6a1a2fd76ea8122296adef7861e6436a904c37b956b0e3680f" }, "downloads": -1, "filename": "ospurge-0.1.2.tar.gz", "has_sig": false, "md5_digest": "ad89c880d0bfcce91a10284df51c0916", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20127, "upload_time": "2014-07-25T00:30:05", "url": "https://files.pythonhosted.org/packages/21/57/77ac919bda73a96b2758e6e3d2a5c55078a152f6aa4925d0323dde7fd078/ospurge-0.1.2.tar.gz" } ], "0.1.2.dev4.g814c147": [ { "comment_text": "", "digests": { "md5": "2d49dc5037997df5fd124c3a0329d422", "sha256": "1162e2803e94c6e7ded7227e4486fbcf481d89faaf39a578093e5060046e89cf" }, "downloads": -1, "filename": "ospurge-0.1.2.dev4.g814c147.tar.gz", "has_sig": false, "md5_digest": "2d49dc5037997df5fd124c3a0329d422", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20133, "upload_time": "2014-02-21T13:56:19", "url": "https://files.pythonhosted.org/packages/c1/5f/1448fda975c6624385bbaf69545a0b25d114f64e5ccf3aeb270585563f02/ospurge-0.1.2.dev4.g814c147.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "7b07eff437bfbcc9653ad643588f8af6", "sha256": "297ef143c4f96e970f4d26c55a2bcde64daabf48299dc519b72e60ff3c4e681b" }, "downloads": -1, "filename": "ospurge-0.1.3.tar.gz", "has_sig": false, "md5_digest": "7b07eff437bfbcc9653ad643588f8af6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21406, "upload_time": "2014-10-29T18:49:30", "url": "https://files.pythonhosted.org/packages/d2/27/95f9bfb6d67295cb215c65c670fd28486de7f1607941097b833c2ec7fee7/ospurge-0.1.3.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "efc9c60510e542c34d23c9ddf5eb8949", "sha256": "ea4b2ebcc0719f7ee225f4b1fb3d74d5b33bffb94c61a396f8b9e0c43643cde7" }, "downloads": -1, "filename": "ospurge-1.0.0.tar.gz", "has_sig": false, "md5_digest": "efc9c60510e542c34d23c9ddf5eb8949", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20456, "upload_time": "2014-11-01T22:17:14", "url": "https://files.pythonhosted.org/packages/26/d6/33cc0f866a143e227e972c5b40e141211f2a775c253ce918e546fa4cb818/ospurge-1.0.0.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "f2540acd9ff4cfdb889f4fedb5399aab", "sha256": "4ecc219fa1e4b2136390de08ad8fb42465b444b0ed54453a9c626031347e289c" }, "downloads": -1, "filename": "ospurge-1.2.0.tar.gz", "has_sig": false, "md5_digest": "f2540acd9ff4cfdb889f4fedb5399aab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28603, "upload_time": "2015-09-10T20:52:27", "url": "https://files.pythonhosted.org/packages/c6/d6/5cb81605bebc06a7315af5e5bdfd5007d18c12241a42aaa084da41ee9b7e/ospurge-1.2.0.tar.gz" } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "e357e709ea9a78c004390a7c64f1ed6e", "sha256": "da1514e77ae88c87b78ae5797d20d84769da870019b78aaf889fb16c8e1a2e10" }, "downloads": -1, "filename": "ospurge-1.3.0.tar.gz", "has_sig": false, "md5_digest": "e357e709ea9a78c004390a7c64f1ed6e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32274, "upload_time": "2016-11-30T22:27:25", "url": "https://files.pythonhosted.org/packages/15/5e/9a08b455378537309104143652034604f6f01ec54f07a4e721d29b342b96/ospurge-1.3.0.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "99e0b774488a4d4c99a9eb0d6af4c808", "sha256": "59d191237e811fec4c80df9907656121828660af4929f73a24120225be7240ec" }, "downloads": -1, "filename": "ospurge-2.0.0.tar.gz", "has_sig": false, "md5_digest": "99e0b774488a4d4c99a9eb0d6af4c808", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29710, "upload_time": "2017-01-10T10:53:08", "url": "https://files.pythonhosted.org/packages/65/99/93b71126f825d78da5605e6bebe407be88aa1769d11495afca25dc366e40/ospurge-2.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "99e0b774488a4d4c99a9eb0d6af4c808", "sha256": "59d191237e811fec4c80df9907656121828660af4929f73a24120225be7240ec" }, "downloads": -1, "filename": "ospurge-2.0.0.tar.gz", "has_sig": false, "md5_digest": "99e0b774488a4d4c99a9eb0d6af4c808", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29710, "upload_time": "2017-01-10T10:53:08", "url": "https://files.pythonhosted.org/packages/65/99/93b71126f825d78da5605e6bebe407be88aa1769d11495afca25dc366e40/ospurge-2.0.0.tar.gz" } ] }