Skip to content

Commit

Permalink
subscriptions UPDATE merge operational data
Browse files Browse the repository at this point in the history
An external tool that implements configured subscriptions can fill other
leaves by subscribing the operational data with the
SR_SUBSCR_OPER_MERGE flag. For instance, the
configured-subscription-state field defined in the RFC 8639
Link:https://datatracker.ietf.org/doc/html/rfc8639.
  • Loading branch information
jeremie6wind committed Mar 12, 2024
1 parent 6ab2e7c commit 30adfa0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,12 @@ server_data_subscribe(void)

/* operational data */
SR_OPER_SUBSCR(mod_name, "/ietf-subscribed-notifications:streams", srsn_oper_data_streams_cb);
SR_OPER_SUBSCR(mod_name, "/ietf-subscribed-notifications:subscriptions", np2srv_oper_sub_ntf_subscriptions_cb);
rc = sr_oper_get_subscribe(np2srv.sr_sess, mod_name, "/ietf-subscribed-notifications:subscriptions",
np2srv_oper_sub_ntf_subscriptions_cb, NULL, SR_SUBSCR_OPER_MERGE, &np2srv.sr_data_sub);
if (rc != SR_ERR_OK) {
ERR("Subscribing for providing \"%s\" state data failed (%s).", mod_name, sr_strerror(rc));
goto error;
}

/*
* ietf-netconf-server, ietf-keystore and ietf-trustore handled by ln2
Expand Down

0 comments on commit 30adfa0

Please sign in to comment.