Fix incorrect command examples
The command of 'openstack resource provider show <HOST1_UUID>' does not return the uuid. This patch fixes it. Then following commands use 'host_id' instead of 'server_id'. Change-Id: I60298ea3b22d9dfec2cd7a3e9950ed04aedc6bf5 Closes-Bug: #1853745
This commit is contained in:
parent
3ead7d00a5
commit
0195939588
@ -56,23 +56,19 @@ hosts to run only instances requiring Windows licensing.
|
|||||||
|
|
||||||
# openstack --os-placement-api-version 1.6 trait create CUSTOM_LICENSED_WINDOWS
|
# openstack --os-placement-api-version 1.6 trait create CUSTOM_LICENSED_WINDOWS
|
||||||
|
|
||||||
Discover the ID of ``HOST1``, which is its resource provider UUID
|
Assume ``<HOST1_UUID>`` is the UUID of ``HOST1``, which is the same as its resource provider UUID.
|
||||||
|
|
||||||
.. code-block:: console
|
|
||||||
|
|
||||||
# host_id=$(openstack resource provider show <HOST1_UUID>)
|
|
||||||
|
|
||||||
Start to build the command line by first collecting existing traits for ``HOST1``
|
Start to build the command line by first collecting existing traits for ``HOST1``
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
# traits=$(openstack --os-placement-api-version 1.6 resource provider trait list -f value $server_id | sed 's/^/--trait /')
|
# traits=$(openstack --os-placement-api-version 1.6 resource provider trait list -f value <HOST1_UUID> | sed 's/^/--trait /')
|
||||||
|
|
||||||
Replace ``HOST1``\ 's traits, adding ``CUSTOM_LICENSED_WINDOWS``
|
Replace ``HOST1``\ 's traits, adding ``CUSTOM_LICENSED_WINDOWS``
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
# openstack --os-placement-api-version 1.6 resource provider trait set $traits --trait CUSTOM_LICENSED_WINDOWS $server_id
|
# openstack --os-placement-api-version 1.6 resource provider trait set $traits --trait CUSTOM_LICENSED_WINDOWS <HOST1_UUID>
|
||||||
|
|
||||||
Repeat the above steps for ``HOST2``.
|
Repeat the above steps for ``HOST2``.
|
||||||
|
|
||||||
@ -81,7 +77,7 @@ hosts to run only instances requiring Windows licensing.
|
|||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
openstack --os-compute-api-version 2.53 aggregate set --property trait:CUSTOM_LICENSED_WINDOWS=required ABC
|
# openstack --os-compute-api-version 2.53 aggregate set --property trait:CUSTOM_LICENSED_WINDOWS=required ABC
|
||||||
|
|
||||||
As before, any instance spawned with a flavor or image containing
|
As before, any instance spawned with a flavor or image containing
|
||||||
``trait:CUSTOM_LICENSED_WINDOWS=required`` will land on ``HOST1`` or ``HOST2``
|
``trait:CUSTOM_LICENSED_WINDOWS=required`` will land on ``HOST1`` or ``HOST2``
|
||||||
|
Loading…
x
Reference in New Issue
Block a user