Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

Example and guidline of creating an OSGi Meta-Feature or Feature-All or Feature-aggregator.

The Component here is an SDN-R microservice consisting of two OSGi bundles.

More specific:

  • Microservice name: northbound
  • Included OSGi bundles: helloworld, goodbyworld
  • Meta-Feature: sdnr-northbound-all

Content

Table of Contents

Goodbye World

The next step after Creating an Instance of SDNR and Creating and Installing a New Feature into SDNR is to create a "component meta-feature" or "feature aggregator" that groups the SDNR northbound features together and enables them to be installed into OpenDaylight using a single reference.  The first step is to create a second feature (Goodbye World) in the same repository as Hello World, shown here.  Goodbye World is identical to Hello World except for name changes.

The feature pom.xml file for goodbyeworld - shown below - is simpler than the file we discussed earlier because there is no longer any residual code from the "pre-Casablanca" method for installing features into karaf.  It is straightforward and simply generates the features.xml file in the local maven repository.

Image Added

Executing 'mvn clean install' in these two features helloworld and goodbyeworld generates the corresponding features and zip files in the local maven repository.

...

Now we look at features/installer/pom.xml.  The file is very similar to the pom.xml file for the sliapi installer, although it is simpler because it does not include the "pre-Casablanca" code.  Its dependency is the sdnr-northbound-all artifact created immediately above, and it copies the maven repositories of all the features.xml files with the groupId org.onap.ccsdk.features.sdnr.northbound.

...

And the local maven repository has been updated with these files.

We have all of the information files that we need.

Modifying Construction of the ODLSLI Container

Two files need to be modified:

  • ccsdk/distribution/odlsli/pom.xml
  • ccsdk/distribution/odlsli/src/main/docker/Dockerfile

ccsdk/distribution/odlsli/pom.xml

ccsdk/distribution/odlsli/src/main/docker/Dockerfile

...

Now that everything is in place, we can execute the pom.xml file in ccsdkin ccsdk/distribution/odlsli.

Image Modified

Success!  And to show that it actually works.

...