Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
None
-
None
-
None
-
Operating System: All
Platform: All
-
2558
Description
Toaster Tutorials describing Plugin Deployment need updating to karaf. These
https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL:Toaster_Tutorial
Plugin Deployment
If we only copy the two (sample-toaster and sample-toaster-provider) .JAR bundles ( from the projects target to our distribution plugin folder controller\opendaylight\distribution\opendaylight\target\distribution.opendaylight-osgipackage\opendaylight\plugins, when starting the ODL controller, MD-SAL will only load the data-model of the toaster, and the ToasterService interface, without the implementation. So we have to explicitly inform MD-SAL which implementation (module) of the ToasterService API we want to be loaded.
This is done through the config .XML file that has to be added to the distribution\opendaylight\target\distribution.opendaylight-osgipackage\opendaylight\configuration\initial folder. This initial folder contains configuration files, the folder is parsed during ODL startup, and the files are processed in alphabetical order. Files starting with 01 and 02 contain configuration for MD-SAL generic services, so our toaster configuration should be added at the end of the queue, so we chose the name of the file 03-toaster-sample).
https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL:Toaster_Step-By-Step
How Do My Jar Files get Deployed in OSGI?
Now that you have created your projects you need to get the .jar files that are created into your OSGi container. You can manually copy the .jar file which is generated under your <project>/target directory to the controller/opendaylight/distribution/opendaylight/target/distribution.opendaylight-osgipackage/opendaylight/plugins directory. To manually copy in the updated code, you can copy the jar file from the target directory to the plugins directory. For example from the toaster-provider project directory: