...
- start ONOS
activate the netconf app :
Code Block onos> app activate org.onosproject.netconf
give ONOS the information to connect to the device and which driver to use for you device in a json file.
Code Block { "devices":{ "netconf:<username>@<ip>:<port>":{ "basic":{ "driver":"ovs-netconf" } } }, "apps":{ "org.onosproject.netconf":{ "devices":[{ "name":"mininet"<username>, "password":"mininet"<password>, "ip":"10.1.9.24"<ip>, "port":830<port> }] } } }
in the $ONOS_ROOT/tools/test/configs/netconf-cfg.json file. Change the IP both in the DeviceId at the top and in the devices array. The port number by default on NETCONF is 830, so unless you made any changes to that leave it as is.
upload the configuration you just modified to the instance of ONOS you are running, in our case localhost:
Code Block <your_machine>~$ curl -X POST -H "content-type:application/json" http://localhost:8181/onos/v1/network/configuration -d @$ONOS_ROOT/tools/test/configs/netconf-cfg.json --user onos:rocks
or
Code Block <your_machine>~$ onos-netcfg localhost $ONOS_ROOT/tools/test/configs/netconf-cfg.json
open the onos logs
for localhost logs
Code Block <your_machine>~$ tl
or for remote logs
Code Block <your_machine>~$ ol
verify that the logs don't contain NETCONF related exceptions and this warning does not appear:
Code Block | WARN | event-dispatch-0 | NetconfDeviceProvider | 186 - org.onosproject.onos-netconf-provider-device - 1.4.0.SNAPSHOT | Can't connect to NETCONF device on <ip>:<port>
In case the log is preset it means that the device was not able to reply on the given IP and Port. Verify Ip and Port in the Json file you posted and retry. If any other exception is present, such as no device name, please read the log and react to it accordingly.
...