Translib APIs for subscription#92
Merged
anand-kumar-subramanian merged 1 commit intosonic-net:masterfrom Jun 16, 2023
Merged
Conversation
6 tasks
anand-kumar-subramanian
approved these changes
Jun 14, 2023
ayelrod
reviewed
Jun 14, 2023
translib/subscribe.go
Outdated
| if e0 := path.GetElemAt(nAppInfo.path, 0); !strings.HasPrefix(e0, "openconfig-") { | ||
| p := path.String(nAppInfo.path) | ||
| log.Warningf("[%v] Dynamic table handling supported only for OC yangs; found %s", sc.id, p) | ||
| return tlerr.NotSupported("Wildcard keys not supported: %s", p) |
Contributor
There was a problem hiding this comment.
Is this the correct error message here?
Contributor
Author
There was a problem hiding this comment.
Copy-paste error.. I need to change that error message
f980141 to
0e09095
Compare
Added/updated following translib APIs: - Subscribe() for handling ON_CHANGE notifications - Stream() for handling SAMPLE, POLL, ONCE subscriptions - IsSubscribeSupported() for collecting subscription capabilities - NewSubscribeSession() to create a SubscribeSession object These APIs use the new appInterafce functions translateSubscribe() and processSubscribe() to process subscription request and responses. Signed-off-by: Sachin Holla <sachin.holla@broadcom.com>
0e09095 to
6ebaec2
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added/updated following translib APIs as described in HLD sonic-net/SONiC#1287.
Subscribe()for handling ON_CHANGE notificationsStream()for handling SAMPLE, POLL, ONCE subscriptionsIsSubscribeSupported()for collecting subscription capabilitiesNewSubscribeSession()to create a SubscribeSession objectThese APIs use the new appInterafce functions
translateSubscribe()andprocessSubscribe()to process subscription request and responses.