-
Notifications
You must be signed in to change notification settings - Fork 18
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
Suggest examples in the README (or Wiki). #40
Comments
Good idea - certainly something to do. The XPath predicates needing to be strings seems more like a bug to be investigated, filing. |
Sg, thanks. If you could share a sample of valid syntax for a subscribe (which passes the 'validate_request') I'd be happy to do some testing with net elements we have which support ST as of now. |
@mike-albano I'll be away from a laptop until Monday but in the meantime check out the subscribe_xpaths method in the respective OS clients. Will help debug, but not as effectively for several days! |
Addressing in |
@mike-albano Apologies for the delay here. In the meantime, added some level of a CLI which lightly demonstrates usage of the library. https://github.com/cisco-ie/cisco-gnmi-python/blob/doc-examples/src/cisco_gnmi/cli.py#L148 Reading your issue more, I see this doesn't totally address what you are asking. Will address this tonight with some more direct examples. |
Sounds good. |
@mike-albano The So specifying |
@mike-albano It's not pretty but I'm lagging on this too hard to not give some examples - here is a "custom" usage of the base Please ask any questions, happy to collaborate directly on code if desired. Can set something up meeting-wise. |
I could use an example of how to formulate a Subscription.
Suggestion for documentation:
For the README or WiKi, I'd suggest something like the following:
Working example of OpenConfig Streaming Telemetry on Aceess Point.
from cisco_gnmi import ClientBuilder
builder = ClientBuilder('192.168.0.5:8080')
builder.set_secure_from_target()
builder.set_ssl_target_override('openconfig.mojonetworks.com')
builder.set_call_authentication('admin', 'admin')
client = builder.construct()
paths = [client.parse_xpath_to_gnmi_path('/access-points/access-point[hostname="test-ap.example.net"]/radios/radio[id="0"]/state/rx-noise-channel-utilization/')]
print(client.get(paths))
You may also want to provide a pointer in your documentation that list-key values must be quoted due to your xpath parsing. Even if the list-key is an int (like the radio id in the above example).
The text was updated successfully, but these errors were encountered: