How To Register A Service To MD-SAL

Define RPC in YANG file:

On generating Java source code through Maven, ShapeService interface will get created as follows:

Implement ShapeService interface as follows:

In pom.xml, define Bundle Activator as below:

ShapeProvider should extend AbstractBindingAwareProvider as below:

  • At line 21, we initialized an instance of ShapeImpl object
  • At line 29, we registered this service to MD-SAL

Now a consumer of this service can get a reference as below:

  •  session is an object of type ConsumerContext

Comments

  1. vikram says

    Hi

    I have a very basic question

    what is the difference between a SALService and a RpcService. how to develop a SALService?

    • Torres says

      I think a SALService is infrastructure service provided by SAL, but a RPCService prefer an application service based on SAL, it’s not an infrastructure service. If you just want to develop an application on ODL, you just need develop a RPCService.

    • Kanika says

      Here is my response to Vikram’s question. SAL services are the infrastructure services provided by OpenDaylight’s MD-SAL as rightly pointed out by Torres. For example, NotificationProviderService, RpcService and DataBroker services are SAL services. You get references to these services in your code to perform required operations.

  2. says

    I do trust all the concepts you have presented on your post.
    They are very convincing and can definitely work. Still, the posts are very quick for beginners.
    Could you please extend them a little from subsequent time?
    Thank you for the post.

  3. sundar says

    Hi all,

    I got the error Error in module ‘test’ at line 14: Failed to find base identity
    could you please help me for that issue.

  4. says

    Heyya і’m for the fіrst timе hеre. I came aсross
    this board and I fіnd Іt truly helpful & it helpedd me out much.
    ӏ’m hoping tօ provide somethung back and helpp otһers ѕuch
    ɑs you helpe me.

  5. says

    Ꭱіght now it appears like Drupl is the best blogging
    platfoгm available right now. (from what I’ve read) Is that what
    you’rᥱ using on your blog?

  6. says

    My developer is trying to convince me to move to .net from PHP.
    I have always disliked the idea because of the costs.
    But he’s tryiong none the less. I’ve been using Movable-type on several websites for about
    a year and am worried about switching to another platform.
    I have heard fantastic things about blogengine.net. Is there a
    way I can import all my wordpress content into it? Any help would be greatly appreciated!

  7. says

    I like the helpful information you provide to your articles.
    I’ll bookmark your weblog and take a look at once more right here regularly.
    I am quite sure I’ll be told mamy new stuff right here!
    Good luck for the following!

  8. says

    We’re a gaggle of volunteers and opening a new scheme in our community.
    Your website provided us with helpful information to
    work on. You have done an impressive job and our whole group
    can be thankful to you.

Leave a Reply to linux server management api Cancel reply

Your email address will not be published. Required fields are marked *