[network] Improve neutron purge

This patch makes additions to the neutron purge page to clarify
that the command can be used with tenants that have been deleted
or otherwise do not exist in keystone.

It also documents the expected output when no supported resources
are found.

backport: mitaka
Co-Authored-By: Matt Kassawara <mkassawara@gmail.com>
Closes-Bug: 1580440
Change-Id: I562eb081630e124d690c27ae16d13f9793c5cafe
(cherry picked from commit 37677ff861)
This commit is contained in:
John Davidge 2016-05-25 14:55:09 +01:00 committed by Akihiro Motoki
parent 6ab733cd9c
commit c8cb1dcc58
1 changed files with 31 additions and 23 deletions

View File

@ -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.