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:
{
- "node": []
- {}
- "id": "xrv",
- "netconf-node-inventory:connected": true,
- "netconf-node-inventory:initial-capability": []
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-cdp-oper?revision=2013-07-22)Cisco-IOS-XR-cdp-oper",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-ma-cfg?revision=2013-07-22)Cisco-IOS-XR-ipv4-ma-cfg",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-tty-server-cfg?revision=2013-07-22)Cisco-IOS-XR-tty-server-cfg",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-infra-infra-cfg?revision=2013-07-22)Cisco-IOS-XR-infra-infra-cfg",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-shellutil-oper?revision=2013-07-22)Cisco-IOS-XR-shellutil-oper",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-tty-management-cfg?revision=2013-07-22)Cisco-IOS-XR-tty-management-cfg",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-ip-domain-cfg?revision=2013-07-22)Cisco-IOS-XR-ip-domain-cfg",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-ma-oper?revision=2013-07-22)Cisco-IOS-XR-ipv4-ma-oper",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-man-xml-ttyagent-oper?revision=2013-07-22)Cisco-IOS-XR-man-xml-ttyagent-oper",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-lib-keychain-oper?revision=2013-07-22)Cisco-IOS-XR-lib-keychain-oper",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-ip-iarm-datatypes?revision=2013-07-22)Cisco-IOS-XR-ip-iarm-datatypes",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-ha-eem-oper?revision=2013-07-22)Cisco-IOS-XR-ha-eem-oper",
- "(urn:ietf:params:xml:ns:yang:ietf-yang-types?revision=2013-07-15)ietf-yang-types",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-sam-oper?revision=2013-07-22)Cisco-IOS-XR-crypto-sam-oper",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-parser-cfg?revision=2013-07-22)Cisco-IOS-XR-parser-cfg",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-ip-domain-oper?revision=2013-07-22)Cisco-IOS-XR-ip-domain-oper",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-ha-eem-cfg?revision=2013-07-22)Cisco-IOS-XR-ha-eem-cfg",
- "(urn:ietf:params:xml:ns:yang:ietf-inet-types?revision=2013-07-15)ietf-inet-types",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-tty-management-oper?revision=2013-07-22)Cisco-IOS-XR-tty-management-oper",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-ma-cfg?revision=2013-07-22)Cisco-IOS-XR-ipv6-ma-cfg",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-cdp-cfg?revision=2013-07-22)Cisco-IOS-XR-cdp-cfg",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-sam-cfg?revision=2013-07-22)Cisco-IOS-XR-crypto-sam-cfg",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-lib-keychain-cfg?revision=2013-07-22)Cisco-IOS-XR-lib-keychain-cfg",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-tty-vty-cfg?revision=2013-07-22)Cisco-IOS-XR-tty-vty-cfg",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-rgmgr-cfg?revision=2013-07-22)Cisco-IOS-XR-rgmgr-cfg",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-qos-ma-oper?revision=2013-07-22)Cisco-IOS-XR-qos-ma-oper",
- "(http://cisco.com/ns/yang/cisco-xr-types?revision=2013-07-22)Cisco-IOS-XR-types",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-ma-oper?revision=2013-07-22)Cisco-IOS-XR-ipv6-ma-oper",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-shellutil-cfg?revision=2013-07-22)Cisco-IOS-XR-shellutil-cfg",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg?revision=2013-07-22)Cisco-IOS-XR-ifmgr-cfg",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-io-oper?revision=2013-07-22)Cisco-IOS-XR-ipv4-io-oper",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-man-netconf-cfg?revision=2013-07-22)Cisco-IOS-XR-man-netconf-cfg",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-man-xml-ttyagent-cfg?revision=2013-07-22)Cisco-IOS-XR-man-xml-ttyagent-cfg",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-tty-server-oper?revision=2013-07-22)Cisco-IOS-XR-tty-server-oper",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-io-cfg?revision=2013-07-22)Cisco-IOS-XR-ipv4-io-cfg",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-rgmgr-oper?revision=2013-07-22)Cisco-IOS-XR-rgmgr-oper",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-tty-management-datatypes?revision=2013-07-22)Cisco-IOS-XR-tty-management-datatypes",
- "(http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-oper?revision=2013-07-22)Cisco-IOS-XR-ifmgr-oper"
}