-
Notifications
You must be signed in to change notification settings - Fork 34
feat(anta.tests): Added testcase to verify DNS ip name server #537
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
Conversation
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
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.
Thanks Mahesh. Since services.py is a new module, you need to create the documentation: anta/docs/api/tests.services.md and add the section in anta/docs/api/tests.md.
Finally add your newly created MD file to mkdocs.yml. Double check the doc with mkdocs serve.
Thanks
anta/custom_types.py
Outdated
@@ -66,3 +66,4 @@ def interface_case_sensitivity(v: str) -> str: | |||
EncryptionAlgorithm = Literal["RSA", "ECDSA"] | |||
RsaKeySize = Literal[2048, 3072, 4096] | |||
EcdsaKeySize = Literal[256, 384, 521] | |||
DnsServerPriority = Annotated[int, Field(ge=0, le=4)] |
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 doubt this will be used in another test so you can use it directly in the model.
DnsServerPriority = Annotated[int, Field(ge=0, le=4)] |
anta/tests/services.py
Outdated
"""The IPv4/IPv6 address of the DNS server.""" | ||
vrf: str = "default" | ||
"""The VRF for the DNS server. Defaults to 'default' if not provided.""" | ||
priority: DnsServerPriority |
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.
priority: DnsServerPriority | |
priority: int = Field(ge=0, le=4) |
anta/tests/services.py
Outdated
vrf: str = "default" | ||
"""The VRF for the DNS server. Defaults to 'default' if not provided.""" | ||
priority: DnsServerPriority | ||
"""The priority of the DNS server.""" |
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.
"""The priority of the DNS server.""" | |
"""The priority of the DNS server from 0 to 4, lower is first.""" |
# Use of this source code is governed by the Apache License 2.0 | ||
# that can be found in the LICENSE file. | ||
""" | ||
Tests for anta.tests.security.py |
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.
Tests for anta.tests.security.py | |
Tests for anta.tests.services.py |
Conflicts have been resolved. A maintainer will review the pull request shortly. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
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.
LGTM
Conflicts have been resolved. A maintainer will review the pull request shortly. |
Description
Added testcase to verify DNS ip name server
Fixes #535
Checklist:
pre-commit run
)tox -e testenv
)