Send get-config on notification session

Hi,

Can you provide an example on how to send a get-config on a notification session using netconf-console assuming the device has interleave capability supported.

Thanks,

I will show it by using the netconf_notifications example:

1. Modify confd.conf to enable the interleave capability:

  <notification>
    <enabled>true</enabled>
    <interleave>
      <enabled>true</enabled>
    </interleave>
  </notification>

2. Type "make clean all start" to start the project in Terminal 1.

3. Type "make cli-c on Terminal 2"

admin connected from 127.0.0.1 using console on localhost
localhost# config
Entering configuration mode terminal
localhost(config)# interfaces interface 1 desc if1
localhost(config-interface-1)# commit
Commit complete.
localhost(config-interface-1)# exit
localhost(config)# exit
localhost# exit

4. Start a netconf-console interactive session on Terminal 3

$ netconf-console -i

    * Enter a NETCONF operation, end with an empty line
      <get>
        <filter select=" interfaces" type="xpath"/>
      </get>

    <?xml version="1.0" encoding="UTF-8"?>
    <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2">
      <data>
        <interfaces xmlns="http://tail-f.com/ns/test/notif">
          <interface>
            <ifIndex>1</ifIndex>
            <desc>if1</desc>
          </interface>
        </interfaces>
      </data>
    </rpc-reply>

    * Enter a NETCONF operation, end with an empty line
      <create-subscription xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
        <stream>interface</stream>
      </create-subscription>

    <?xml version="1.0" encoding="UTF-8"?>
    <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2">
      <ok/>
    </rpc-reply>

5. Go to Terminal 1 and type y followed by enter

TRACE Picked up old user session: 1 for user:system ctx:system
notifier started
y
sending linkUp second notification
TRACE NOTIFICATION_SEND interface

6. Go back to Terminal 3 (your netconf-console -i session) and type enter. You will now see the NETCONF notification message:

* Enter a NETCONF operation, end with an empty line

<?xml version="1.0" encoding="UTF-8"?>
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
  <eventTime>2017-06-09T22:01:18.128229+00:00</eventTime>
  <linkUp xmlns="http://tail-f.com/ns/test/notif">
    <ifIndex>2</ifIndex>
    <linkProperty>
      <newlyAdded/>
      <flags>42</flags>
      <extensions>
        <name>1</name>
        <value>3</value>
      </extensions>
      <extensions>
        <name>2</name>
        <value>4668</value>
      </extensions>
    </linkProperty>
  </linkUp>
</notification>

* Enter a NETCONF operation, end with an empty line