Skip to content

Translib APIs for subscription#92

Merged
anand-kumar-subramanian merged 1 commit intosonic-net:masterfrom
sachinholla:subscribe_api
Jun 16, 2023
Merged

Translib APIs for subscription#92
anand-kumar-subramanian merged 1 commit intosonic-net:masterfrom
sachinholla:subscribe_api

Conversation

@sachinholla
Copy link
Contributor

Added/updated following translib APIs as described in HLD sonic-net/SONiC#1287.

  • 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.

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)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this the correct error message here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy-paste error.. I need to change that error message

@sachinholla sachinholla force-pushed the subscribe_api branch 2 times, most recently from f980141 to 0e09095 Compare June 16, 2023 07:08
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>
@anand-kumar-subramanian anand-kumar-subramanian merged commit f24fc03 into sonic-net:master Jun 16, 2023
@sachinholla sachinholla deleted the subscribe_api branch July 19, 2023 06:05
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.

3 participants