Perhaps the following will help.
I have modified the standard netconf-notifications example in confd-basic-6 as follows:
Added the following to notif.yang at the top level:
leaf test {
type string;
}
This allows me to make configuration changes to the example project at runtime.
I have then created a XML file for creating my NETCONF stream as follows:
<?xml version="1.0" encoding="UTF-8"?>
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<capabilities>
<capability>urn:ietf:params:netconf:base:1.0</capability>
</capabilities>
</hello>
]]>]]>
<?xml version="1.0" encoding="UTF-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
<create-subscription xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<stream>NETCONF</stream>
</create-subscription>
</rpc>
]]>]]>
I have modified confd.conf with changes in my previous post to enable NETCONF tracing.
After I have started the example with “make all start”, I then start my NETCONF stream subscription as follows:
$ netconf-console -s all netconf-sub.xml
I then start up a cli session as follows:
bash-3.2$ make cli
$HOME/confd-basic-6/ConfD/bin/confd_cli --user=admin --groups=admin \
--interactive || echo Exit
Welcome to ConfD Basic
The CLI may only be used during product development.
Commercial use of the CLI is prohibited.
You must disable the CLI in confd.conf for production.
For more information, visit http://www.tail-f.com.
admin connected from 127.0.0.1 using console on WAITAI-M-K092
WAITAI-M-K092# config
Entering configuration mode terminal
WAITAI-M-K092(config)# test test123
WAITAI-M-K092(config)# commit
Commit complete.
The following is what I have received on my netconf-console terminal:
<?xml version="1.0" encoding="UTF-8"?>
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2015-08-10T10:36:58.427756-07:00</eventTime>
<netconf-config-change xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-notifications">
<changed-by>
<username>admin</username>
<session-id>0</session-id>
<source-host>127.0.0.1</source-host>
</changed-by>
<datastore>running</datastore>
<edit>
<target xmlns:notif="http://tail-f.com/ns/test/notif">/notif:test</target>
<operation>replace</operation>
</edit>
</netconf-config-change>
</notification>
Following is the output of my netconf.trace file:
10-Aug-2015::10:36:58.431 **< sess:11 write:
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2015-08-10T10:36:58.427756-07:00</eventTime>
<netconf-config-change xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-notifications">
<changed-by>
<username>admin</username>
<session-id>0</session-id>
<source-host>127.0.0.1</source-host>
</changed-by>
<datastore>running</datastore>
<edit>
<target xmlns:notif="http://tail-f.com/ns/test/notif">/notif:test</target>
<operation>replace</operation>
</edit>
</netconf-config-change>
</notification>
To find out the exact configuration parameter value changes in your YANG data model through NETCONF notifications, you will need to add your own custom NETCONF notifications for it and write ConfD client application code to generate them accordingly.