Jump to: navigation, search

Release/Helium/VTN/Developer Guide:Hacking:VTN Manager

This was last updated for the Helium release and needs to be updated. Please bear that in mind when reading the content and feel free to help update it.


This guide explains how to get, build, and run VTN Manager for developers who want to hack the source code of VTN Manager. The page assumes that you want to hack the code on the stable helium branch of VTN project. If you are interested in hacking the latest code in the master branch rather than on the stable helium branch, please see the Hacking Guide.

The all procedures below assume that you are getting the latest source code of VTN Project on your local Linux machine.

Installing VTN Manager from source code

Prior preparation

VTN Manager is a set of OSGi bundles running in OpenDaylight controller, so prior preparation for installing VTN Manager is the same as OpenDaylight controller.

Please see Controller's Installation Guide.

Get VTN Source

Note: The procedure that follows assumes:

  • You are installing OpenDaylight Controller with VTN Manager on your local Linux machine.
1. Download the code from the Git repository of VTN Project.
git clone ssh://<username>@git.opendaylight.org:29418/vtn.git


git clone https://git.opendaylight.org/gerrit/p/vtn.git
The following instructions assume you put the code in directory ${VTN_DIR}.
${VTN_DIR}=<Top of VTN source tree>
Checkout the stable helium code.
  cd ${VTN_DIR}
  git checkout stable/helium

Build and Run the Controller with VTN Manager

Build karaf distribution

cd ${VTN_DIR}/manager/dist/karaf
mvn clean install –DskipTests
cd ${VTN_DIR}/manager/dist/karaf/target/assembly
  • After successful build, the directory ${VTN_DIR}/manager/dist-karaf will have assembly and tar and zip versions of binaries
  • By default, VTN features is automatically installed. So you don't need to manually install VTN features.
  • User can either choose to run from assembly or copy the tar or zip to required locations and execute there.
Test if VTN Manger is running
  • In the karaf prompt, type the below command to ensure that vtn packages are installed.
feature:list –i | grep vtn


VTN Manager provides REST API for virtual network functions.

Please check the VTN Manager's REST API specification page for detailed information.

Here is an example of how to create a virtual tenant network.

curl --user "admin":"admin" -H "Accept: application/json" -H \
"Content-type: application/json" -X POST \
http://localhost:8080/controller/nb/v2/vtn/default/vtns/Tenant1 \
-d '{"description": "My First Virtual Tenant Network"}'

You can check the list of all tenants by executing the following command.

curl --user "admin":"admin" -H "Accept: application/json" -H \
"Content-type: application/json" -X GET \

To know the usage of VTN Manager in Opendaylight Controller, Please click the below link: