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

TranslClient: Use new translib subscription APIs #122

Merged
merged 4 commits into from
Jun 16, 2023

Commits on Jun 16, 2023

  1. Allow data clients to send full gnmipb.Notification

    Added gnmipb.Notification as a member of the Value messgae object
    defined by sonic_internal.proto. Data clients now can fill a complete
    Notification object instead of timestamp, path, TypedValue separately.
    sachinholla committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    6645338 View commit details
    Browse the repository at this point in the history
  2. Use origin to identify translib yang paths

    Use TranslClient to handle the subscribe requests when origin is
    "openconfig". Fallback to the existing target based identification
    logic if origin is not given.
    sachinholla committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    06f5af8 View commit details
    Browse the repository at this point in the history
  3. Use new translib subscribe APIs in TranslClient

    StreamRun() enhancements:
     - Create a new SubscribeSession in the beginning and pass it to all
       further translib API calls
     - Call translib.IsSubscribeSupported() to reasolve preferences of the
       requested paths. This also splits the target_defined request into
       on_change and sample paths.
     - Use one translib.Subscribe() call passing all on_change enabled
       paths, if there are any. This will handle initial updates and
       subsequent on_change notifications.
     - Use one translib.Stream() call for each sample subscribe path, if
       present. This will be called in a loop at every sample interval.
     - Maintain the ygot objects received for each translib.Stream() call
       in a cache. Diff the current set of objects with the objects from
       the previous iteration to resolve deleted paths and modified values
       (when suppress_redundant is enabled).
    
    PollRun() and OnceRun() enhancements:
     - Call translib.Stream() with each subscribed path to generate
       notification data.
     - In poll mode, this is repeated when a poll message is received
    sachinholla committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    5b854b6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    aa96dd5 View commit details
    Browse the repository at this point in the history