-
Notifications
You must be signed in to change notification settings - Fork 28
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
feat(anta): Add tag mapping between devices and tests #377
Conversation
ecf88ff
to
ab23c29
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we probably need to add in the doc some example of "using tags" and saying what test will be executed or not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about having the logic below?
Init:
- Assuming tag:
leaf
is applied to some devices and tests. - All tests are marked with tag
all
by default - All devices are not marked with any tag by default
Logic:
- Tests with tag
all
are run on every devices - A test with tag
all
cannot have any other tag (all
includes all the tags) - All the tests marked with tag:
leaf
are executed on all devices marked with tag:leaf
- All tests that do not have any tags are skipped
- All tests marked with a tag that do not match any device are skipped
dea764c
to
26258ae
Compare
I have added a dedicated page for tags and behaviours |
Co-authored-by: Guillaume Mulocher <gmulocher@arista.com>
a90d008
to
4b95c7d
Compare
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Conflicts have been resolved. A maintainer will review the pull request shortly. |
487c775
to
8d103ee
Compare
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Conflicts have been resolved. A maintainer will review the pull request shortly. |
03b3f20
to
8d103ee
Compare
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Conflicts have been resolved. A maintainer will review the pull request shortly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ship it 🐜
Co-authored-by: Guillaume Mulocher <gmulocher@arista.com>
Co-authored-by: Guillaume Mulocher <gmulocher@arista.com>
Overview
The
--tags
option can be used to target specific devices in your inventory and run only tests configured with this specific tags from your catalog. Expected behaviour is provided below:none
tag
definition in your inventory and tests catalog. And tests with no tag are executed on all devices--tags leaf
leaf
tag on all devices configured withleaf
tag.All other tags are ignored
--tags leaf,spine
leaf
tag on all devices configured withleaf
tag.Run all tests marked with
spine
tag on all devices configured withspine
tag.All other tags are ignored
Usage example
Inventory & Tests
Inventory
Tests
CLI output