Versions Compared

Key

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

...

Example and guidline of creating the OSGi Feature for SDN-R with name helloworld.

HINT: This example is located in the sdnr sandbox and not in ONAP gerrit ccsdk/features repository

The SDN-R template structure has the elements

namecontent
featureOSGi xml feature and dependency
installerZIP file containg mavenrepository content of helloworld feature for delivery to distribution ODL Karaf container.
modelOSGi bundles export interface source files as java or yang source
providerOSGi bundles implementation source files as java or yang source

Provide feature code

In the gerrit ccsdk/feature repository in the path sdnr/wt the sources for all feature bundles are located.

In the following directory tree there are two sdnr services northbound and wt:

...

sdnr/
├── northbound
│   ├── features
│   ├── helloworld
│   ├── goodbyeworld
│   ├── energysavings
│   └── oofpcipoc
└── wt
    ├── featureaggregator
    ├── apigateway
    ├── helpserver
    ├── devicemodel
    ├── devicemanager
    ├── websocketmanager2
    ├── odlux
    ├── pom.xml
    └── README.md

The sdnr/wt the bundles apigateway, helpserver, devicemodel, devicemanager, websocketmanager2, odlux are providing the functionality.

The sdnr/wt/featureaggregator

  • is packaging all the above sdnr wt feature bundles (apigateway, .. ,odlux) into one ZIP installer to integrate them into a distribution image
  • providing a single karaf feature that can be used to install the complete service "sdnr-wt-feature-aggregator", but also provides the sub-features and its repositories

Provide distribution

Provide feature code

In the gerrit ccsdk/feature repository in the path sdnr/wt the sources for all bundles located.

In the following directory tree there are two sdnr services northbound and wt:

sdnr/
├── northbound
│   ├── energysavings
│   └── oofpcipoc
└── wt
    ├── featureaggregator
    ├── apigateway
    ├── helpserver
    ├── devicemodel
    ├── devicemanager
    ├── websocketmanager2
    ├── odlux
    ├── pom.xml
    └── README.md

The sdnr/wt bundles apigateway, helpserver, devicemodel, devicemanager, websocketmanager2, odlux are providing the functionality.

The sdnr/wt/featureaggregator

...

Hello World

In the wiki page Creating an Instance of SDN-R (Casablanca) we saw how the docker container is constructed and how features are installed into OpenDaylight.  We now discuss how to create and add a new feature to SDNR.  As an example, we will create a Hello World feature in the ccsdk/features repository using the subdirectory sdnr/northbound.  This is the initial file structure.

...