cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3716
Views
0
Helpful
2
Comments
giheron
Cisco Employee
Cisco Employee

First ensure that you're running XR 5.3 or later.


Then ensure that in XR you've done "crypto key generate dsa" and that your config contains:

netconf-yang agent

     ssh

!

ssh server v2

ssh server netconf port 830

note that on XR 5.3.0 you'll see:

ssh server v2

ssh server netconf port 830

netconf-yang agent ssh

Then use Postman or RESTClient to POST to http://localhost:8181/restconf/config/opendaylight-inventory:nodes/node/controller-config/yang-ext:mount/config:modules:

{

    "config:module": [

        {

            "type": "odl-sal-netconf-connector-cfg:sal-netconf-connector",

            "name": "xrv",

            "odl-sal-netconf-connector-cfg:address": "172.23.29.125",

            "odl-sal-netconf-connector-cfg:port": 830,

            "odl-sal-netconf-connector-cfg:username": "cisco",

            "odl-sal-netconf-connector-cfg:password": "cisco",

            "odl-sal-netconf-connector-cfg:tcp-only": false,

            "odl-sal-netconf-connector-cfg:binding-registry": {

                "type": "opendaylight-md-sal-binding:binding-broker-osgi-registry",

                "name": "binding-osgi-broker"

            },

            "odl-sal-netconf-connector-cfg:between-attempts-timeout-millis": 2000,

            "odl-sal-netconf-connector-cfg:processing-executor": {

                "type": "threadpool:threadpool",

                "name": "global-netconf-processing-executor"

            },

            "odl-sal-netconf-connector-cfg:max-connection-attempts": 0,

            "odl-sal-netconf-connector-cfg:sleep-factor": 1.5,

            "odl-sal-netconf-connector-cfg:client-dispatcher": {

                "type": "odl-netconf-cfg:netconf-client-dispatcher",

                "name": "global-netconf-dispatcher"

            },

            "odl-sal-netconf-connector-cfg:dom-registry": {

                "type": "opendaylight-md-sal-dom:dom-broker-osgi-registry",

                "name": "dom-broker"

            },

            "odl-sal-netconf-connector-cfg:event-executor": {

                "type": "netty:netty-event-executor",

                "name": "global-event-executor"

            },

            "odl-sal-netconf-connector-cfg:connection-timeout-millis": 20000

        }

    ]

}

note that you'll need to change the IP address above - and potentially the name, port, username and password.

also note that for Cisco OSC the URL is different:

https://localhost/controller/restconf/config/opendaylight-inventory:nodes/node/controller-config/yang-ext:mount/config:modules.

and also note that from Lithium this is also available at:

http://localhost8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules

and finally note that from Beryllium the older "opendaylight-inventory" will no longer be supported.


One thing to remember for ODL is you need the right set of features installed to get ODL to connect to its own NETCONF NBI for config and to then be able to connect to XR.  odl-mdsal-broker, odl-restconf and odl-netconf-connector-ssh should suffice.  For Cisco OSC those features will all be pre-installed.

After you post the config you can then do a GET to:

http://localhost:8181/restconf/operational/opendaylight-inventory:nodes/node/xrv  (assuming your XR node is called xrv) to check that the node has mounted ok (it may take a few seconds to mount).

once XR mounts you should see something like:

{

}

2 Comments
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: