-
Notifications
You must be signed in to change notification settings - Fork 212
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
Refactor(eos_designs): Move custom_structured_configuration to python #2268
Refactor(eos_designs): Move custom_structured_configuration to python #2268
Conversation
e639e6f
to
facba23
Compare
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
9402665
to
9973bd9
Compare
Conflicts have been resolved. A maintainer will review the pull request shortly. |
9973bd9
to
a786c41
Compare
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
e39e068
to
ead7752
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
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 - successfully tested with two customer inventories.
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.
Tested on project repo using quite a lot of custom_structured_configuration - no change to target confg
.../avd/roles/eos_designs/python_modules/custom_structured_configuration/avdstructuredconfig.py
Outdated
Show resolved
Hide resolved
.../avd/roles/eos_designs/python_modules/custom_structured_configuration/avdstructuredconfig.py
Outdated
Show resolved
Hide resolved
.../avd/roles/eos_designs/python_modules/custom_structured_configuration/avdstructuredconfig.py
Outdated
Show resolved
Hide resolved
.../avd/roles/eos_designs/python_modules/custom_structured_configuration/avdstructuredconfig.py
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,3 @@ | |||
from .avdstructuredconfig import AvdStructuredConfig |
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 am confused why it is .avdstructuredconfig
. I haven't used this feature before. So just curious to know.
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.
However, explicit relative imports are an acceptable alternative to absolute imports, especially when dealing with complex package layouts where using absolute imports would be unnecessarily verbose:
from . import sibling
from .sibling import example
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.
@tgodaA I will merge this, and we can discuss offline.
Change Summary
Move custom_structured_configuration to python
Component(s) name
arista.avd.eos_designs
Proposed changes
custom_structured_configuration
and variousstructured_config
keys in python instead of jinja2struct_cfg
keys from generated structured configuration.How to test
Rerun molecule. Only diff is removing
struct_cfg
keys which we don't want in there (since they don't conform to the schema).Also tested with large customer repo. Runtime for structured_config without PR: 216 seconds. With PR: 88 seconds !!
Checklist
User Checklist
Repository Checklist