Docs: Document using operators with root device hints

This patch is adding documentation for operators in root device hints:
In which release they are available, what are the supported operators
and few usage examples.

The patch also adds a link to the documentation in the release note.

Closes-Bug: #1561137
Change-Id: I419ca5b07238a3996bcc0c76560349ad70a93f52
This commit is contained in:
Lucas Alvares Gomes 2016-10-14 14:44:38 -03:00
parent e1f4cbdab3
commit 45b85e580e
2 changed files with 44 additions and 3 deletions

View File

@ -47,5 +47,45 @@ That will guarantee that Bare Metal service will pick the disk device that
has the ``wwn`` equal to the specified wwn value, or fail the deployment if it
can not be found.
The hints can have an operator at the beginning of the value string. If
no operator is specified the default is ``==`` (for numerical values)
and ``s==`` (for string values). The supported operators are:
* For numerical values:
* ``=`` equal to or greater than. This is equivalent to ``>=`` and is
supported for `legacy reasons <http://docs.openstack.org/developer/nova/filter_scheduler.html#ComputeCapabilitiesFilter>`_
* ``==`` equal to
* ``!=`` not equal to
* ``>=`` greater than or equal to
* ``>`` greater than
* ``<=`` less than or equal to
* ``<`` less than
* For strings (as python comparisons):
* ``s==`` equal to
* ``s!=`` not equal to
* ``s>=`` greater than or equal to
* ``s>`` greater than
* ``s<=`` less than or equal to
* ``s<`` less than
* ``<in>`` substring
* For collections:
* ``<all-in>`` all elements contained in collection
* ``<or>`` find one of these
Examples are:
* Finding a disk larger or equal to 60 GiB and non-rotational (SSD)::
ironic node-update <node-uuid> add properties/root_device='{"size": ">= 60", "rotational": false}'
* Finding a disk whose vendor is ``samsung`` or ``winsys``::
ironic node-update <node-uuid> add properties/root_device='{"vendor": "<or> samsung <or> winsys"}'
.. note::
If multiple hints are specified, a device must satisfy all the hints.

View File

@ -1,6 +1,7 @@
---
features:
- Adds support for using operators with the root device hints mechanism.
The currently supported operators are, ``=``, ``==``, ``!=``, ``>=``,
``<=``, ``>``, ``<``, ``s==``, ``s!=``, ``s>=``, ``s>``, ``s<=``,
``s<``, ``<in>``, ``<all-in>`` and ``<or>``.
The supported operators are, ``=``, ``==``, ``!=``, ``>=``,
``<=``, ``>``, ``<``, ``s==``, ``s!=``, ``s>=``, ``s>``,
``s<=``, ``s<``, ``<in>``, ``<all-in>`` and ``<or>``. See
http://docs.openstack.org/project-install-guide/baremetal/draft/advanced.html#specifying-the-disk-for-deployment-root-device-hints