Netconf session over TCP

asked 2016-07-13 10:05:00 -0700

ahuja gravatar image

updated 2016-07-15 11:56:53 -0700

Hi,

I created Netconf session over SSH through POSTMAN this way:

Header:

name: content:type value: application/xml

URL: http://192.168.1.20:8181/restconf/con...

> <module
> xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
> 
>       <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">prefix:sal-netconf-connector</type>
> 
>         <name>NetconfServer</name>   
>         <address xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">192.168.0.15</address>
> 
>         <port xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">2022</port>
> 
>         <username xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">admin</username>
> 
>         <password xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">admin</password>
> 
>         <tcp-only xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">false</tcp-only>
> 
>         <event-executor xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
> 
>           <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netty">prefix:netty-event-executor</type>
> 
>           <name>global-event-executor</name>   
>         </event-executor>   
>         <binding-registry xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
>           <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">prefix:binding-broker-osgi-registry</type>
> <name>binding-osgi-broker</name>
>         </binding-registry>   
>         <dom-registry xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
> 
>           <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">prefix:dom-broker-osgi-registry</type>
> 
>           <name>dom-broker</name>
>         </dom-registry>   
>         <client-dispatcher xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
> 
>           <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:config:netconf">prefix:netconf-client-dispatcher</type>
> 
>           <name>global-netconf-dispatcher</name>
> 
>         </client-dispatcher>   
>         <processing-executor xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
> 
>           <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:threadpool">prefix:threadpool</type>
> 
>           <name>global-netconf-processing-executor</name>
> 
>         </processing-executor> 
>       </module>

This is working fine. Can someone suggest, how to create NETCONF session just over TCP. I tried with changing the port no and making the tcp -only part true, but it didnt work.

Also, can anyone suggest how to generate the same request through CURL.

PS: i am using ConfD as netconf server.

Thanks!

edit retag flag offensive close merge delete