My Wiki!

MD-SAL Tutorial

Virtual box

Virtual box image ubuntu14.04odl_dev.qcow

RAM 3Gb, HDD 200G LVM

User: odldev; pwd: odldev

Java 7

Maven 3.3.3

The process to get start with developing an ODL controller is documented in a series of steps.

Resulting status of each step was committed to git branch with stepname, e.g., step0. Use “git branch -a” to see all committed step and “git checkout branchname” to switch to each step. “git diff” is also useful to see what exactly has been changed.

Step0: Generate Simple MD-SAL Project from Maven Archetype

This step generates necessary modules to start developing ODL controller. Following are summary of what has been done in this step.

  • Change to working directory and generate project from archetype
mvn archetype:generate -DarchetypeGroupId=org.opendaylight.controller \
  -DarchetypeRepository=http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/ \
  -DarchetypeCatalog=http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/archetype-catalog.xml -DappName=MMA
  • Execute generate module to complete the generation.
  • Generate karaf distribution module from archetype
mvn archetype:generate -DarchetypeGroupId=org.opendaylight.controller \
  -DarchetypeRepository=http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/ \
  -DarchetypeCatalog=http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/archetype-catalog.xml

Step1: Restructure Project Directory

Make more structured maven project to avoid inconsistent dependency in modules.

  • Create parent pom module
  • Change parent declaration in other modules: model, provider, distribution-karaf

Step 2: Start New Controller Module

  • Clone and adapt provider module
    • Rename yang module configuration file and module_name the file
    • Rename initial xml file and update pom.xml
    • Remove old classes in org.opendaylight.controller namespace
  • Update features module
  • Update distribution module

Navigation