Difference between revisions of "Sweetcomb/Sysrepo"
From fd.io
(→Sysrepo) |
m (→Sysrepo) |
||
Line 1: | Line 1: | ||
= Sysrepo = | = Sysrepo = | ||
− | |||
− | |||
In our case, there are two types of callbacks we can register | In our case, there are two types of callbacks we can register | ||
Line 8: | Line 6: | ||
* '''callbacks for configuration data''' : In sweetcomb, they are registered with method '''XPATH''' and sysrepo register them with '''sr_subtree_change_subscribe'''. These are the callbacks triggered by a NETCONF edit-config RPC with Netopeer2. | * '''callbacks for configuration data''' : In sweetcomb, they are registered with method '''XPATH''' and sysrepo register them with '''sr_subtree_change_subscribe'''. These are the callbacks triggered by a NETCONF edit-config RPC with Netopeer2. | ||
− | + | == Writing a configuration callback == | |
=== Events === | === Events === |
Revision as of 15:19, 25 March 2019
Sysrepo
In our case, there are two types of callbacks we can register
- callbacks for operational data/State callback : In sweetcomb, they are registered with method GETITEM and sysrepo register them with sr_dp_get_items_subscribe(). These are the callbacks triggered by a NETFCONF get RPC with Netopeer2.
- callbacks for configuration data : In sweetcomb, they are registered with method XPATH and sysrepo register them with sr_subtree_change_subscribe. These are the callbacks triggered by a NETCONF edit-config RPC with Netopeer2.
Writing a configuration callback
Events
- SR_EV_VERIFY : As it is the only phase which can return an error, in Sweetcomb, this is where VPP configuration happens.
- SR_EV_APPLY : Nothing is done for a SR_EV_APPLY in sweetcomb.
Operations
- SR_OP_CREATED:
- SR_OP_MODIFIED:
- SR_OP_DELETED: