Skip to content

Conversation

@ingox
Copy link
Contributor

@ingox ingox commented Jul 29, 2025

Documentation has been extended with examples and details about the order of the tags.
The following tests have been made:

no tag js rule tag (host2) js rule (host2) host tag on compute offering result
1 slow no tags[0] == slow && tags[1] == fast yes fast Error
Unable to execute script [ tags = 'slow,fast'; tags = tags ? tags.split(',') : [];tags[0] == slow || tags[1] == fast] due to [javax.script.ScriptException: ReferenceError: "slow" is not defined in at line number 1]
2 slow no tags[0] == slow || tags[1] == fast yes fast Error
Unable to execute script [ tags = 'slow,fast'; tags = tags ? tags.split(',') : [];tags[0] == slow || tags[1] == fast] due to [javax.script.ScriptException: ReferenceError: "slow" is not defined in at line number 1]
3 slow no tags[0] == "slow" && tags[1] == "fast" yes fast Error
No suitable host found.
4 slow no tags[0] == "slow" || tags[1] == "fast" yes fast Error
No suitable host found.
5 slow no tags[0] == "slow" || tags[0] == "fast" yes fast Success
6 slow no tags[0] == "slow" || tags[1] == "fast" yes slow,fast Success
7 slow no tags[0] == "slow" || tags[0] == "fast" yes fast,slow Success
8 slow no tags[0] == "slow" || tags[1] == "fast" yes fast,slow Error
No suitable host found.
9 slow no tags.indexOf('slow') >= 0 || tags.indexOf('fast') >= 0 yes fast Success

📚 Documentation preview 📚: https://cloudstack-documentation--536.org.readthedocs.build/en/536/

@ingox
Copy link
Contributor Author

ingox commented Jul 29, 2025

Hello @JoaoJandre,
I kindly ask you for review of my changes.
Many thanks in advance.
Best regards,
Ingo

@ingox ingox marked this pull request as ready for review July 29, 2025 06:44
Copy link
Contributor

@JoaoJandre JoaoJandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is more related to JS/programming logic than to flexible tags. However, I see no issue in adding an example to facilitate the use of the feature.
Thanks for incrementing the documentation @ingox

@sureshanaparti
Copy link
Contributor

@blueorangutan docbuild

@blueorangutan
Copy link

@sureshanaparti a Jenkins job has been kicked to build the document. I'll keep you posted as I make progress.

@blueorangutan
Copy link

QA-Doc build preview: https://qa.cloudstack.cloud/builds/docs-build/pr/536. (QA-JID 404)

@DaanHoogland DaanHoogland merged commit 26d0c07 into apache:main Aug 6, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants