-
Notifications
You must be signed in to change notification settings - Fork 189
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
Query on listing existing subscriptions #1616
Comments
Retrieve |
Thank you michal, is there a way in which we can subscribe(establish push on change) to above xpath, so we can be notified on any new subscriptions for changes? |
You are really pushing it but it should be possible. Since netopeer2 uses pull oper subscription to publish these metrics, you will have to create a poll-diff subscription in |
Hi Michal, We are trying to explore if we can achieve validation with custom logic , VM1 running netconf-server and an agent application which is netconf client ( netopeer2) is there any way to track the multiple rpc calls for a single Change ( hold the operation until it can be accepted ) |
No, such a distributed architecture is not supported by sysrepo, which handles actual data writes. It can only work locally. And there are no such complex mechanisms defined for NETCONF. Well, you are free to go through the available features and may find something for your use-case, |
hi Michal, is it possible to understand which api can be used to subscribed at sysrepo when nc_rpc_validate is done on candidate data store? |
Well, you can call |
This looks very much like an X/Y problem. At first, the question was "how to get the list of subscribers", then it shifted on how to do custom validation, and there's a little bit of distributed architecture in the mix. What is the ultimate end goal here? Note that sysrepo, the DB which is used by netopeer2, of course has a native way of performing custom validation whenever edits are processed. Is that maybe what you're looking for? |
Hi Jan,
Thanks, |
I am thinking if there is a possibility to to register callback for "/ietf-netconf:validate" ? or is it a subscription for this event but not send any reply to sysrepo/netconf? Thanks, |
Yes, that is what I meant, subscribe to |
Thank you Michal, will try it and post it in the update. Thank you so much for help |
I haven't realized that the NETCONF-level IMHO, a perfect solution would require extending sysrepo with support for another event, so that user callbacks which are registered for module changes are triggered also for validation (with a special flag). Supporting this in applications would be then trivial (especially for those apps which already use a two-phase commit and therefore do not perform any changes except the validation in their handlers of |
Hi Michal, Jan , i am able to work for our requirement via subscribing to /ietf-netconf:validate, I think Sysrepo already has a subscription with priority 0, so i had to subscribe sample application with priority 1
I tested success/failure/time out scenarios , but when i delay callback in us i think sample application works fine, what is the max duration for callback timeout to complete? I could hold the validation callback for a max of 1.9s , beyond this, validation times out and error is returned. can this ietf-netconf validate timeout be configured? if so how? I am adding snaps of 3 testcases i executed with log snippets , Subscription without failing anything ========== LISTENING FOR RPC ========== validation callback now CLI
WITH FAILURE CLI
SERVERLOG [root@lpt-fhyz314 build]# ./examples/rpc_subscribe_example /ietf-netconf:validate ========== LISTENING FOR RPC ========== validation callback now WITH TIMEOUT ========== LISTENING FOR RPC ========== validation callback now CLI
SERVERLOG |
You should be able to increase this using a |
Hi,
We have a scenario for our application
Netopeer2-server using sysrepo and hosting configuration on one VM,
we have several different application which are interested on data from netconf server, and does establishpush onchange subscriptions on the server,
we have a management application on a different VM which will need to know the list of subscriptions existing in the server, so the question is is there any api in netconf2 which will help us list all the configured establishpush on change subscription with subscription id?
Thanks,
Srikanth
The text was updated successfully, but these errors were encountered: