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

View File

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