Have questions? Stuck? Please check our FAQ for some common questions and answers.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

An application can create their own custom views and have them integrated into the ONOS web GUI. This tutorial walks you through the process of developing such a view. A fictitious company, "Meowster, Inc." is used throughout the examples.

Application Set Up

The quickest way to get started is to use the maven archetypes to create the application source directory structure and fill it with template code. You can get more details here, but to summarize:

(0) Create a working directory

$ mkdir meow
$ cd meow

 

(1) Create the main application

$ onos-create-app app org.meowster.app meowster-app

When asked for the version, accept the suggested default: 1.0-SNAPSHOT, and press enter.

When asked to confirm the properties configuration, press enter.

groupId: org.meowster.app
artifactId: meowster-app
version: 1.0-SNAPSHOT
package: org.meowster.app

 

(2) Overlay the UI additional components

$ onos-create-app ui org.meowster.app meowster-app

When asked for the version, accept the suggested default: 1.0-SNAPSHOT, and press enter.

When asked to confirm the properties configuration, press enter.


(3) Modify the pom.xml file to mark the module as an ONOS app:

$ cd meowster-app
$ vi pom.xml

(a) Change the description:

<description>Meowster Sample ONOS App</description>

(b) In the <properties> section, change the app name and origin:

<onos.app.name>org.meowster.app</onos.app.name>
<onos.app.origin>Meowster, Inc.</onos.app.origin>

 

(4) Build the app:

$ mvn clean install

Note that your application is bundled as an .oar (ONOS Application ARchive) file in the target directory:

...
[INFO] Installing /Users/simonh/dev/meow/meowster-app/target/meowster-app-1.0-SNAPSHOT.oar to /Users/simonh/.m2/repository/org/meowster/app/meowster-app/1.0-SNAPSHOT/meowster-app-1.0-SNAPSHOT.oar
...

 

 

 

 

  • No labels