Skip to content

Conversation

@tejaskumark
Copy link
Contributor

Adding support for gNMI subscribe.

Adding support for gNMI subscribe.
@codecov-io
Copy link

codecov-io commented Feb 28, 2019

Codecov Report

Merging #65 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #65   +/-   ##
=======================================
  Coverage   52.79%   52.79%           
=======================================
  Files          10       10           
  Lines        1197     1197           
=======================================
  Hits          632      632           
  Misses        482      482           
  Partials       83       83

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 64f55df...cdd72b5. Read the comment docs.

Discarded redundant print response.
Added subscribe request example.
@tejaskumark
Copy link
Contributor Author

@mike-albano Can you please help to get this merge, this has fix for xpath construction with (- and /) and also subscribe request. Thanks.

Copy link
Contributor

@mike-albano mike-albano left a comment

Choose a reason for hiding this comment

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

Thanks for putting this together. Looking forward to giving it a shot.

Can you up the version, and resolve the branch conflicts?

gNMI SubscribeRequest object.
"""
mysubs = []
mysub = gnmi_pb2.Subscription(path=paths, mode=opt["submode"], sample_interval=opt["interval"]*1000000000, heartbeat_interval=opt['heartbeat']*1000000000, suppress_redundant=opt['suppress'])
Copy link
Contributor

Choose a reason for hiding this comment

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

Fix line length.

myqos = gnmi_pb2.QOSMarking(marking=opt["qos"])
else:
myqos = None
mysblist = gnmi_pb2.SubscriptionList(prefix=myprefix, mode=opt['subscribe_mode'], allow_aggregation=opt['aggregate'], encoding=opt['encoding'], subscription=mysubs, use_aliases=opt['use_alias'], qos=myqos)
Copy link
Contributor

Choose a reason for hiding this comment

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

Line length

if response.HasField('sync_response'):
print('Sync Response received\n'+str(response))
elif response.HasField('error'):
print('gNMI Error '+str(response.error.code)+' received\n'+str(response.error.message) + str(response.error))
Copy link
Contributor

Choose a reason for hiding this comment

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

Line length

@codecov-commenter
Copy link

codecov-commenter commented Jun 14, 2020

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 52.44%. Comparing base (92c6d0d) to head (965d41d).
Report is 348 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #65      +/-   ##
==========================================
+ Coverage   52.32%   52.44%   +0.11%     
==========================================
  Files          10       12       +2     
  Lines        1204     1249      +45     
==========================================
+ Hits          630      655      +25     
- Misses        491      510      +19     
- Partials       83       84       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tejaskumark
Copy link
Contributor Author

@mike-albano Changes done. Please review. Thanks.

- Version updated.
- Updated info section.
@samribeiro samribeiro added the py label Jul 8, 2020
@tejaskumark
Copy link
Contributor Author

@mike-albano Just to make sure this is not missed.

lguohan pushed a commit to lguohan/gnxi that referenced this pull request Nov 10, 2020
- Adding support for subscribe mode. The code is mostly based on this patch: google#65
- Adding a new parameter to limit the number of updates, e.g. after a number of streaming updates the client would stop listening. It is convenient for testing purposes.
- Changing the sample interval unit to millisecond. This is also required for testing cases.

Co-authored-by: Murat Acikgoz <muacikgo@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants