CESNET / netopeer2

NETCONF toolset
BSD 3-Clause "New" or "Revised" License
291 stars 186 forks source link

Notification from Server to a specific Client #1457

Open navneetkaurPS opened 10 months ago

navneetkaurPS commented 10 months ago

Hi Michael,

I am sending notification from the application using sr_notif_send_tree API. Two different netconf clients are subscribed to the same notification filter xpath. Is it possible to send notification to one client only ?

Netopeer2 version : 2.1.42

Regards Navneet

navneetkaurPS commented 10 months ago

Hi

This is kind of urgent for me to know. Anyone else knows how to send the notification to a specific netconf client?

Thanks in advance. Navneet

michalvasko commented 10 months ago

Is it possible to send notification to one client only ?

No, NETCONF notifications are designed so that the clients control what notifications they receive, not the server.

navneetkaurPS commented 10 months ago

Thanks for the respose @michalvasko . As per ORAN standard we need to monitor the netconf sessions and send them notifications at time bound intervals. below is yang tree : -

rpcs: +---x supervision-watchdog-reset +---w input | +---w supervision-notification-interval? uint16 | +---w guard-timer-overhead? uint16 +--ro output +--ro next-update-at? yang:date-and-time +--ro error-message? string

notifications: +---n supervision-notification

Currently for multiple netconf client connection case the same notification will go to both the clients.

Is there any future plan to allow sending notification on bases of session ID ? or Can you give us some pointers if we want to implement on our own ?

Regards Navneet

michalvasko commented 10 months ago

Is there any future plan to allow sending notification on bases of session ID ?

No, like I said, it goes against the core design of NETCONF notifications.

Can you give us some pointers if we want to implement on our own ?

The simplest way would probably be to add internal netopeer2-server handler for this RPC, which would implement the whole functionality. You can then access all the NETCONF sessions directly and send notifications only on whichever ones you want.