Skip to content

Transformer Infra support for sonic yang structure deviations from flattened structure - sibling list to singleton container and nested list#129

Merged
kwangsuk merged 12 commits intosonic-net:masterfrom
amrutasali:transformer_infra_handling_for_sonic_yang_deviations
Apr 24, 2024
Merged

Transformer Infra support for sonic yang structure deviations from flattened structure - sibling list to singleton container and nested list#129
kwangsuk merged 12 commits intosonic-net:masterfrom
amrutasali:transformer_infra_handling_for_sonic_yang_deviations

Conversation

@amrutasali
Copy link
Contributor

@amrutasali amrutasali commented Mar 22, 2024

What we did:
1.) Added support in transformer infra to handle nested list under a list which is an immediate child of table level container in Sonic Yang. This satisfies the dynmic fields in DB case.eg. https://github.com/sonic-net/sonic-buildimage/blob/master/src/sonic-yang-models/yang-models/sonic-cable-length.yang#L40
2.) Sibling list to singleton container eg. https://github.com/sonic-net/sonic-buildimage/blob/master/src/sonic-yang-models/yang-models/sonic-telemetry_client.yang#L89C12-L89C30

Why we did it?
To allow applications using the above mentioned sonic yang structures to make configurations and retrieval of DB data via mgmt-framework when sonic yang is used as NBI.

How did we verify the changes?
Verification done using unit tests on transformer test yang and added new cases for above.
Unit test run results are part of pipeline test run.
Note :The pipeline run of this PR to be successful is dependent on PR - to be merged first.

amrutasali and others added 7 commits March 22, 2024 16:14
…LETE flow b)modified DELETE flow to support sibling list to singleton container
… utilities b)modified GET flow to support sibling list to singleton container
 Before adding default value to result map, check if result map already has the field and add only if not present
            - Check for fillFields fields in resultMap for field delete case.
            - do not create table entry with NULL/NULL attribute when there are defaults from the translated result to be configutetd alongside for OC yang also
…gleton container and list and a nested list table
…f github.com:amrutasali/sonic-mgmt-common into transformer_infra_handling_for_sonic_yang_deviations
@adyeung
Copy link

adyeung commented Apr 3, 2024

@anand-kumar-subramanian @sachinholla pls help review the change

kwangsuk
kwangsuk previously approved these changes Apr 3, 2024
…as the CVL changes are in review and ready to be merged
…f github.com:amrutasali/sonic-mgmt-common into transformer_infra_handling_for_sonic_yang_deviations
@ranjinidn
Copy link
Contributor

ranjinidn commented Apr 8, 2024

@anand-kumar-subramanian Please can you re-review this PR. The CVL changes are pulled in and tested in this PR.

@amrutasali
Copy link
Contributor Author

Ping @faraazbrcm @sachinholla @anand-kumar-subramanian
please review.
The CVL changes - #134 on which this PR was dependent on is already merged

@kwangsuk kwangsuk merged commit 5f1191e into sonic-net:master Apr 24, 2024
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.

6 participants