This is an automated email from the ASF dual-hosted git repository.
dahn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack-documentation.git
The following commit(s) were added to refs/heads/main by this push:
new 26d0c071 extention of documentation for flexible tagging (#536)
26d0c071 is described below
commit 26d0c0715e8be0e6bd3b5860743bf612f0a4fee1
Author: ingox <[email protected]>
AuthorDate: Wed Aug 6 10:46:20 2025 +0200
extention of documentation for flexible tagging (#536)
---
source/adminguide/host_and_storage_tags.rst | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/source/adminguide/host_and_storage_tags.rst
b/source/adminguide/host_and_storage_tags.rst
index 984120f1..026beccb 100644
--- a/source/adminguide/host_and_storage_tags.rst
+++ b/source/adminguide/host_and_storage_tags.rst
@@ -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.