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

[ONOS-YMS-TEST] Unable to send notification event to YANG notification listeners

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.7.0
    • Component/s: None
    • Labels:
    • Story Points:
      2

      Description

      Issue:

      Notification listener app event() is not getting called when notification is send from test app.
      1) schemaRegistry is null - fixed
      2) Exception in ytb - not fixed

      Test steps:

      1) Activate yms, ymstest & restconf apps
      2) Run testcase testNbiNotification

      onos> app activate org.onosproject.yms
      onos> app activate org.onosproject.ymstest
      onos> app activate org.onosproject.restconf
      onos> yms-test testNbiNotification

      Test code snippet:

      MultiNotificationManger multiNotificationManger = new MultiNotificationManger();
      ymsService.registerService(multiNotificationManger, MultiNotification.class, null);
      print("Registered Service");

      MultiNotificationListener multiNotificationListener = new MultiNotificationListener();
      YangNotificationService yangNotificationService = ymsService.getYangNotificationService();
      yangNotificationService.addListener(multiNotificationListener);
      print("Added notification listener");

      multiNotificationManger.sendNotification();
      print("Notification Send");

      Test output:

      — schemaRegistry is null - fixed ----

      https://github.com/GauravAgrawal-Huawei/ymsm/commit/05e3031eb265d2498bda45051aaa093a98a2c21a

      — exception not fixed ----

      onos> display
      2016-09-05 09:53:41,474 | WARN | er-event-handler | YangNotificationManager | 170 - org.onosproject.onos-app-yms - 1.7.0.SNAPSHOT | Failed to process MultiNotificationEvent

      {time=2016-09-05T09:53:41.474, type=LINK_DOWN, subject=org.onosproject.yang.gen.v1.urn.yms.test.ytb.multi.notification.with.container.rev20160826.multinotification.MultiNotificationEventSubject@5edd7382}

      java.lang.NullPointerException
      at org.onosproject.yms.app.ytb.YdtBuilderFromYo.getYangObjectOfNotification(YdtBuilderFromYo.java:807)[170:org.onosproject.onos-app-yms:1.7.0.SNAPSHOT]
      at org.onosproject.yms.app.ytb.YdtBuilderFromYo.createModuleNodeInYdt(YdtBuilderFromYo.java:222)[170:org.onosproject.onos-app-yms:1.7.0.SNAPSHOT]
      at org.onosproject.yms.app.ytb.DefaultYangTreeBuilder.getYdtForNotification(DefaultYangTreeBuilder.java:75)
      at org.onosproject.yms.app.ynh.YangNotificationManager$YnhAbstractListener.lambda$event$0(YangNotificationManager.java:118)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_101]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_101]
      at java.lang.Thread.run(Thread.java:745)[:1.8.0_101]

      Confimed and fixed 1st issue by: Gaurav

        Attachments

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

          Activity

            People

            Assignee:
            SojanKoshy Sojan Koshy
            Reporter:
            SojanKoshy Sojan Koshy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: