implement ietf-system-capabilities and ietf-notification-capabilities#1715
implement ietf-system-capabilities and ietf-notification-capabilities#1715michalvasko merged 1 commit intoCESNET:develfrom
Conversation
michalvasko
left a comment
There was a problem hiding this comment.
Okay, no problem, just do a minor refactoring and it should be good to go.
When these fields are implemented, IMHO there's an expectation that the entire device (as visible over, say, NETCONF) will adhere to this behavior and send the updates based on the advertised intervals. But in case of sysrepo, I think this really depends on the way how your application-level CBs are set up -- isn't it? In that case, is it a good idea to possibly advertise features which are not met by the rest of the system? |
|
Hi, I agree that the subscriptions set up defines the behavior of the notifications. |
Add ietf-system-capabilities and ietf-notification-capabilities yang modules. Subscribe to provide /ietf-system-capabilities:system-capabilities operational data. Use the SR_SUBSCR_OPER_MERGE flag such as another application can overwrite the values. Provide default possible values for all the fields. Move sub_ntf_ds2ident to common.c. Link: https://datatracker.ietf.org/doc/html/rfc9196 Signed-off-by: Jeremie Leska <jeremie.leska@6wind.com>
As per-node-capabilities is a keyless list. Create the node-selector with lyd_new_term. Fixes: 473e0ff ("main UPDATE implement capabilities modules (CESNET#1715)") Link: https://datatracker.ietf.org/doc/html/rfc9196#section-4.2 Signed-off-by: Jeremie Leska <jeremie.leska@6wind.com>
Until now, "/" xpath was added to system-capabilities for all datastores. Both config and state changes for both periodic and on-change notifications were set as supported. Remove config-changes and state-changes from on-change-supported and periodic-notifications-supported. Other applications can merge custom xpaths with custom support. Fixes: 473e0ff ("main UPDATE implement capabilities modules (CESNET#1715)") Link: https://datatracker.ietf.org/doc/html/rfc9196 Signed-off-by: Jeremie Leska <jeremie.leska@6wind.com>
As per-node-capabilities is a keyless list. Create the node-selector with lyd_new_term. Fixes: 473e0ff ("main UPDATE implement capabilities modules (#1715)") Link: https://datatracker.ietf.org/doc/html/rfc9196#section-4.2 Signed-off-by: Jeremie Leska <jeremie.leska@6wind.com>
This patch is an implementation of RFC9696
Link: https://datatracker.ietf.org/doc/html/rfc9196
netopeer2 can return the operational data of /ietf-system-capabilities:system-capabilities
which contains the limit values of several parameters.
max-nodes-per-update: there is no limit on the number of node to send inside a notif in sysrepo. The max unsigned integer value is set.
periodic-notifications-supported and on-change-supported: The publisher is capable of sending notifications for 'config false' and 'config true' nodes.
minimum-update-period and minimum-dampening-period: The minimum value is 0.
supported-excluded-change-type: All types of changes can be excluded.
A sysrepocfg command would give this result:
# sysrepocfg -f json -x "/ietf-system-capabilities:system-capabilities" -v2 -X -d operational