2.6. Managing node location

2.6.1. vinfra location list

List locations of the specified failure domain:

usage: vinfra location list --fd <fd>
--fd <fd>
Failure domain ID

Example:

# vinfra location list --fd 4
+----+--------------+----------+
| id | name         | children |
+----+--------------+----------+
|  0 | Default room | - 0      |
+----+--------------+----------+

This command lists the locations.

Note

The children column lists the ID of children, not their quantity.

2.6.2. vinfra location create

Create a new child location of the specified failure domain within the parent location identified by ID:

usage: vinfra location create --fd <fd> --name <location-name>
                              [--parent-id <parent-id>]
--fd <fd>
Failure domain ID
--name <location-name>
Name of the location to be created.
--parent-id <parent-id>
ID of the parent location where the child location should be created in.

Example:

# vinfra location create --fd 3 --name row2 --parent-id 0
+----------+-------+
| Field    | Value |
+----------+-------+
| children | []    |
| id       | 1     |
| name     | row2  |
| parent   | 0     |
+----------+-------+

This command creates the location row2.

Note

To create a location of level 4 (room), do not use the --parent-id argument.

2.6.3. vinfra location rename

Change the name of the location of the specified failure domain and identified by ID:

usage: vinfra location rename --fd <fd> --id <location-id>
                              --name <location-name>
--fd <fd>
Failure domain ID.
--id <location-id>
ID of the location to rename.
--name <location-name>
The new location name.

Example:

# vinfra location rename --fd 3 --id 2 --name row_renamed
Operation successful.

This command renames the location 2 to row_renamed.

Task outcome:

# vinfra location list --fd 3
+----+-------------+--------+----------+
| id | name        | parent | children |
+----+-------------+--------+----------+
|  0 | Default row |      0 | - 0      |
|  2 | row_renamed |      1 | []       |
+----+-------------+--------+----------+

2.6.4. vinfra location show

Show the location of the specified failure domain and identified by ID:

usage: vinfra location show --fd <fd> --id <location-id>
--fd <fd>
Failure domain ID.
--id <location-id>
ID of the location to show.

Example:

# vinfra location show --fd 3 --id 2
+----------+-------------+
| Field    | Value       |
+----------+-------------+
| children | []          |
| id       | 2           |
| name     | row_renamed |
| parent   | 1           |
+----------+-------------+

This command shows the location 2.

2.6.5. vinfra location move

Move locations identified by IDs to the parent location of the specified failure domain and identified by ID:

usage: vinfra location move --children <children> [<children> ...]
                         --parent-fd <parent-fd> --parent-id <parent-id>
--children <children> [<children> ...]
IDs of locations to be moved to the parent location.
--parent-fd <parent-fd>
The failure domain of the parent location.
--parent-id <parent-id>
ID of the parent location.

Example:

# vinfra location move --children 2 --parent-fd 4 --parent-id 1
Operation successful.

This command moves the location (row) 2 to the failure domain 4 (room) with ID 1.

2.6.6. vinfra location delete

Delete the location of specified failure domain and identified by ID.

usage: vinfra location delete --fd <fd> --id <location-id>
--fd <fd>
Failure domain ID.
--id <location-id>
ID of the location to delete.

Example:

# vinfra location delete --fd 3 --id 1
Operation successful.

This command deletes the location 1.