CESNET / libnetconf

C NETCONF library
Other
113 stars 83 forks source link

notifications stream NETCONF and custom database #192

Closed ntadas closed 8 years ago

ntadas commented 8 years ago

Hi,

by default libnetconf uses NETCONF stream to send the "standard" notifications, e.g: netconf-session-<start/end> , netconf-config-change, etc....

for the netconf-config-change is it possible to add the resume information about what change in the notification? When I'm using a custom database the notification looks like:

`

running sshtest 2 0.0.0.0

`

so the information is not very useful, because for each notification we will get the same content, that something was change but no clue about what.

if this is not possible, would it be possible to disable these events (so that I can use my own notifs only)? I found ncntf_stream_allow_events but I cannot remove the events from NETCONF stream.

Thanks Best Regards

rkrejci commented 8 years ago

libnetconf currently does not have a mechanism to collect edit information so only the generic notification is created and it is not possible to change this notification. It is supposed to provide at least some information instead of being silent about edit-config. I can imagine how to add such a functionality, but I don't have resources to do it on my own.

First possibility for you is to create another netconf-config-change notification with more precise description, but those standard notification will be still present, so it may be confusing.

Events filtering is not possible on NETCONF stream - it is a special stream in libnetconf, which contains all the notifications. So, another option for you is to define your own change notification and when you are subscribing, you can specify a filter to select what you want to receive.

Or you can create a new stream and add all important events (via ncntf_stream_allow_events) so a client can subscribe to this new stream without filtering.