You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 <[email protected]>
* Minor code cleanup to address review comments
---------
Signed-off-by: Sachin Holla <[email protected]>
0 commit comments