Merge "flavors: Use openstack-client"

This commit is contained in:
Jenkins 2016-02-16 21:44:57 +00:00 committed by Gerrit Code Review
commit 48ff66f1f0

View File

@ -4,20 +4,19 @@
Flavors
=======
Admin users can use the :command:`nova flavor-` commands to customize and
manage flavors. To see the available flavor-related commands, run:
Admin users can use the :command:`openstack flavor` command to customize and
manage flavors. To see information for this command, run:
.. code-block:: console
$ nova help | grep flavor-
flavor-access-add Add flavor access for the given tenant.
flavor-access-list Print access information about the given flavor.
flavor-access-remove Remove flavor access for the given tenant.
flavor-create Create a new flavor
flavor-delete Delete a specific flavor
flavor-key Set or unset extra_spec for a flavor.
flavor-list Print a list of available 'flavors' (sizes of
flavor-show Show details about the given flavor.
$ openstack flavor --help
Command "flavor" matches:
flavor create
flavor delete
flavor list
flavor set
flavor show
flavor unset
.. note::
@ -82,8 +81,9 @@ CPU limits
.. code-block:: console
$ nova flavor-key m1.small set quota:read_bytes_sec=10240000
$ nova flavor-key m1.small set quota:write_bytes_sec=10240000
$ openstack flavor set FLAVOR-NAME \
--property quota:read_bytes_sec=10240000 \
--property quota:write_bytes_sec=10240000
Use these optional parameters to control weight shares, enforcement
intervals for runtime quotas, and a quota for maximum allowed
@ -126,8 +126,9 @@ CPU limits
.. code-block:: console
$ nova flavor-key m1.low_cpu set quota:cpu_quota=10000
$ nova flavor-key m1.low_cpu set quota:cpu_period=20000
$ openstack flavor set FLAVOR-NAME \
--property quota:cpu_quota=10000 \
--property quota:cpu_period=20000
In this example, the instance of ``m1.low_cpu`` can only consume
a maximum of 50% CPU of a physical CPU computing capability.
@ -160,8 +161,9 @@ Memory limits
.. code-block:: console
$ nova flavor-key m1.medium set quota:memory_shares_level=custom
$ nova flavor-key m1.medium set quota:memory_shares_share=15
$ openstack flavor set FLAVOR-NAME \
--property quota:memory_shares_level=custom \
--property quota:memory_shares_share=15
Disk I/O limits
For VMware, you can configure the resource limits for disk
@ -195,7 +197,8 @@ Disk I/O limits
.. code-block:: console
$ nova flavor-key m1.medium set quota:disk_io_reservation=2000
$ openstack flavor set FLAVOR-NAME \
--property quota:disk_io_reservation=2000
Disk tuning
Using disk I/O quotas, you can set maximum disk write to 10 MB per
@ -203,7 +206,8 @@ Disk tuning
.. code-block:: console
$ nova flavor-key m1.medium set quota:disk_write_bytes_sec=10485760
$ openstack flavor set FLAVOR-NAME \
--property quota:disk_write_bytes_sec=10485760
The disk I/O options are:
@ -270,13 +274,13 @@ Bandwidth I/O
.. code-block:: console
$ nova flavor-key nlimit set quota:vif_outbound_average=32768
$ nova flavor-key nlimit set quota:vif_outbound_peak=65536
$ nova flavor-key nlimit set quota:vif_outbound_burst=65536
$ nova flavor-key nlimit set quota:vif_inbound_average=32768
$ nova flavor-key nlimit set quota:vif_inbound_peak=65536
$ nova flavor-key nlimit set quota:vif_inbound_burst=65536
$ openstack flavor set FLAVOR-NAME \
--property quota:vif_outbound_average=32768 \
--property quota:vif_outbound_peak=65536 \
--property quota:vif_outbound_burst=65536 \
--property quota:vif_inbound_average=32768 \
--property quota:vif_inbound_peak=65536 \
--property quota:vif_inbound_burst=65536
.. note::
@ -295,7 +299,7 @@ Watchdog behavior
.. code-block:: console
$ nova flavor-key FLAVOR-NAME set hw:watchdog_action=ACTION
$ openstack flavor set FLAVOR-NAME --property hw:watchdog_action=ACTION
Valid ACTION values are:
@ -322,9 +326,10 @@ Random-number generator
.. code-block:: console
$ nova flavor-key FLAVOR-NAME set hw_rng:allowed=True
$ nova flavor-key FLAVOR-NAME set hw_rng:rate_bytes=RATE-BYTES
$ nova flavor-key FLAVOR-NAME set hw_rng:rate_period=RATE-PERIOD
$ openstack flavor set FLAVOR-NAME \
--property hw_rng:allowed=True \
--property hw_rng:rate_bytes=RATE-BYTES \
--property hw_rng:rate_period=RATE-PERIOD
Where:
@ -340,12 +345,13 @@ CPU topology
.. code-block:: console
$ nova flavor-key FLAVOR-NAME set hw:cpu_sockets=FLAVOR-SOCKETS
$ nova flavor-key FLAVOR-NAME set hw:cpu_cores=FLAVOR-CORES
$ nova flavor-key FLAVOR-NAME set hw:cpu_threads=FLAVOR-THREADS
$ nova flavor-key FLAVOR-NAME set hw:cpu_max_sockets=FLAVOR-SOCKETS
$ nova flavor-key FLAVOR-NAME set hw:cpu_max_cores=FLAVOR-CORES
$ nova flavor-key FLAVOR-NAME set hw:cpu_max_threads=FLAVOR-THREADS
$ openstack flavor set FLAVOR-NAME \
--property hw:cpu_sockets=FLAVOR-SOCKETS \
--property hw:cpu_cores=FLAVOR-CORES \
--property hw:cpu_threads=FLAVOR-THREADS \
--property hw:cpu_max_sockets=FLAVOR-SOCKETS \
--property hw:cpu_max_cores=FLAVOR-CORES \
--property hw:cpu_max_threads=FLAVOR-THREADS
Where:
@ -365,7 +371,7 @@ Core pinning
.. code:: console
$ nova flavor-key FLAVOR-NAME set hw:dedicated=PIN-POLICY
$ openstack flavor set FLAVOR-NAME --property hw:dedicated=PIN-POLICY
Valid PIN-POLICY values are:
@ -390,5 +396,4 @@ Project private flavors
.. code-block:: console
$ nova flavor-create --is-public false p1.medium auto 512 40 4
$ nova flavor-access-add 259d06a0-ba6d-4e60-b42d-ab3144411d58 86f94150ed744e08be565c2ff608eef9
$ openstack flavor create --private p1.medium auto 512 40 4