Deleting projects

Projects can be deleted even if they have users associated with them, so be sure to delete users and other project assets before deleting a project, otherwise you risk having orphaned resources. In this example, we will show how to delete a project named oldbook.

Getting ready

Ensure that you are logged on to a correctly configured OpenStack client and can access the OpenStack environment as a user with admin privileges.

Refer to Chapter 2, The OpenStack Client, for details of setting up your environment to use OpenStack command-line client.

How to do it…

In order to delete a project, execute the following commands:

  1. Get the project's name from a current project list:
    openstack project list
    
    How to do it…
  2. Delete the project:
    openstack project delete oldbook
    

    This command will have no output.

How it works…

Deleting unnecessary projects is simple when using OpenStack command-line tool. Be sure to delete only empty projects. Start with a command to get existing projects:

openstack project list

Delete a project by executing the following:

openstack project delete <project>

Here, the <project> parameter can be either project ID or project name.

If project has users assigned, they will not be deleted, but the project will be.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.189.185.42