Skip to content

extention of documentation for flexible tagging #536

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion source/adminguide/host_and_storage_tags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,22 @@ To overcome these situations, ACS allows hosts and storages to have tags that ar

Configuring flexible tags on hosts is carried out through the ``updateHost`` API, entering the rule in the ``hosttags`` field. On the other hand, configuring flexible tags in the storages is done using the ``updateStoragePool`` API, informing the rule in the ``tags`` field. For the informed tag to be effectively interpreted as JavaScript, you must declare the ``istagarule`` parameter as true whenever you use one of the APIs presented.

It is worth mentioning that the compute offering or disk offering tags are injected in list format. Thus, when validating an offering with tags ``A, B``, during processing, there will be the variable ``tags``, where ``tags[0]`` will be tag A, and ``tags[1]`` will be tag B.
It is worth mentioning that the compute offering or disk offering tags are injected in list format. Thus, when validating an offering with tags ``A, B``, during processing, there will be the variable ``tags``, where ``tags[0]`` will be tag A, and ``tags[1]`` will be tag B. The order of the tags is significant and can affect the outcome, depending on how they are implemented.

Example: tags[0] == "slow" || tags[1] == "fast"
Tags and results:
“slow,fast” -> TRUE
“fast,slow” -> FALSE
“fast” -> FALSE

If you want to avoid dependency on tag order, use the following approach:

Example: tags.indexOf('slow') >= 0 || tags.indexOf('fast') >= 0
Tags and results:
“slow,fast” -> TRUE
“fast,slow” -> TRUE
“fast” -> TRUE


It's also important to mention that flexible tags are not compatible with quota's activation rules.

Expand Down