[yang]Fixing sonic-cfg-help to handle nested container#82
Closed
dgsudharsan wants to merge 1 commit intomasterfrom
Closed
[yang]Fixing sonic-cfg-help to handle nested container#82dgsudharsan wants to merge 1 commit intomasterfrom
dgsudharsan wants to merge 1 commit intomasterfrom
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": {
}
}
vivekrnv
reviewed
Nov 22, 2023
| self.print_field_desc(table.get('container'), field) | ||
| elif isinstance(table['container'], list): | ||
| for c in table['container']: | ||
| print("key - " + c.get('@name')) |
Collaborator
There was a problem hiding this comment.
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?
Owner
Author
There was a problem hiding this comment.
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.
vivekrnv
approved these changes
Nov 22, 2023
dgsudharsan
pushed a commit
that referenced
this pull request
Dec 11, 2023
…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
dgsudharsan
pushed a commit
that referenced
this pull request
Mar 27, 2024
…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
dgsudharsan
pushed a commit
that referenced
this pull request
May 12, 2025
…est HEAD automatically (sonic-net#1103) #### Why I did it src/sonic-platform-common ``` * 8129483 - (HEAD -> 202412, origin/202412) [cmis] Separate Flag-Specific Fields for DOM and Status APIs (#82) (18 hours ago) [mssonicbld] ``` #### How I did it #### How to verify it #### Description for the changelog
dgsudharsan
pushed a commit
that referenced
this pull request
May 31, 2025
…tomatically (sonic-net#1140) #### Why I did it src/sonic-swss ``` * b801f2d - (HEAD -> 202412, origin/202412) [202412] [SRv6] add MySID counters support (#82) (2 hours ago) [Yakiv Huryk] ``` #### How I did it #### How to verify it #### Description for the changelog
dgsudharsan
pushed a commit
that referenced
this pull request
Aug 20, 2025
…ically (sonic-net#23555) #### Why I did it src/sonic-dash-ha ``` * cfcc624 - (HEAD -> master, origin/master, origin/HEAD) Support protobuf fields. (#82) (9 hours ago) [dypet] ``` #### How I did it #### How to verify it #### Description for the changelog
dgsudharsan
pushed a commit
that referenced
this pull request
Dec 16, 2025
…tomatically (sonic-net#1600) #### Why I did it src/sonic-gnmi ``` * 64e8539 - (HEAD -> 202412, origin/202412) Merge pull request #97 from Azure/202412-dev (4 hours ago) [Zain Budhwani] |\ | * 0de6456 - Adapt to the new usages of arguments (#93) (6 hours ago) [Changrong Wu] | * 0be3a77 - Remove redundant helper function toString from show_common.go (#86) (23 hours ago) [gnemuw] | * ff54cad - Fetch arguments from path and supply getters with parsed arguments (#82) (25 hours ago) [Zain Budhwani] | * 14660a2 - Add `show dropcounters config` (#79) (33 hours ago) [Changrong Wu] | * 1b7b835 - Added telemetry support for the 'show queue watermark' command. (#72) (5 days ago) [mramezani95] | * 417ebe5 - interaces description implementation (#69) (6 days ago) [Vijay Sharma] | * d3140d8 - Implement 'show ipv6 route' command (#64) (6 days ago) [gnemuw] | * a715f58 - Add show services (#74) (7 days ago) [Zhaoyang Zhang] | * fe4ab1c - Fix the show headroom_pool typo (#76) (7 days ago) [Guoqiang Yuan] | * 0277718 - Add show interface naming_mode (#73) (7 days ago) [axin] | * 03519fe - Add show interface neighbor expected (#54) (7 days ago) [jiayuj2021] | * f29223a - Add 'show ipv6 fib' command (#67) (7 days ago) [Guoqiang Yuan] | * 8ae677e - Add SHOW implementation for processes (#63) (8 days ago) [yiliu4] | * 61927f9 - [202412] Add support of 'show ipv6 link-local-mode' command (#65) (8 days ago) [cgangx] | * 4dca30c - Add show interface flap support (#66) (8 days ago) [axin] | * 18c276b - Add show system memory (#57) (8 days ago) [Changrong Wu] | * 00cc010 - Add support for show interface status (#32) (8 days ago) [Changrong Wu] | * 941b3a2 - Minor changes from VLAN Brief PR Comments (#68) (8 days ago) [Vijay Sharma] | * af89dec - show uptime (#39) (9 days ago) [Vijay Sharma] | * 718ffd7 - Add show ipv6 bgp network (#61) (9 days ago) [Zhaoyang Zhang] | * 8346e29 - [202412] Add support for 'show ipv6 bgp neighbors (#58) (9 days ago) [zitingguo-ms] | * aec577c - Add implementation for show lldp neighbors (#56) (10 days ago) [nanali-msft] | * b561228 - Add show dropcounters counts / capabilities (#40) (13 days ago) [jiayuj2021] | * 16d6ccc - Add support for dev branches in CodeQL analysis (13 days ago) [Zain Budhwani] * 8e41780 - Revert "Sync 202412 dev with 202412 (#94)" (#96) (4 hours ago) [Zain Budhwani] * c5b5383 - Sync 202412 dev with 202412 (#94) (5 hours ago) [Zain Budhwani] ``` #### How I did it #### How to verify it #### Description for the changelog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)