-
Notifications
You must be signed in to change notification settings - Fork 26
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
fix(anta): Implement Pydantic class to replace RawCatalogInput type #906
base: main
Are you sure you want to change the base?
fix(anta): Implement Pydantic class to replace RawCatalogInput type #906
Conversation
CodSpeed Performance ReportMerging #906 will not alter performanceComparing Summary
|
@@ -35,8 +35,37 @@ | |||
|
|||
logger = logging.getLogger(__name__) | |||
|
|||
# { <module_name> : [ { <test_class_name>: <input_as_dict_or_None> }, ... ] } | |||
RawCatalogInput = dict[str, list[dict[str, Optional[dict[str, Any]]]]] |
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.
Removing this will break AVD. We use that type here: https://github.com/aristanetworks/avd/blob/devel/ansible_collections/arista/avd/plugins/plugin_utils/eos_validate_state_utils/get_anta_results.py#L170
for more information, see https://pre-commit.ci
Quality Gate passedIssues Measures |
Description
Implement a pydantic class to replace typing definition of
RawCatalogInput
. So it can be used as a JSON schema to validate user input like inventory models.Checklist:
pre-commit run
)tox -e testenv
)