4.4. Managing Domain Projects

4.4.1. vinfra domain project create

Create a new domain project:

usage: vinfra domain project create [--description <description>] [--enable | --disable]
                                    --name <name> --domain <domain>
--description <description>
Project description
--enable
Enable project
--disable
Disable project
--name <name>
Project name
--domain <domain>
Domain name or ID

Example:

# vinfra domain project create --domain mydomain --name myproject \
--description "A custom project"
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | A custom project                 |
| domain_id   | 9f7e68938fe946a2a862e360bbe40d98 |
| enabled     | True                             |
| id          | d1c4d6198fb940e6b971cf306571ebbd |
| name        | myproject                        |
+-------------+----------------------------------+

This command creates and enables the project myproject within the domain mydomain and adds a description to it.

4.4.2. vinfra domain project list

List all projects in a domain:

usage: vinfra project list --domain <domain>
--domain <domain>
Domain name or ID

Example:

# vinfra domain project list --domain mydomain
+-----------+-----------+---------+------------------+-----------+
| id        | name      | enabled | description      | domain_id |
+-----------+-----------+---------+------------------+-----------+
| d1c4<...> | myproject | True    | A custom project | 9f7e<...> |
+-----------+-----------+---------+------------------+-----------+

This command lists projects in the domain mydomain. (The output is abridged to fit on page.)

4.4.3. vinfra domain project show

Show details of a domain project:

usage: vinfra domain project show --domain <domain> <project>
--domain <domain>
Domain name or ID
<project>
Project ID or name

Example:

#  vinfra domain project show myproject --domain mydomain
+---------------+----------------------------------+
| Field         | Value                            |
+---------------+----------------------------------+
| description   | A custom project                 |
| domain_id     | 9f7e68938fe946a2a862e360bbe40d98 |
| enabled       | True                             |
| id            | d1c4d6198fb940e6b971cf306571ebbd |
| members_count | 0                                |
| name          | myproject                        |
+---------------+----------------------------------+

This command shows the details of the project myproject from the domain mydomain.

4.4.4. vinfra domain project set

Modify an existing project:

usage: vinfra domain project set [--description <description>] [--enable | --disable]
                                 [--name <name>] --domain <domain> <project>
--description <description>
Project description
--enable
Enable project
--disable
Disable project
--name <name>
Project name
--domain <domain>
Domain name or ID
<project>
Project ID or name

Example:

# vinfra cluster domain project set myproject --domain mydomain --disable
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | A custom project                 |
| domain_id   | 9f7e68938fe946a2a862e360bbe40d98 |
| enabled     | False                            |
| id          | d1c4d6198fb940e6b971cf306571ebbd |
| name        | myproject                        |
+-------------+----------------------------------+

This command disables the project myproject from the domain mydomain.

4.4.5. vinfra domain project user list

List users of a project:

usage: vinfra domain project user list --domain <domain> <project>
--domain <domain>
Domain name or ID
<project>
Project ID or name

Example:

# vinfra domain project user list myproject --domain mydomain
+----------------------------------+--------+-------------+---------------+
| id                               | name   | description | role          |
+----------------------------------+--------+-------------+---------------+
| eb0203e6b8a641d8be5b54b2f3fc9f47 | myuser |             | project_admin |
+----------------------------------+--------+-------------+---------------+

This command lists users of the project myproject within the domain mydomain.

4.4.6. vinfra domain project user remove

Remove a user from a project:

usage: vinfra domain project user remove --user <user> --domain <domain> <project>
--user <user>
User name or ID
--domain <domain>
Domain name or ID
<project>
Project ID or name

Example:

# vinfra domain project user remove myproject --domain mydomain --user myuser
Operation successful

This command removes the user myuser from the project myproject within the domain mydomain.

4.4.7. vinfra domain project delete

Delete a domain project:

usage: vinfra domain project delete --domain <domain> <project>
--domain <domain>
Domain name or ID
<project>
project ID or name

Example:

# vinfra domain project delete myproject --domain mydomain
Operation successful

This command deletes the project myproject from the domain mydomain.