Merge "[network] Improve neutron purge"

This commit is contained in:
Jenkins 2016-06-07 09:29:07 +00:00 committed by Gerrit Code Review
commit 912902632b

@ -2,42 +2,50 @@
Neutron purge
=============
From the Mitaka release onwards, the OpenStack Networking command-line
interface (CLI) supports the deletion of multiple resources for a given tenant
with a single command.
The resources currently supported by this feature are:
The Networking service provides a purge mechanism to delete the
following network resources for a project (tenant):
* Networks
* Subnets
* Ports
* Router Interfaces
* Router interfaces
* Routers
* Floating IPs
* Security Groups
* Floating IP addresses
* Security groups
Typically, one uses this mechanism to delete networking resources
for a defunct project regardless of its existence in the Identity
service.
Usage
~~~~~
To delete all supported resources owned by a tenant, use the
:command:`neutron purge` command as follows:
#. Source the necessary project credentials. The administrative project
can delete resources for all other projects. A regular project can
delete its own network resources and those belonging to other projects
for which it has sufficient access.
#. Delete the network resources for a particular project.
.. code-block:: console
$ neutron purge PROJECT_ID
Replace ``PROJECT_ID`` with the project (tenant) ID.
The command provides output that includes a completion percentage and
the quantity of successful or unsuccessful network resource deletions.
An unsuccessful deletion usually indicates sharing of a resource with
one or more additional projects.
.. code-block:: console
$ neutron purge <tenant_id>
Purging resources: 100% complete.
Deleted 1 security_group, 2 ports, 1 router, 1 floatingip, 2 networks.
The following resources could not be deleted: 1 network.
An admin can provide the ID of any tenant that they have access to. A tenant
must provide their own ID.
While the command is running, feedback is provided in the form of completion
percentage. On completion, the command returns a list of resources that were
and/or could not be deleted:
The command also indicates if a project lacks network resources.
.. code-block:: console
Purging resources: 100% complete.
Deleted 1 security_group, 2 ports, 1 router, 1 floatingip, 2 networks.
The following resouces could not be deleted: 1 network.
A resource in use by another tenant, for example, a shared network
with ports in more than one tenant, will prevent it from being deleted.
Tenant has no supported resources.