Command syntax for reference: openstack project <action> <--parameters values> <project-name>
<action>: list, create...
<--parameters>: --domain, --help...
Terminology: Projects are also sometimes referred to as Tenants or Accounts
To view all the projects, based on the user privileges, since we are now the admin, we can see the projects belonging to all the domains, note that one project can belong to only one domain
cumulus@server01:~$ openstack project list
+----------------------------------+---------+
| ID                               | Name    |
+----------------------------------+---------+
| 3c119483a4704451bd24ccaa98121901 | admin   |
| 5b2668bd4dfe4bdf9ff98ce794462140 | service |
| 768939cc621f43728ff90332dee58e95 | demo    |
+----------------------------------+---------+
to view all the projects in a particular domain
cumulus@server01:~$ openstack project list --domain default
+----------------------------------+---------+
| ID                               | Name    |
+----------------------------------+---------+
| 3c119483a4704451bd24ccaa98121901 | admin   |
| 5b2668bd4dfe4bdf9ff98ce794462140 | service |
| 768939cc621f43728ff90332dee58e95 | demo    |
+----------------------------------+---------+
cumulus@server01:~$ openstack project list --domain firstDomain
The above commands show that all the projects belong to the 'default' domain, and there are no projects currently in the 'firstDomain' domian
Let's add a new project in firstDomain
cumulus@server01:~$ openstack project create --domain firstDomain firstProject
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description |                                  |
| domain_id   | f0bb69245afe41eb9aba9873421c3595 |
| enabled     | True                             |
| id          | 8847adbe8a63428ab8f568e169194cba |
| is_domain   | False                            |
| name        | firstProject                     |
| parent_id   | f0bb69245afe41eb9aba9873421c3595 |
+-------------+----------------------------------+
The newly created project should now show up on the project list
cumulus@server01:~$ openstack project list
+----------------------------------+--------------+
| ID                               | Name         |
+----------------------------------+--------------+
| 3c119483a4704451bd24ccaa98121901 | admin        |
| 5b2668bd4dfe4bdf9ff98ce794462140 | service      |
| 768939cc621f43728ff90332dee58e95 | demo         |
| 8847adbe8a63428ab8f568e169194cba | firstProject |
+----------------------------------+--------------+
cumulus@server01:~$ openstack project list --domain firstDomain
+----------------------------------+--------------+
| ID                               | Name         |
+----------------------------------+--------------+
| 8847adbe8a63428ab8f568e169194cba | firstProject |
+----------------------------------+--------------+
To delete the project
cumulus@server01:~$ openstack project delete firstProject
cumulus@server01:~$ openstack project list
+----------------------------------+---------+
| ID                               | Name    |
+----------------------------------+---------+
| 3c119483a4704451bd24ccaa98121901 | admin   |
| 5b2668bd4dfe4bdf9ff98ce794462140 | service |
| 768939cc621f43728ff90332dee58e95 | demo    |
+----------------------------------+---------+
--end-of-post--