-
Notifications
You must be signed in to change notification settings - Fork 0
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
[yang]Fixing sonic-cfg-help to handle nested container #82
Conversation
Fixing sonic-cfg-help to handle nested container scenario. In case of nested container, the inner container name acts as key for the table. For e.g. "AUTO_TECHSUPPORT": { "GLOBAL": { } }
self.print_field_desc(table.get('container'), field) | ||
elif isinstance(table['container'], list): | ||
for c in table['container']: | ||
print("key - " + c.get('@name')) |
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.
Can we filter the common logic b/w these two, i.e. handling a single container dictinto a separate function and re-use in both the cases?
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.
print_field_desc is purpose is to do that - print a container. In the list case we loop through the list and call this API. The only additional line is printing the key. I prefer to keep this outside of print_field_desc function and so you had one line of duplication.
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 see, okay
…utomatically (sonic-net#17229) #### Why I did it src/sonic-host-services ``` * 689395a - (HEAD -> 202305, origin/202305) Updated the iptable rule to use parent/base name of midplane interface of chassis. (#75) (2 days ago) [abdosi] * 45212a8 - [DualToR][caclmgrd] Fix IPtables rules for multiple vlan interfaces for DualToR config (#82) (2 days ago) [vdahiya12] ``` #### How I did it #### How to verify it #### Description for the changelog
…e latest HEAD automatically (sonic-net#18374) #### Why I did it src/wpasupplicant/sonic-wpa-supplicant ``` * 13e6f1100 - (HEAD -> master, origin/master, origin/HEAD) Fix a memory leak introduced by last commit for high level EVP API #82 (64 minutes ago) [xumia] |\ | failure_prs.log 225157a01 - Merge branch 'master' into master (3 days ago) [wumiao_nokia] | |\ | |/ |/| * | 413704a6c - Provide CMAC high level API replacement #81 (4 days ago) [xumia] | failure_prs.log c7eafc778 - Fix a memory leak introduced by last commit for high level EVP API for CMAC (3 days ago) [wumiao_nokia] |/ * 8521d4abb - Fix a port issue (6 days ago) [wumiao_nokia] * 01a39044a - Provide CMAC high level API replacement (6 days ago) [wumiao_nokia] ``` #### How I did it #### How to verify it #### Description for the changelog
Why I did it
Fixing sonic-cfg-help to handle nested container scenario. In case of nested container, the inner container name acts as key for the table. For e.g.
Work item tracking
How I did it
Fixing sonic-cfg-help tool to handle nested container
How to verify it
Added UT to verify it.
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)