opendaylight developer guide · pdf fileopendaylight developer guide june 29, 2015 lithium iii...

194
OpenDaylight Developer Guide Lithium (June 29, 2015)

Upload: trinhngoc

Post on 08-Mar-2018

250 views

Category:

Documents


8 download

TRANSCRIPT

  • OpenDaylight

    Developer GuideLithium (June 29, 2015)

  • OpenDaylight Developer Guide June 29, 2015 Lithium

    ii

    OpenDaylight Developer GuideOpenDaylight Community

    Lithium (2015-06-29)Copyright 2015 Linux Foundation All rights reserved.

    This guide describes how to develop using OpenDaylight.

    This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 whichaccompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html

    http://www.eclipse.org/legal/epl-v10.html

  • OpenDaylight Developer Guide June 29, 2015 Lithium

    iii

    Table of ContentsI. Overview ...................................................................................................................... 1

    1. Getting started with Git and Gerrit ..................................................................... 3Overview of Git and Gerrit .............................................................................. 3Setting up a Gerrit account ............................................................................. 3Generating SSH keys for your system ............................................................... 6Registering your SSH key with Gerrit ............................................................... 6

    2. Pulling and Pushing the Code from the CLI .......................................................... 9Pulling code via Git CLI ................................................................................... 9Setting up Gerrit Change-id Commit Message Hook ......................................... 9Building the code .......................................................................................... 10Runing OpenDaylight from local build ........................................................... 10Commit the code using Git CLI ...................................................................... 11Pulling the Code changes via Git CLI .............................................................. 12Pushing the Code via Git CLI ......................................................................... 12

    3. Developing Apps on the OpenDaylight controller .............................................. 15Overview ....................................................................................................... 15Pre requisites ................................................................................................. 15Building an example module ......................................................................... 16Defining a Simple Hello World RPC ................................................................ 17Add a simple HelloWorld RPC API ................................................................. 18Implement the HelloWorld RPC API ............................................................... 19Execute the hello project for the first time ..................................................... 21Test the hello-world RPC via REST .................................................................. 21Troubleshooting ............................................................................................ 22

    II. Project-Specific Development Guides ......................................................................... 234. ALTO Developer Guide ...................................................................................... 28

    Overview ....................................................................................................... 28Adding ALTO Projects as Dependencies ......................................................... 28Putting/Fetching data from ALTO ................................................................. 28Providing Customized Implementation .......................................................... 30

    5. BGP Developer Guide ........................................................................................ 31Overview ....................................................................................................... 31BGP Architecture ........................................................................................... 31Key APIs and Interfaces ................................................................................. 32BGP RIB ......................................................................................................... 33BGP inet ........................................................................................................ 36BGP flowspec ................................................................................................ 36BGP linkstate ................................................................................................. 36BGP topology provider .................................................................................. 36API Reference Documentation ....................................................................... 36

    6. CAPWAP Developer Guide ................................................................................. 37Overview ....................................................................................................... 37CAPWAP Architecture ................................................................................... 37CAPWAP APIs and Interfaces ......................................................................... 37API Reference Documentation ....................................................................... 37

    7. Controller .......................................................................................................... 38Overview ....................................................................................................... 38MD-SAL Overview .......................................................................................... 39

  • OpenDaylight Developer Guide June 29, 2015 Lithium

    iv

    MD-SAL Data Transactions ............................................................................ 41MD-SAL RPC routing ...................................................................................... 47OpenDaylight Controller MD-SAL: RESTCONF ................................................. 50Config Subsystem .......................................................................................... 58

    8. DIDM Developer Guide ..................................................................................... 62Overview ....................................................................................................... 62DIDM Architecture ........................................................................................ 62

    9. DLUX ................................................................................................................ 63Setup and Run .............................................................................................. 63DLUX Modules .............................................................................................. 63Add new application using DLUX modularity ................................................. 66Yang Utils ..................................................................................................... 68

    10. IoTDM Developer Guide .................................................................................. 70Overview ....................................................................................................... 70oneM2M Architecture ................................................................................... 70Key APIs and Interfaces ................................................................................. 71

    11. L2Switch Developer Guide ............................................................................... 72Overview ....................................................................................................... 72L2Switch Architecture .................................................................................... 72Key APIs and Interfaces ................................................................................. 72API Reference Documentation ....................................................................... 81Checking out the L2Switch project ................................................................ 81Testing your changes to the L2Switch project ................................................ 81

    12. LACP Developer Guide ..................................................................................... 83LACP Overview .............................................................................................. 83LACP Architecture ......................................................................................... 83

    13. Network Intent Composition (NIC) Developer Guide ........................................ 85Overview ....................................................................................................... 85odl-nic-core .................................................................................................... 85odl-nic-cli ....................................................................................................... 86

    14. Neutron Northbound ...................................................................................... 87How to Write a SB Neutron Consumer .......................................................... 87How to use the legacy I*Aware interfaces ..................................................... 87How to use the Neutron YANG model .......................................................... 89

    15. ODL-SDNi Developer Guide .............................................................................. 91Overview ................................................................................