OcNOS-SP : NetConf User Guide : Event Notification : netconf-config-change
netconf-config-change
This notification is generated when the NetConf server detects that the <running> configuration data store has been changed by a management session. The notification summarizes the edits performed on the above mentioned data stores.
Steps to receive config change notification:
1. Create NetConf notification subscription (command: create-subscription)
2. Enable config change notification (command: config-change-subscription status=enable)
3. Perform any of the following operations
Create
Merge
Delete
Replace
4. Do commit
5. Config change notification will be received.
6. Config change notification can be disabled for current session. (command: config-change-subscription status=disable)
7. Someone can check whether current session has been subscribed for config change notificaion. (command: show-config-change-subscription)
Example
1. Create Yangcli session
2. Subscribe for notification
yangcli root@0> create-subscription
RPC OK Reply 4 for session 1
3. Subscribe for config change notification
yangcli root@0> config-change-subscription status=enable
RPC OK Reply 5 for session 1
4. Someone can check whether current session has been subscribed for config change notificaion
yangcli root@0> show-config-change-subscription
RPC Data Reply 6 for session 1:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<status xmlns="http://ipinfusion.com/ns/zebmcli">ENABLED</status>
</rpc-reply>
5. Do some configuration
(config)#interface eth3
(config-if)#shut
(config-if)#commit
Config-change notification will be received
6. Config change notification will be received
yangcli root@0>
Incoming notification:
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2021-11-29T10:02:45Z</eventTime>
<netconf-config-change xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-notifications">
<changed-by>
<username>root</username>
<session-id>0</session-id>
</changed-by>
<datastore>running</datastore>
<edit>
<target>/interfaces/interface[name='eth3']/config</target>
<operation>merge</operation>
</edit>
</netconf-config-change>
</notification>
Last modified date: 06/08/2023