3.8. Managing flavors¶
3.8.1. vinfra service compute flavor create¶
Create a new compute flavor:
usage: vinfra service compute flavor create [--swap <size-mb>] --vcpus <vcpus>
--ram <size-mb> <flavor-name>
--swap <size-mb>
- Swap space size, in megabytes
--vcpus <vcpus>
- Number of virtual CPUs
--ram <size-mb>
- Memory size, in megabytes
<flavor-name>
- Flavor name
Example:
# vinfra service compute flavor create myflavor --vcpus 1 --ram 3072
+-------+--------------------------------------+
| Field | Value |
+-------+--------------------------------------+
| id | 561a48ea-0c1c-4152-8b7d-e4b4af276c2d |
| name | myflavor |
| ram | 3072 |
| swap | 0 |
| vcpus | 1 |
+-------+--------------------------------------+
This command creates a flavor myflavor
with 1 vCPU and 3 GB RAM.
3.8.2. vinfra service compute flavor list¶
List compute flavors:
usage: vinfra service compute flavor list [--long]
--long
- Enable access and listing of all fields of objects.
Example:
# vinfra service compute flavor list
+--------------------------------------+----------+-------+------+-------+
| id | name | ram | swap | vcpus |
+--------------------------------------+----------+-------+------+-------+
| 100 | tiny | 512 | 0 | 1 |
| 101 | small | 2048 | 0 | 1 |
| 102 | medium | 4096 | 0 | 2 |
| 103 | large | 8192 | 0 | 4 |
| 104 | xlarge | 16384 | 0 | 8 |
| 561a48ea-0c1c-4152-8b7d-e4b4af276c2d | myflavor | 3072 | 0 | 1 |
+--------------------------------------+----------+-------+------+-------+
This command lists all flavors.
3.8.3. vinfra service compute flavor show¶
Display compute flavor details:
usage: vinfra service compute flavor show <flavor>
<flavor>
- Flavor ID or name
Example:
# vinfra service compute flavor show myflavor
+-------+--------------------------------------+
| Field | Value |
+-------+--------------------------------------+
| id | 561a48ea-0c1c-4152-8b7d-e4b4af276c2d |
| name | myflavor |
| ram | 3072 |
| swap | 0 |
| vcpus | 1 |
+-------+--------------------------------------+
This command shows the details of the flavor myflavor
.
3.8.4. vinfra service compute flavor delete¶
Delete a compute flavor:
usage: vinfra service compute flavor delete <flavor>
<flavor>
- Flavor ID or name
Example:
# vinfra service compute flavor delete myflavor
Operation successful
This command deletes the flavor myflavor
.
Oct 06, 2020