From 37677ff861de75f78ecdf752a6931e13a44ee537 Mon Sep 17 00:00:00 2001 From: John Davidge Date: Wed, 25 May 2016 14:55:09 +0100 Subject: [PATCH] [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 Closes-Bug: 1580440 Change-Id: I562eb081630e124d690c27ae16d13f9793c5cafe --- .../source/misc-neutron-purge.rst | 54 +++++++++++-------- 1 file changed, 31 insertions(+), 23 deletions(-) diff --git a/doc/networking-guide/source/misc-neutron-purge.rst b/doc/networking-guide/source/misc-neutron-purge.rst index 6f50dbbf47..4146791509 100644 --- a/doc/networking-guide/source/misc-neutron-purge.rst +++ b/doc/networking-guide/source/misc-neutron-purge.rst @@ -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 + 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.