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] Fix issue: Non compliant leaf list in config_db schema #135

Closed
wants to merge 3 commits into from

Conversation

Junchao-Mellanox
Copy link
Owner

@Junchao-Mellanox Junchao-Mellanox commented Mar 15, 2022

Why I did it

Fix issue: Non compliant leaf list in config_db schema

How I did it

The basic flow of DPB is like:

  1. Transfer config db json value to YANG json value, name it “yangIn”
  2. Validate “yangIn” by libyang
  3. Generate a YANG json value to represent the target configuration, name it “yangTarget”
  4. Do diff between “yangIn” and “yangTarget”
  5. Apply the diff to CONFIG DB json and save it back to DB

The fix:
• For step #1, If value of a leaf-list field string type, transfer it to a list by splitting it with “,” the purpose here is to make step#2 happy. We also need to save <table_name>..<field_name> to a set named “leaf_list_with_string_value_set”.
• For step#5, loop “leaf_list_with_string_value_set” and change those fields back to a string.

How to verify it

1.Manual test
2. Changed sample config DB and unit test passed

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

Junchao-Mellanox pushed a commit that referenced this pull request Apr 17, 2023
Why I did it
[Submodule][202211] Advance sonic-restapi pointer

The branch 202012 has already updated to commit 47e4b53.

4f6f979 Fix the redis security issue CVE-2023-28858 and CVE-2023-28859 (#139)
47e4b53 Fix adv_pfx len for ipv6 (#135)
44121be Support ipv6 prefix lenght greater than 64 and check for adv_prefix (#134)
99c467d Add API support for adv prefix and custom monitoring (#133)
347684a Use github code scanning instead of LGTM (#132)
86543d0 Updates to route PATCH API (#129)
a1af82c Install libyang to azure pipeline (#128)
2007c4c Increase coverage threshold (#126)

Work item tracking
Microsoft ADO (number only): 17705422
How I did it
How to verify it
Junchao-Mellanox pushed a commit that referenced this pull request Jul 24, 2023
…lly (sonic-net#15929)

#### Why I did it
src/sonic-gnmi
```
* fb338d5 - (HEAD -> master, origin/master, origin/HEAD) Merge pull request #135 from liuh-80/dev/liuh/cherry-pick-zmq (3 hours ago) [Hua Liu]
* f8d9c7e - Merge branch 'master' into dev/liuh/cherry-pick-zmq (8 hours ago) [Qi Luo]
* cbd5185 - Fix PR comments (26 hours ago) [liuh-80]
* 226fc31 - Fix PR comments (2 days ago) [liuh-80]
* 6579847 - Fix UT (3 days ago) [liuh-80]
* 53713c3 - Improve code coverage (3 days ago) [liuh-80]
* d8ff562 - Fix UT (3 days ago) [liuh-80]
* c3a66bc - Cherry-pick ZMQ change from nvidia repo (3 days ago) [liuh-80]
```
#### How I did it
#### How to verify it
#### Description for the changelog
Junchao-Mellanox pushed a commit that referenced this pull request Jul 18, 2024
…utomatically (sonic-net#19415)

#### Why I did it
src/sonic-host-services
```
* 02d9b55 - (HEAD -> master, origin/master, origin/HEAD) Added support to render template format of `delayed` flag on Feature Table. (#135) (28 hours ago) [abdosi]
* 60fdfea - Fixed determine/process reboot-cause service dependency (sonic-net#17406) (#132) (13 days ago) [anamehra]
```
#### How I did it
#### How to verify it
#### Description for the changelog
Junchao-Mellanox pushed a commit that referenced this pull request Aug 8, 2024
…utomatically (sonic-net#19551)

#### Why I did it
src/sonic-host-services
```
* aea0bef - (HEAD -> 202405, origin/202405) Ignore sonic_platform package fileNotFoundError on non-chassis vs platforms (#133) (#140) (4 minutes ago) [mssonicbld]
* 0e7e4d5 - Added support to render template format of `delayed` flag on Feature Table. (#135) (#137) (11 days ago) [mssonicbld]
* 235c2a4 - Fixed determine/process reboot-cause service dependency (sonic-net#17406) (#132) (13 days ago) [anamehra]
```
#### 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