Uploaded image for project: 'ONOS'
  1. ONOS
  2. ONOS-5772

NETCONF throws an exception description error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 1.8.0
    • Fix Version/s: 1.8.0
    • Component/s: DynamicConfiguration
    • Labels:
    • Environment:

      Ubuntu(64bit), ONOS 1.8.0, Firefox web brower, RESTClient,Intel(R) Xeon(R) CPU E5-2620 V3 @ 2.40GHz 2.40 GHz, RAM 64.0GB, HardDisk 1T

    • Story Points:
      2
    • Epic Link:
    • Sprint:
      Junco Sprint #1 - Dyn Config

      Description

      I tested ONOS auto discover function which used NETCONF protocol, my steps are:
      1.Start the device which supports the NETCONF protocol,
      2.start ONOS
      3.activate the netconf app:
      onos> app activate org.onosproject.netconf
      4.activate the netconf drivers
      onos> app activate org.onosproject.drivers.netconf
      5.POST JSON messages through the RESTClient tool
      the URI is:
      http://10.21.45.16:8181/onos/v1/network/configuration
      the correct JSON body is:
      {
      "devices":{
      "netconf:10.21.45.32:17830":{
      "basic":

      { "driver":"ovs-netconf" }

      }
      },
      "apps":{
      "org.onosproject.netconf":{
      "devices":[

      { "username":"admin", "password":"admin", "ip":"10.21.45.32", "port":17830 }

      ]
      }
      }
      }
      but I accidentally used wrong user name,
      I use the json body:
      {
      "devices":{
      "netconf:10.21.45.32:17830":{
      "basic":

      { "driver":"ovs-netconf" }

      }
      },
      "apps":{
      "org.onosproject.netconf":{
      "devices":[

      { "name":"admin", "password":"admin", "ip":"10.21.45.32", "port":17830 }

      ]
      }
      }
      }
      then the ONOS throws an exception:
      Caused by: org.onosproject.netconf.NetconfException: Can't connect to NETCONF device on netconf:10.21.45.32:17830:netconf:10.21.45.32:17830
      ... 16 more
      Caused by: java.lang.IllegalArgumentException: Empty device name

      I think there are two errors:
      1.ONOS should not throw an exception because the username field is incorrect,Only need to display the input error on it.
      2.The log should not show an error of Empty device name, but rather an error of Empty user name .

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            xiaoke31 KeZhiyong
            Reporter:
            xiaoke31 KeZhiyong
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: