forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return ygot strcut from app module processGet() functions (sonic-net#72)
* Return ygot strcut from app module processGet() functions * Updated the appInterface method processGet() to accept a TranslibFmtType argument indicating whether the response data should be returned as IETF json bytes or a ygot.GoStruct object. Translib subscription infra will use TranslibFmtType=ygot. The translib.Get() API will continue to use TranslibFmtType=ietf_json. * Modified processGet() method signature in all existing app modules. All of them will call the common generateGetResponse() utility func which builds the response data as per TranslibFmtType input. Removed all direct dumpIetfJson() calls from app modules. * GetResponse struct contains both []byte and ygot.GoStruct fields. One of them will be populated based on the TranslibFmtType input. * Added TranslibFmtType field to GetRequest also. This can be used in future to support protocol specific response encodings like protobuf encoding. Signed-off-by: Sachin Holla <sachin.holla@broadcom.com> * Minor code cleanup to address review comments --------- Signed-off-by: Sachin Holla <sachin.holla@broadcom.com>
- Loading branch information
1 parent
80df301
commit 72e2cec
Showing
13 changed files
with
107 additions
and
134 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.