getDataBrokerDependency() returns null

asked 2015-07-25 04:42:23 -0700

luna gravatar image

Hi,

Im trying to build my own odl application. However im not able to use the databroker. I already defined it, in yang model in config xml and so on. Pretty similar like it is done in any other odl example project (l2switch, toaster). But when getting the reference of DataBroker, it is in my application always null. Can anyone tell me why ? There must be some point I'm missing.. i did following:

  1. yang file

    import opendaylight-md-sal-binding { prefix mdsal; revision-date 2013-10-28; }
    .....
    augment "/config:modules/config:module/config:configuration" {
      case path-builder-impl {
        when "/config:modules/config:module/config:type = 'path-builder-impl'";
          container notification-service {
            uses config:service-ref {
              refine type {
                mandatory true;
                config:required-identity mdsal:binding-notification-service;
              }
            }
          }
          container data-broker {
               uses config:service-ref {
                   refine type {
                      mandatory false;
                      config:required-identity mdsal:binding-async-data-broker;
                    }
               }
           }
         }
    
  2. the config,xml (in my case 05-pathbuilder.xml)

       <data-broker>
        <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-async-data-broker</type>
        <name>binding-data-broker</name>
      </data-broker>
    

There arent any compiling issues, the notificationService works like expected... but when using

  getDataBrokerDependency()

it returns null..

Using ODL Helium release

Pls help me..

edit retag flag offensive close merge delete

Comments

solved.. there wasnt any error in my code...for anybody who has similar issues, just recompile the controller.. that fixed my issue

luna ( 2015-07-25 05:24:33 -0700 )edit