-
Notifications
You must be signed in to change notification settings - Fork 230
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(eos_designs): Validation of structured_config #3077
Feat(eos_designs): Validation of structured_config #3077
Conversation
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
17e6f5b
to
302064d
Compare
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.
LGTM. Tested locally with the converter.
hide_keys: true | ||
description: |- | ||
Custom structured config for interfaces | ||
Note! The content of this dictionary is _not_ validated by the schema, since it can be either ethernet_interfaces or port_channel_interfaces. |
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.
For future perhaps we have ethernet_structured_config and port_channel_structured_config?
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, tested various structured configs in eos_designs locally.
Change Summary
Validation of structured_config
Component(s) name
arista.avd.eos_designs
Proposed changes
structured_config
to ensure proper validation and conversion.required: true
from schemas withtype: list
andprimary_key
set. The primary key is required implicitly when parsed as a list of dicts. By removing therequired: true
from the primary key, we avoid it being required when the item dict is referred in a$ref
.How to test
Added negative unit tests and also tested manually.
Conversion was tested as part of work to develop a conversion script.
Checklist
User Checklist
Repository Checklist