Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

dgsudharsan
Copy link
Owner

@dgsudharsan dgsudharsan commented Nov 22, 2023

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.

"AUTO_TECHSUPPORT": {
        "GLOBAL": {
         }
}
Work item tracking
  • Microsoft ADO (number only):

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)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

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)

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'))

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?

Copy link
Owner Author

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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, okay

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants