Skip to content

Commit 26d0c07

Browse files
authored
extention of documentation for flexible tagging (#536)
1 parent dc07486 commit 26d0c07

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

source/adminguide/host_and_storage_tags.rst

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,22 @@ To overcome these situations, ACS allows hosts and storages to have tags that ar
144144

145145
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.
146146

147-
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.
147+
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.
148+
149+
Example: tags[0] == "slow" || tags[1] == "fast"
150+
Tags and results:
151+
“slow,fast” -> TRUE
152+
“fast,slow” -> FALSE
153+
“fast” -> FALSE
154+
155+
If you want to avoid dependency on tag order, use the following approach:
156+
157+
Example: tags.indexOf('slow') >= 0 || tags.indexOf('fast') >= 0
158+
Tags and results:
159+
“slow,fast” -> TRUE
160+
“fast,slow” -> TRUE
161+
“fast” -> TRUE
162+
148163

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

0 commit comments

Comments
 (0)