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

Query Parameter support in transformer infra for REST GET operation #102

Conversation

amrutasali
Copy link
Contributor

Transformer infra initial support for following standard REST query-parameters for GET operation(https://datatracker.ietf.org/doc/html/rfc8040#section-4.8) :

  • depth : used to limit the depth of subtrees retrieved for a given GET request.
  • content : used to retrieve config and/or non-config descendant nodes of requested target in a GET request.
  • fields : used to retrieve specific subset of data nodes within the target for a GET request.

Transformer infra enahancement to support :

  • OC Yang list/config/key-leaf & list/state/key-leaf handling in infra allowing app annotation to be skipped.
  • Eliminate key-transformer for multi-leaf list key translation when it matches the corresponding sonic key mappings

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.

ranjinidn and others added 27 commits May 25, 2023 12:18
	-Changes in DbSpec creation, inherit db-name from sonic table, use cvl db-name annotation for sonic yang, utility function changes
	-Support exclusion of sonic yangs xfmr support from models list
…ang table containing a singleton container and UT cases exercising this mapping using table-name and key-name annotations
…ranslib fills ygot in request iteslf and when there is onctent mismatch one cannot return that ygot and has to return empty.2)Handle singleton container case for fields query-parameter processing.
…ate/key-leaf allowing application annotation to be skipped and also avoiding translating into db key-attribute in value hash
…m:amrutasali/sonic-mgmt-common into transformerinfra_query_parameter_support
amrutasali and others added 2 commits September 13, 2023 14:19
… as an optimized way to fill list-key leaves inside the config and state containers instead of extracting from the URI string
…:amrutasali/sonic-mgmt-common into transformerinfra_query_parameter_support
Copy link
Contributor

@a-barboza a-barboza left a comment

Choose a reason for hiding this comment

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

This is a pre-requisite for sonic-net/sonic-mgmt-framework#119

There is a dependency on the pruning PR for subtree transformers, to be opened subsequently.

@anand-kumar-subramanian anand-kumar-subramanian merged commit cdd83d7 into sonic-net:master Sep 27, 2023
2 checks passed
@liushilongbuaa
Copy link
Contributor

@amrutasali , PR didn't merged in to sonic-buildimage.
sonic-net/sonic-buildimage#16744
Please help check!

@amrutasali
Copy link
Contributor Author

@amrutasali , PR didn't merged in to sonic-buildimage. sonic-net/sonic-buildimage#16744 Please help check!

@liushilongbuaa This PR in sonic-mgmt-common - #102
should go in together with the PR in sonic-mgmt-framework PR sonic-net/sonic-mgmt-framework#119
since they have build dependency

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