Jump to: navigation, search

SNMP4SDN:Installation Guide

Installation in OpenDaylight Release

Beryllium Release

  • SNMP4SDN's feature is already packaged in the Zip package (please download and unzip the Zip package here), and no further installation steps are required.

Lithium Release

  • SNMP4SDN's feature is already packaged in the Zip package (please download and unzip the Zip package here), and no further installation steps are required.

Helium Release

  • SNMP4SDN's feature is already packaged in the Zip package (please download and unzip the Zip package here), and no further installation steps are required.

Hydrogen Release

Troubleshooting

User Guide: Troubleshooting

Installation from source

Steps overview: (details as below)

1. Pull code via git CLI

2. Build the code

3. Install the bundle/feature

Pull code via git CLI

  • git account is required, if not yet have one, the detail is here
git clone ssh://<username>@git.opendaylight.org:29418/snmp4sdn.git

or

git clone https://git.opendaylight.org/gerrit/p/snmp4sdn.git

Build the code

One may either build the code in console or using Eclipse, as follows.

Build the code in console

cd snmp4sdn/
mvn clean install

Import and build the code in Eclipse

Import the code

Eclipse --> File --> Import --> Existing Maven Projects
--> Root Directory: Browse to select the SNMP4SDN's directory
--> Selects all the Project POMs found --> ... Done

Build the code

On the project "snmp4sdn" --> Debug As --> Maven build

Install the bundle/feature

Prerequisite

Karaf contains only artifacts of latest version by default, as a result if one'd like to build SNMP4SDN manually, the 'controller' has to be built first so as to generate the needed dependencies of SNMP4SDN.
To download and build 'controller':

git clone ssh://<username>@git.opendaylight.org:29418/controller.git
(or git clone https://git.opendaylight.org/gerrit/controller)
cd controller
mvn clean install

Besides, for some dependencies of SNMP4SDN not provided by the controller built artifacts nor OpenDaylight Release, the dependencies could be on OpenDaylight repository. So one need to direct the location of OpenDaylight repository, using the settings.xml file, to be installed as below. (introduction of the settings.xml)

# To grabe settings.xml
cp -n ~/.m2/settings.xml{,.orig} ; \
wget -q -O - https://raw.githubusercontent.com/opendaylight/odlparent/master/settings.xml > ~/.m2/settings.xml

Get the OpenDayilght Release

1. Download Here
2. Unzip it (unzip to, for example, ~/distribution-karaf-xxx-<ODL_release_name>-xxx)

Launch Karaf

cd <the_distribution's_directory>  (for example, by default, ~/distribution-karaf-xxx-<ODL_release_name>-xxx)
cd bin
./karaf

Install features

In Karaf console, replace the feature repo to your new one. And then install the feature.

feature:repo-list | grep snmp4sdn  (To see the version number of snmp4sdn)
feature:repo-remove mvn:org.opendaylight.snmp4sdn/x.x.x-<ODL_release_name>/xml/features  (x.x.x is as the version number shown in the previous command, ODL_release_name is the name of OpenDaylight release such as Lithium)
feature:repo-add mvn:org.opendaylight.snmp4sdn/y.y.y-SNAPSHOT/xml/features

  (y.y.y is as the version number of the SNMP4SDN Plugin manually built.
   The version number: refer to snmp4sdn's source code, ~/snmp4sdn/snmp4sdn/pom.xml, 
   find <artifactId>snmp4sdn</artifactId><version>y.y.y-SNAPSHOT</version>)
feature:install odl-snmp4sdn-all

If the following failure occurs, refer to a workaround here. That is, exit Karaf, and edit the file <karaf_directory>/etc/config.properties, remove the line ${services-${karaf.framework}} and the ", \" in the line above.

Error executing command: Could not start bundle ... 
Reason: Missing Constraint: Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE)(version=1.7))"

One may check whether the SNMP4SDN provided bundles started successfully. To list the install bundles of SNMP4SDN:

bundle:list | grep snmp4sdn

There should list something like this:

326       ACTIVATED   snmp4sdn mdsal model
327       ACTIVATED   snmp4sdn plugin
328       ACTIVATED   snmp4sdn plugin shell

Uninstall bundles/features

To completely uninstall SNMP4SDN, uninstall the bundle as well as the feature.

1. Firstly, list the install bundles of SNMP4SDN

bundle:list | grep snmp4sdn

There should list something like this:

326       ACTIVATED   snmp4sdn mdsal model
327       ACTIVATED   snmp4sdn plugin
328       ACTIVATED   snmp4sdn plugin shell

2. Uninstall the bundles

bundle:uninstall <snmp4sdn_mdsal_bundle_id> <snmp4sdn_plugin_bundle_id> <snmp4sdn_plugin_shell_bundle_id>
(For example: bundle uninstall 326 327 328)

3. Remove the feature and feature-repo

feature:uninstall odl-snmp4sdn-snmp4sdn
feature:uninstall odl-snmp4sdn-all
feature:repo-remove mvn:org.opendaylight.snmp4sdn/x.x.x-<ODL_release_name>/xml/features

4. Check over

One may use "bundle:list" and "feature:list" commands to examine whether the bundles and features are completely removed.

bundle:list | grep snmp4sdn
feature:list | grep snmp4sdn