Jian Li
Committed by Gerrit Code Review

[ONOS-3634] Enhance app to have a category, icon, URL and readme

This commmit enhances application to have category, icon, URL and
readme. The web GUI and CLI will be implemented in separate commits

Change-Id: Ib02716d7118cc617b24f196f2213ea1fe99a34be
Showing 91 changed files with 542 additions and 122 deletions
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Open Networking Laboratory
~ Copyright 2015-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -15,9 +15,11 @@
~ limitations under the License.
-->
<app name="org.onosproject.aaa" origin="ATT" version="${project.version}"
category="default" url="http://onosproject.org"
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<readme>ONOS authentication application.</readme>
<artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-app-xos-integration/${project.version}</artifact>
<bundle>mvn:com.sun.jersey/jersey-client/1.19</bundle>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2014 Open Networking Laboratory
~ Copyright 2014-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -19,7 +19,6 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onosproject</groupId>
<artifactId>onos-apps</artifactId>
......@@ -32,10 +31,6 @@
<description>ONOS authentication application</description>
<properties>
<onos.app.name>org.onosproject.aaa</onos.app.name>
</properties>
<dependencies>
<dependency>
<groupId>org.osgi</groupId>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Open Networking Laboratory
~ Copyright 2015-2016 Open Networking Laboratory
~ Originally created by Pengfei Lu, Network and Cloud Computing Laboratory, Dalian University of Technology, China
~ Advisers: Keqiu Li and Heng Qi
~ This work is supported by the State Key Program of National Natural Science of China(Grant No. 61432002)
......@@ -40,6 +40,9 @@
<properties>
<onos.app.name>org.onosproject.acl</onos.app.name>
<onos.app.origin>DLUT</onos.app.origin>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>ONOS ACL application.</onos.app.readme>
<web.context>/onos/v1/acl</web.context>
<api.version>1.0.0</api.version>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Open Networking Laboratory
~ Copyright 2015-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -15,9 +15,11 @@
~ limitations under the License.
-->
<app name="org.onosproject.bgprouter" origin="ON.Lab" version="${project.version}"
category="default" url="http://onosproject.org"
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<readme>BGP router application.</readme>
<artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-app-routing-api/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-app-routing/${project.version}</artifact>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Open Networking Laboratory
~ Copyright 2015-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2014 Open Networking Laboratory
~ Copyright 2014-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -33,6 +33,9 @@
<properties>
<onos.app.name>org.onosproject.cip</onos.app.name>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Cluster IP alias application.</onos.app.readme>
</properties>
<dependencies>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Open Networking Laboratory
~ Copyright 2015-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -32,6 +32,9 @@
<properties>
<onos.app.name>org.onosproject.cordfabric</onos.app.name>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Simple fabric application for CORD.</onos.app.readme>
<web.context>/onos/cordfabric</web.context>
<api.version>1.0.0</api.version>
<api.title>ONOS CORD Fabric REST API</api.title>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2014 Open Networking Laboratory
~ Copyright 2014-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -33,6 +33,9 @@
<properties>
<onos.app.name>org.onosproject.cordvtn</onos.app.name>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Virtual tenant network service for CORD.</onos.app.readme>
<web.context>/onos/cordvtn</web.context>
<api.version>1.0.0</api.version>
<api.title>CORD VTN REST API</api.title>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2014 Open Networking Laboratory
~ Copyright 2014-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -14,7 +14,8 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
......@@ -29,6 +30,14 @@
<description>Control Plane Management Application</description>
<properties>
<onos.app.name>org.onosproject.cpman</onos.app.name>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Control plane management application.
</onos.app.readme>
</properties>
<dependencies>
<dependency>
<groupId>org.onosproject</groupId>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2014 Open Networking Laboratory
~ Copyright 2014-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Open Networking Laboratory
~ Copyright 2015-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -15,9 +15,11 @@
~ limitations under the License.
-->
<app name="org.onosproject.dhcp" origin="ON.Lab" version="${project.version}"
category="default" url="http://onosproject.org"
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<readme>DHCP server application.</readme>
<artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-app-dhcp-api/${project.version}</artifact>
</app>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2014 Open Networking Laboratory
~ Copyright 2014-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -33,7 +33,6 @@
<description>DHCP Server application</description>
<properties>
<onos.app.name>org.onosproject.dhcp</onos.app.name>
<web.context>/onos/dhcp</web.context>
<api.version>1.0.0</api.version>
<api.title>DHCP Server REST API</api.title>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2014 Open Networking Laboratory
~ Copyright 2014-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2014 Open Networking Laboratory
~ Copyright 2014-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -14,7 +14,9 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
......@@ -27,10 +29,13 @@
<artifactId>onos-app-drivermatrix</artifactId>
<packaging>bundle</packaging>
<description>Driver behaviour support matric</description>
<description>Driver behaviour support matrix</description>
<properties>
<onos.app.name>org.onosproject.drivermatrix</onos.app.name>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Driver behavior support matrix.</onos.app.readme>
</properties>
</project>
......
......@@ -34,6 +34,10 @@
<properties>
<onos.version>1.5.0-SNAPSHOT</onos.version>
<onos.app.name>org.onosproject.events</onos.app.name>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>ONOS event history display application.
</onos.app.readme>
</properties>
<dependencies>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Open Networking Laboratory
~ Copyright 2015-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -15,10 +15,11 @@
~ limitations under the License.
-->
<app name="org.onosproject.faultmanagement" origin="BTI Systems" version="${project.version}"
category="default" url="http://onosproject.org"
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<readme>ONOS fault management application.</readme>
<artifact>mvn:${project.groupId}/onos-app-fm-mgr/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-app-fm-web/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-app-fm-gui/${project.version}</artifact>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Open Networking Laboratory
~ Copyright 2015-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2014 Open Networking Laboratory
~ Copyright 2014-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -33,6 +33,9 @@
<properties>
<onos.app.name>org.onosproject.flowanalyzer</onos.app.name>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Simple flow space analyzer.</onos.app.readme>
</properties>
<dependencies>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2014 Open Networking Laboratory
~ Copyright 2014-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -33,6 +33,9 @@
<properties>
<onos.app.name>org.onosproject.fwd</onos.app.name>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Reactive forwarding application using flow subsystem.</onos.app.readme>
</properties>
<dependencies>
......

23.3 KB

<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2014 Open Networking Laboratory
~ Copyright 2014-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -33,6 +33,9 @@
<properties>
<onos.app.name>org.onosproject.igmp</onos.app.name>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>IGMP implementation.</onos.app.readme>
</properties>
<dependencies>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Open Networking Laboratory
~ Copyright 2015-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -26,4 +27,11 @@
<packaging>bundle</packaging>
<description>IP Layer Topology API</description>
<properties>
<onos.app.name>org.onosproject.iptopology-api</onos.app.name>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>IP layer topology API.</onos.app.readme>
</properties>
</project>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2014 Open Networking Laboratory
~ Copyright 2014-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -33,6 +33,10 @@
<properties>
<onos.app.name>org.onosproject.metrics</onos.app.name>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Performance metrics collection application.
</onos.app.readme>
</properties>
<dependencies>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2014 Open Networking Laboratory
~ Copyright 2014-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -33,6 +33,10 @@
<properties>
<onos.app.name>org.onosproject.mfwd</onos.app.name>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Multicast forwarding application.
</onos.app.readme>
</properties>
<dependencies>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Open Networking Laboratory
~ Copyright 2015-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -33,6 +33,10 @@
<properties>
<onos.app.name>org.onosproject.mlb</onos.app.name>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Application that balances mastership among nodes.
</onos.app.readme>
</properties>
<dependencies>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2014 Open Networking Laboratory
~ Copyright 2014-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -33,6 +33,10 @@
<properties>
<onos.app.name>org.onosproject.mobility</onos.app.name>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Host mobility application.
</onos.app.readme>
</properties>
<dependencies>
......
......@@ -15,9 +15,11 @@
~ limitations under the License.
-->
<app name="org.onosproject.olt" origin="ON.Lab" version="${project.version}"
category="default" url="http://onosproject.org"
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<readme>OLT application for CORD.</readme>
<artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-app-olt-api/${project.version}</artifact>
</app>
......
......@@ -31,7 +31,6 @@
<description>OLT application for CORD</description>
<properties>
<onos.app.name>org.onosproject.olt</onos.app.name>
<web.context>/onos/olt</web.context>
<api.version>1.0.0</api.version>
<api.title>ONOS OLT REST API</api.title>
......
......@@ -15,9 +15,11 @@
~ limitations under the License.
-->
<app name="org.onosproject.openstackswitching" origin="ON.Lab" version="${project.version}"
category="default" url="http://onosproject.org"
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<readme>SONA Openstack Switching application.</readme>
<artifact>mvn:${project.groupId}/onos-app-openstackswitching/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-app-dhcp-api/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-app-dhcp/${project.version}</artifact>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Open Networking Laboratory
~ Copyright 2015-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -31,7 +31,6 @@
<description>SONA Openstack Switching applications</description>
<properties>
<onos.app.name>org.onosproject.openstackswitching</onos.app.name>
<web.context>/onos/openstackswitching</web.context>
<api.version>1.0.0</api.version>
<api.title>ONOS OpenStack Switching REST API</api.title>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2014 Open Networking Laboratory
~ Copyright 2014-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -33,6 +33,10 @@
<properties>
<onos.app.name>org.onosproject.optical</onos.app.name>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Packet/Optical use-case application.
</onos.app.readme>
</properties>
<dependencies>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2014 Open Networking Laboratory
~ Copyright 2015-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -33,6 +33,9 @@
<properties>
<onos.app.name>org.onosproject.pathpainter</onos.app.name>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Path visualization application.</onos.app.readme>
</properties>
</project>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Open Networking Laboratory
~ Copyright 2015-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -26,4 +27,11 @@
<packaging>bundle</packaging>
<description>PCEP protocol API</description>
<properties>
<onos.app.name>org.onosproject.pcep-api</onos.app.name>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>PCEP protocol API.</onos.app.readme>
</properties>
</project>
\ No newline at end of file
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Open Networking Laboratory
~ Copyright 2015-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -33,6 +33,9 @@
<properties>
<onos.app.name>org.onosproject.pim</onos.app.name>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Protocol independent multicast emulation.</onos.app.readme>
</properties>
<dependencies>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2014 Open Networking Laboratory
~ Copyright 2014-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -33,6 +33,9 @@
<properties>
<onos.app.name>org.onosproject.proxyarp</onos.app.name>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Proxy ARP/NDP application.</onos.app.readme>
</properties>
<dependencies>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Open Networking Laboratory
~ Copyright 2015-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -33,6 +33,9 @@
<properties>
<onos.app.name>org.onosproject.reactive.routing</onos.app.name>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>SDN-IP reactive routing application.</onos.app.readme>
</properties>
<dependencies>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Open Networking Laboratory
~ Copyright 2015-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -30,6 +30,13 @@
<packaging>bundle</packaging>
<description>API for routing applications</description>
<properties>
<onos.app.name>org.onosproject.routing-api</onos.app.name>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>API for routing applications.</onos.app.readme>
</properties>
<dependencies>
<dependency>
<groupId>org.onosproject</groupId>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Open Networking Laboratory
~ Copyright 2015-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -30,6 +30,13 @@
<packaging>bundle</packaging>
<description>Libraries for routing applications</description>
<properties>
<onos.app.name>org.onosproject.routing</onos.app.name>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>SDN-IP reactive routing application.</onos.app.readme>
</properties>
<dependencies>
<dependency>
<groupId>org.onosproject</groupId>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Open Networking Laboratory
~ Copyright 2015-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -15,9 +15,11 @@
~ limitations under the License.
-->
<app name="org.onosproject.sdnip" origin="ON.Lab" version="${project.version}"
category="default" url="http://onosproject.org"
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<readme>SDN-IP peering application.</readme>
<artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-app-routing-api/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-app-routing/${project.version}</artifact>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2014 Open Networking Laboratory
~ Copyright 2014-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2014 Open Networking Laboratory
~ Copyright 2014-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -32,6 +32,9 @@
<properties>
<onos.app.name>org.onosproject.segmentrouting</onos.app.name>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Segment routing application.</onos.app.readme>
<web.context>/onos/segmentrouting</web.context>
<api.version>1.0.0</api.version>
<api.title>ONOS Segment Routing REST API</api.title>
......
......@@ -33,6 +33,9 @@
<properties>
<onos.app.name>org.onosproject.demo</onos.app.name>
<onos.app.category>test</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Flow throughput test application.</onos.app.readme>
<web.context>/onos/demo</web.context>
<api.title>ONOS Flow Throughput Test App API</api.title>
<api.description>
......
......@@ -34,6 +34,9 @@
<properties>
<onos.app.name>org.onosproject.distributedprimitives</onos.app.name>
<onos.app.category>test</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>ONOS app to test distributed primitives.</onos.app.readme>
</properties>
<dependencies>
......
......@@ -34,6 +34,9 @@
<properties>
<onos.app.name>org.onosproject.election</onos.app.name>
<onos.app.category>test</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Master election test application.</onos.app.readme>
</properties>
<dependencies>
......
......@@ -33,6 +33,9 @@
<properties>
<onos.app.name>org.onosproject.intentperf</onos.app.name>
<onos.app.category>test</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>intent performance test application.</onos.app.readme>
</properties>
<dependencies>
......
......@@ -33,6 +33,9 @@
<properties>
<onos.app.name>org.onosproject.messagingperf</onos.app.name>
<onos.app.category>test</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Messaging performance test application.</onos.app.readme>
</properties>
<dependencies>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Open Networking Laboratory
~ Copyright 2015-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -33,6 +33,9 @@
<properties>
<onos.app.name>org.onosproject.virtualbng</onos.app.name>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Virtual broadband gateway application.</onos.app.readme>
<web.context>/onos/virtualbng</web.context>
<api.version>1.0.0</api.version>
<api.title>ONOS Virtual BNG Gateway REST API</api.title>
......
......@@ -15,9 +15,11 @@
~ limitations under the License.
-->
<app name="org.onosproject.vrouter" origin="ON.Lab" version="${project.version}"
category="default" url="http://onosproject.org"
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<readme>Virtual router application.</readme>
<artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-app-routing-api/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-app-routing/${project.version}</artifact>
......
......@@ -34,8 +34,6 @@
<properties>
<onos.version>1.5.0-SNAPSHOT</onos.version>
<onos.app.name>org.onosproject.vrouter</onos.app.name>
<onos.app.origin>ON.Lab</onos.app.origin>
</properties>
<dependencies>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Open Networking Laboratory
~ Copyright 2015-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -15,10 +15,11 @@
~ limitations under the License.
-->
<app name="org.onosproject.vtn" origin="ON.Lab" version="${project.version}"
category="default" url="http://onosproject.org"
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<readme>Virtual tenant network application.</readme>
<artifact>mvn:${project.groupId}/onos-app-vtn-mgr/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-app-sfc-mgr/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-app-vtn-web/${project.version}</artifact>
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- ~ Copyright 2014 Open Networking Laboratory ~ ~ Licensed under the Apache
License, Version 2.0 (the "License"); ~ you may not use this file except
in compliance with the License. ~ You may obtain a copy of the License at
~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable
law or agreed to in writing, software ~ distributed under the License is
distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. ~ See the License for the specific language
governing permissions and ~ limitations under the License. -->
<!--
~ Copyright 2014-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
......
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Open Networking Laboratory
~
......
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Open Networking Laboratory
~
......
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Open Networking Laboratory
~
......
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Open Networking Laboratory
~
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2014 Open Networking Laboratory
~ Copyright 2014-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -33,6 +33,9 @@
<properties>
<onos.app.name>org.onosproject.xosintegration</onos.app.name>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>ONOS XOS integration application.</onos.app.readme>
</properties>
<dependencies>
......
......@@ -44,6 +44,13 @@ public interface ApplicationDescription {
Version version();
/**
* Returns the name of the application origin, group or company.
*
* @return application origin
*/
String origin();
/**
* Returns description of the application.
*
* @return application description text
......@@ -51,11 +58,32 @@ public interface ApplicationDescription {
String description();
/**
* Returns the name of the application origin, group or company.
* Returns category of the application.
*
* @return application origin
* @return application category text
*/
String origin();
String category();
/**
* Returns url of the application.
*
* @return application url
*/
String url();
/**
* Returns readme of the application.
*
* @return application readme
*/
String readme();
/**
* Returns icon of the application.
*
* @return application icon
*/
byte[] icon();
/**
* Returns the role of the application.
......
......@@ -37,6 +37,10 @@ public class DefaultApplicationDescription implements ApplicationDescription {
private final Version version;
private final String description;
private final String origin;
private final String category;
private final String url;
private final String readme;
private final byte[] icon;
private final ApplicationRole role;
private final Set<Permission> permissions;
private final Optional<URI> featuresRepo;
......@@ -50,6 +54,10 @@ public class DefaultApplicationDescription implements ApplicationDescription {
* @param version application version
* @param description application description
* @param origin origin company
* @param category application category
* @param url application URL
* @param readme application readme
* @param icon application icon
* @param role application role
* @param permissions requested permissions
* @param featuresRepo optional features repo URI
......@@ -57,7 +65,8 @@ public class DefaultApplicationDescription implements ApplicationDescription {
* @param requiredApps list of required application names
*/
public DefaultApplicationDescription(String name, Version version,
String description, String origin,
String description, String origin, String category,
String url, String readme, byte[] icon,
ApplicationRole role, Set<Permission> permissions,
URI featuresRepo, List<String> features,
List<String> requiredApps) {
......@@ -65,6 +74,10 @@ public class DefaultApplicationDescription implements ApplicationDescription {
this.version = checkNotNull(version, "Version cannot be null");
this.description = checkNotNull(description, "Description cannot be null");
this.origin = checkNotNull(origin, "Origin cannot be null");
this.category = checkNotNull(category, "Category cannot be null");
this.url = checkNotNull(url, "URL cannot be null");
this.readme = readme;
this.icon = icon;
this.role = checkNotNull(role, "Role cannot be null");
this.permissions = checkNotNull(permissions, "Permissions cannot be null");
this.featuresRepo = Optional.ofNullable(featuresRepo);
......@@ -89,6 +102,26 @@ public class DefaultApplicationDescription implements ApplicationDescription {
}
@Override
public String category() {
return category;
}
@Override
public String url() {
return url;
}
@Override
public String readme() {
return readme;
}
@Override
public byte[] icon() {
return icon;
}
@Override
public String origin() {
return origin;
}
......@@ -125,6 +158,9 @@ public class DefaultApplicationDescription implements ApplicationDescription {
.add("version", version)
.add("description", description)
.add("origin", origin)
.add("category", category)
.add("url", url)
.add("readme", readme)
.add("role", role)
.add("permissions", permissions)
.add("featuresRepo", featuresRepo)
......
......@@ -49,6 +49,34 @@ public interface Application {
String description();
/**
* Returns category of the application.
*
* @return application category text
*/
String category();
/**
* Returns url of the application.
*
* @return application url
*/
String url();
/**
* Returns readme of the application.
*
* @return application readme
*/
String readme();
/**
* Returns icon of the application.
*
* @return application icon
*/
byte[] icon();
/**
* Returns the name of the application origin, group or company.
*
* @return application origin
......
......@@ -35,6 +35,10 @@ public class DefaultApplication implements Application {
private final ApplicationId appId;
private final Version version;
private final String description;
private final String category;
private final String url;
private final String readme;
private final byte[] icon;
private final String origin;
private final ApplicationRole role;
private final Set<Permission> permissions;
......@@ -49,6 +53,10 @@ public class DefaultApplication implements Application {
* @param version application version
* @param description application description
* @param origin origin company
* @param category application category
* @param url application URL
* @param readme application readme
* @param icon application icon
* @param role application role
* @param permissions requested permissions
* @param featuresRepo optional features repo URI
......@@ -56,7 +64,8 @@ public class DefaultApplication implements Application {
* @param requiredApps list of required application names
*/
public DefaultApplication(ApplicationId appId, Version version,
String description, String origin,
String description, String origin, String category,
String url, String readme, byte[] icon,
ApplicationRole role, Set<Permission> permissions,
Optional<URI> featuresRepo, List<String> features,
List<String> requiredApps) {
......@@ -64,6 +73,10 @@ public class DefaultApplication implements Application {
this.version = checkNotNull(version, "Version cannot be null");
this.description = checkNotNull(description, "Description cannot be null");
this.origin = checkNotNull(origin, "Origin cannot be null");
this.category = checkNotNull(category, "Category cannot be null");
this.url = checkNotNull(url, "URL cannot be null");
this.readme = readme;
this.icon = icon;
this.role = checkNotNull(role, "Role cannot be null");
this.permissions = checkNotNull(permissions, "Permissions cannot be null");
this.featuresRepo = checkNotNull(featuresRepo, "Features repo cannot be null");
......@@ -88,6 +101,26 @@ public class DefaultApplication implements Application {
}
@Override
public String category() {
return category;
}
@Override
public String url() {
return url;
}
@Override
public String readme() {
return readme;
}
@Override
public byte[] icon() {
return icon;
}
@Override
public String origin() {
return origin;
}
......@@ -119,8 +152,8 @@ public class DefaultApplication implements Application {
@Override
public int hashCode() {
return Objects.hash(appId, version, description, origin, role, permissions,
featuresRepo, features, requiredApps);
return Objects.hash(appId, version, description, origin, category, url,
readme, role, permissions, featuresRepo, features, requiredApps);
}
@Override
......@@ -136,6 +169,9 @@ public class DefaultApplication implements Application {
Objects.equals(this.version, other.version) &&
Objects.equals(this.description, other.description) &&
Objects.equals(this.origin, other.origin) &&
Objects.equals(this.category, other.category) &&
Objects.equals(this.url, other.url) &&
Objects.equals(this.readme, other.readme) &&
Objects.equals(this.role, other.role) &&
Objects.equals(this.permissions, other.permissions) &&
Objects.equals(this.featuresRepo, other.featuresRepo) &&
......@@ -150,6 +186,9 @@ public class DefaultApplication implements Application {
.add("version", version)
.add("description", description)
.add("origin", origin)
.add("category", category)
.add("url", url)
.add("readme", readme)
.add("role", role)
.add("permissions", permissions)
.add("featuresRepo", featuresRepo)
......
......@@ -32,8 +32,9 @@ import static org.onosproject.core.DefaultApplicationTest.APP_ID;
public class ApplicationEventTest extends AbstractEventTest {
private Application createApp() {
return new DefaultApplication(APP_ID, VER, DESC, ORIGIN, ROLE,
PERMS, Optional.of(FURL), FEATURES, APPS);
return new DefaultApplication(APP_ID, VER, DESC, ORIGIN, CATEGORY,
URL, README, ICON, ROLE, PERMS,
Optional.of(FURL), FEATURES, APPS);
}
@Test
......
......@@ -40,6 +40,10 @@ public class DefaultApplicationDescriptionTest {
public static final Version VER = Version.version(1, 2, "a", null);
public static final String DESC = "Awesome application from Circus, Inc.";
public static final String ORIGIN = "Circus";
public static final String CATEGORY = "other";
public static final String URL = "http://www.onosproject.org";
public static final String README = "Awesome application from Circus, Inc.";
public static final byte[] ICON = new byte[] {};
public static final ApplicationRole ROLE = ApplicationRole.ADMIN;
public static final Set<Permission> PERMS = ImmutableSet.of(
new Permission(AppPermission.class.getName(), "FLOWRULE_WRITE"),
......@@ -52,17 +56,20 @@ public class DefaultApplicationDescriptionTest {
public void basics() {
ApplicationDescription app =
new DefaultApplicationDescription(APP_NAME, VER, DESC, ORIGIN,
CATEGORY, URL, README, ICON,
ROLE, PERMS, FURL, FEATURES, APPS);
assertEquals("incorrect id", APP_NAME, app.name());
assertEquals("incorrect version", VER, app.version());
assertEquals("incorrect description", DESC, app.description());
assertEquals("incorrect origin", ORIGIN, app.origin());
assertEquals("incorect role", ROLE, app.role());
assertEquals("incorrect category", CATEGORY, app.category());
assertEquals("incorrect URL", URL, app.url());
assertEquals("incorrect readme", README, app.readme());
assertEquals("incorrect role", ROLE, app.role());
assertEquals("incorrect permissions", PERMS, app.permissions());
assertEquals("incorrect features repo", FURL, app.featuresRepo().get());
assertEquals("incorrect features", FEATURES, app.features());
assertEquals("incorrect apps", APPS, app.requiredApps());
assertTrue("incorrect toString", app.toString().contains(APP_NAME));
}
}
\ No newline at end of file
......
......@@ -33,12 +33,17 @@ public class DefaultApplicationTest {
@Test
public void basics() {
Application app = new DefaultApplication(APP_ID, VER, DESC, ORIGIN, ROLE,
Application app = new DefaultApplication(APP_ID, VER, DESC, ORIGIN,
CATEGORY, URL, README, ICON, ROLE,
PERMS, Optional.of(FURL), FEATURES, APPS);
assertEquals("incorrect id", APP_ID, app.id());
assertEquals("incorrect version", VER, app.version());
assertEquals("incorrect description", DESC, app.description());
assertEquals("incorrect origin", ORIGIN, app.origin());
assertEquals("incorrect category", CATEGORY, app.category());
assertEquals("incorrect URL", URL, app.url());
assertEquals("incorrect readme", README, app.readme());
assertEquals("incorrect icon", ICON, app.icon());
assertEquals("incorrect role", ROLE, app.role());
assertEquals("incorrect permissions", PERMS, app.permissions());
assertEquals("incorrect features repo", FURL, app.featuresRepo().get());
......@@ -49,16 +54,19 @@ public class DefaultApplicationTest {
@Test
public void testEquality() {
Application a1 = new DefaultApplication(APP_ID, VER, DESC, ORIGIN, ROLE,
Application a1 = new DefaultApplication(APP_ID, VER, DESC, ORIGIN,
CATEGORY, URL, README, ICON, ROLE,
PERMS, Optional.of(FURL), FEATURES, APPS);
Application a2 = new DefaultApplication(APP_ID, VER, DESC, ORIGIN, ROLE,
Application a2 = new DefaultApplication(APP_ID, VER, DESC, ORIGIN,
CATEGORY, URL, README, ICON, ROLE,
PERMS, Optional.of(FURL), FEATURES, APPS);
Application a3 = new DefaultApplication(APP_ID, VER, DESC, ORIGIN, ROLE,
Application a3 = new DefaultApplication(APP_ID, VER, DESC, ORIGIN,
CATEGORY, URL, README, ICON, ROLE,
PERMS, Optional.empty(), FEATURES, APPS);
Application a4 = new DefaultApplication(APP_ID, VER, DESC, ORIGIN + "asd", ROLE,
Application a4 = new DefaultApplication(APP_ID, VER, DESC, ORIGIN + "asd",
CATEGORY, URL, README, ICON, ROLE,
PERMS, Optional.of(FURL), FEATURES, APPS);
new EqualsTester().addEqualityGroup(a1, a2)
.addEqualityGroup(a3).addEqualityGroup(a4).testEquals();
}
}
\ No newline at end of file
......
/*
* Copyright 2015 Open Networking Laboratory
* Copyright 2015-2016 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -23,6 +23,7 @@ import com.google.common.io.Files;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.HierarchicalConfiguration;
import org.apache.commons.configuration.XMLConfiguration;
import org.apache.commons.lang.StringUtils;
import org.onlab.util.Tools;
import org.onosproject.app.ApplicationDescription;
import org.onosproject.app.ApplicationEvent;
......@@ -37,6 +38,10 @@ import org.onosproject.store.AbstractStore;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.awt.image.DataBufferByte;
import java.awt.image.WritableRaster;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
......@@ -81,6 +86,10 @@ public class ApplicationArchive
private static final String APPS = "[@apps]";
private static final String DESCRIPTION = "description";
private static final String CATEGORY = "[@category]";
private static final String URL = "[@url]";
private static final String README = "readme";
private static final String ROLE = "security.role";
private static final String APP_PERMISSIONS = "security.permissions.app-perm";
private static final String NET_PERMISSIONS = "security.permissions.net-perm";
......@@ -88,6 +97,7 @@ public class ApplicationArchive
private static final String OAR = ".oar";
private static final String APP_XML = "app.xml";
private static final String ICON_PNG = "icon.png";
private static final String M2_PREFIX = "m2";
private static final String ROOT = "../";
......@@ -283,8 +293,10 @@ public class ApplicationArchive
private ApplicationDescription loadAppDescription(XMLConfiguration cfg) {
String name = cfg.getString(NAME);
Version version = Version.version(cfg.getString(VERSION));
String desc = cfg.getString(DESCRIPTION);
String origin = cfg.getString(ORIGIN);
String category = cfg.getString(CATEGORY);
String url = cfg.getString(URL);
byte[] icon = getApplicationIcon(name);
ApplicationRole role = getRole(cfg.getString(ROLE));
Set<Permission> perms = getPermissions(cfg);
String featRepo = cfg.getString(FEATURES_REPO);
......@@ -295,7 +307,17 @@ public class ApplicationArchive
List<String> requiredApps = apps.isEmpty() ?
ImmutableList.of() : ImmutableList.copyOf(apps.split(","));
return new DefaultApplicationDescription(name, version, desc, origin, role,
String desc = cfg.getString(DESCRIPTION);
String readme = cfg.getString(README);
if (readme == null) {
readme = desc;
} else {
desc = compactDescription(readme);
}
return new DefaultApplicationDescription(name, version, desc, origin,
category, url, readme, icon, role,
perms, featuresRepo, features,
requiredApps);
}
......@@ -387,7 +409,6 @@ public class ApplicationArchive
return appFile(appName, "active").exists();
}
// Returns the name of the file located under the specified app directory.
private File appFile(String appName, String fileName) {
return new File(new File(appsDir, appName), fileName);
......@@ -420,7 +441,33 @@ public class ApplicationArchive
return ImmutableSet.copyOf(permissionList);
}
//
// Returns the byte stream from icon.png file in oar application archive.
private byte[] getApplicationIcon(String appName) {
// open image
File iconFile = appFile(appName, ICON_PNG);
if (!iconFile.exists()) {
iconFile = new File(appsDir, ICON_PNG);
}
if (!iconFile.exists()) {
return null;
}
BufferedImage bufferedImage = null;
try {
bufferedImage = ImageIO.read(iconFile);
} catch (IOException e) {
e.printStackTrace();
}
// get DataBufferBytes from Raster
WritableRaster raster = bufferedImage .getRaster();
DataBufferByte data = (DataBufferByte) raster.getDataBuffer();
return data.getData();
}
// Returns application role type
public ApplicationRole getRole(String value) {
if (value == null) {
......@@ -434,4 +481,16 @@ public class ApplicationArchive
}
}
}
// Returns the first sentence of the given sentence
private String compactDescription(String sentence) {
if (StringUtils.isNotEmpty(sentence)) {
if (StringUtils.contains(sentence, ".")) {
return StringUtils.substringBefore(sentence, ".") + ".";
} else {
return sentence + ".";
}
}
return sentence;
}
}
......
......@@ -60,6 +60,10 @@ public class ApplicationArchiveTest {
assertEquals("incorrect origin", ORIGIN, app.origin());
assertEquals("incorrect role", ROLE, app.role());
assertEquals("incorrect category", CATEGORY, app.category());
assertEquals("incorrect url", URL, app.url());
assertEquals("incorrect readme", README, app.readme());
assertEquals("incorrect description", DESC, app.description());
assertEquals("incorrect features URI", FURL, app.featuresRepo().get());
assertEquals("incorrect permissions", PERMS, app.permissions());
......
......@@ -74,6 +74,8 @@ public class SimpleApplicationStore extends ApplicationArchive implements Applic
DefaultApplication app =
new DefaultApplication(appId, appDesc.version(),
appDesc.description(), appDesc.origin(),
appDesc.category(), appDesc.url(),
appDesc.readme(), appDesc.icon(),
appDesc.role(), appDesc.permissions(),
appDesc.featuresRepo(), appDesc.features(),
appDesc.requiredApps());
......@@ -117,7 +119,9 @@ public class SimpleApplicationStore extends ApplicationArchive implements Applic
ApplicationId appId = idStore.registerApplication(appDesc.name());
DefaultApplication app =
new DefaultApplication(appId, appDesc.version(), appDesc.description(),
appDesc.origin(), appDesc.role(), appDesc.permissions(),
appDesc.origin(), appDesc.category(), appDesc.url(),
appDesc.readme(), appDesc.icon(),
appDesc.role(), appDesc.permissions(),
appDesc.featuresRepo(), appDesc.features(),
appDesc.requiredApps());
apps.put(appId, app);
......
<!--
~ Copyright 2015 Open Networking Laboratory
~ Copyright 2015-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -13,9 +13,9 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<app name="org.foo.app" origin="Circus" version="1.2.a"
featuresRepo="mvn:org.foo-features/1.2a/xml/features"
features="foo,bar">
<app name="org.foo.app" origin="Circus" version="1.2.a" category="other"
url="http://www.onosproject.org" featuresRepo="mvn:org.foo-features/1.2a/xml/features"
readme="Awesome application from Circus, Inc." features="foo,bar">
<description>Awesome application from Circus, Inc.</description>
<security>
<role>ADMIN</role>
......@@ -23,7 +23,5 @@
<app-perm>FLOWRULE_WRITE</app-perm>
<app-perm>FLOWRULE_READ</app-perm>
</permissions>
</security>
</app>
......
......@@ -138,7 +138,8 @@ public class ApplicationManagerTest {
@Override
public Application create(InputStream appDescStream) {
app = new DefaultApplication(APP_ID, VER, DESC, ORIGIN, ROLE, PERMS,
app = new DefaultApplication(APP_ID, VER, DESC, ORIGIN, CATEGORY,
URL, README, ICON, ROLE, PERMS,
Optional.of(FURL), FEATURES, ImmutableList.of());
state = INSTALLED;
delegate.notify(new ApplicationEvent(APP_INSTALLED, app));
......
......@@ -505,8 +505,9 @@ public class GossipApplicationStore extends ApplicationArchive
private Application registerApp(ApplicationDescription appDesc) {
ApplicationId appId = idStore.registerApplication(appDesc.name());
return new DefaultApplication(appId, appDesc.version(), appDesc.description(),
appDesc.origin(), appDesc.role(), appDesc.permissions(),
appDesc.featuresRepo(), appDesc.features(),
appDesc.requiredApps());
appDesc.origin(), appDesc.category(), appDesc.url(),
appDesc.readme(), appDesc.icon(), appDesc.role(),
appDesc.permissions(), appDesc.featuresRepo(),
appDesc.features(), appDesc.requiredApps());
}
}
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Open Networking Laboratory
~ Copyright 2015-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -15,9 +15,11 @@
~ limitations under the License.
-->
<app name="org.onosproject.bgp" origin="ON.Lab" version="${project.version}"
category="default" url="http://onosproject.org"
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<readme>BGP protocol southbound providers.</readme>
<artifact>mvn:${project.groupId}/onos-bgpio/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-bgp-api/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-bgp-ctl/${project.version}</artifact>
......
<!--
~ Copyright 2015 Open Networking Laboratory
~ Copyright 2015-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -13,7 +13,8 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
......
......@@ -31,6 +31,10 @@
<properties>
<onos.app.name>org.onosproject.hostprovider</onos.app.name>
<onos.app.origin>ON.Lab</onos.app.origin>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>ONOS host location provider.</onos.app.readme>
</properties>
<description>ONOS host location provider</description>
......
......@@ -32,6 +32,10 @@
<properties>
<onos.app.name>org.onosproject.lldpprovider</onos.app.name>
<onos.app.origin>ON.Lab</onos.app.origin>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>ONOS LLDP link provider.</onos.app.readme>
</properties>
<description>ONOS LLDP link provider</description>
......
......@@ -35,6 +35,10 @@
<properties>
<onos.app.name>org.onosproject.netcfghostprovider</onos.app.name>
<onos.app.origin>ON.Lab</onos.app.origin>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Host provider that uses network config
service to discover hosts.</onos.app.readme>
</properties>
<dependencies>
......
......@@ -15,10 +15,11 @@
~ limitations under the License.
-->
<app name="org.onosproject.netconf" origin="ON.Lab" version="${project.version}"
category="default" url="http://onosproject.org"
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<readme>ONOS NetConf protocol southbound provider.</readme>
<artifact>mvn:${project.groupId}/onos-netconf-api/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-netconf-ctl/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-drivers/${project.version}</artifact>
......
......@@ -33,6 +33,10 @@
<properties>
<onos.app.name>org.onosproject.null</onos.app.name>
<onos.app.origin>ON.Lab</onos.app.origin>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>ONOS null southbound provider.</onos.app.readme>
</properties>
<dependencies>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2014-2015 Open Networking Laboratory
~ Copyright 2014-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -15,10 +15,11 @@
~ limitations under the License.
-->
<app name="org.onosproject.openflow-base" origin="ON.Lab" version="${project.version}"
category="default" url="http://onosproject.org"
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<readme>OpenFlow protocol southbound provider.</readme>
<artifact>mvn:${project.groupId}/onos-of-api/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-of-ctl/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-drivers/${project.version}</artifact>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2014-2015 Open Networking Laboratory
~ Copyright 2014-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Open Networking Laboratory
~ Copyright 2015-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Open Networking Laboratory
~ Copyright 2015-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -15,10 +15,11 @@
~ limitations under the License.
-->
<app name="org.onosproject.ovsdb-base" origin="ON.Lab" version="${project.version}"
category="default" url="http://onosproject.org"
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<readme>OVSDB protocol southbound providers.</readme>
<artifact>mvn:${project.groupId}/onos-ovsdb-rfc/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-ovsdb-api/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-ovsdb-ctl/${project.version}</artifact>
......
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Open Networking Laboratory
~ Copyright 2015-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Open Networking Laboratory
~ Copyright 2015-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -15,9 +15,11 @@
~ limitations under the License.
-->
<app name="org.onosproject.pcep" origin="ON.Lab" version="${project.version}"
category="default" url="http://onosproject.org"
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<readme>PCEP protocol southbound provider.</readme>
<artifact>mvn:${project.groupId}/onos-app-pcep-api/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-pcepio/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-pcep-controller-api/${project.version}</artifact>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Open Networking Laboratory
~ Copyright 2015-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -13,7 +14,8 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
......
......@@ -15,10 +15,11 @@
~ limitations under the License.
-->
<app name="org.onosproject.restsb" origin="ON.Lab" version="${project.version}"
category="default" url="http://onosproject.org"
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<readme>REST protocol southbound provider.</readme>
<artifact>mvn:${project.groupId}/onos-restsb-api/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-restsb-ctl/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-drivers/${project.version}</artifact>
......
......@@ -15,9 +15,11 @@
~ limitations under the License.
-->
<app name="org.onosproject.snmp" origin="BTI Systems" version="${project.version}"
category="default" url="http://onosproject.org"
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<readme>SNMP protocol southbound provider.</readme>
<artifact>mvn:${project.groupId}/onos-snmp-provider-device/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-snmp-provider-alarm/${project.version}</artifact>
</app>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Open Networking Laboratory
~ Copyright 2015-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......
......@@ -18,6 +18,7 @@ package org.onosproject.maven;
import com.google.common.collect.ImmutableList;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.XMLConfiguration;
import org.apache.commons.lang.StringUtils;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
......@@ -28,6 +29,11 @@ import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.MavenProjectHelper;
import javax.imageio.ImageIO;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.awt.image.BufferedImage;
import java.awt.image.DataBufferByte;
import java.awt.image.WritableRaster;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
......@@ -55,6 +61,7 @@ public class OnosAppMojo extends AbstractMojo {
private static final String ARTIFACT = "artifact";
private static final String APP_XML = "app.xml";
private static final String ICON_PNG = "icon.png";
private static final String FEATURES_XML = "features.xml";
private static final String MVN_URL = "mvn:";
......@@ -64,6 +71,10 @@ public class OnosAppMojo extends AbstractMojo {
private static final String ONOS_APP_ORIGIN = "onos.app.origin";
private static final String ONOS_APP_REQUIRES = "onos.app.requires";
private static final String ONOS_APP_CATEGORY = "onos.app.category";
private static final String ONOS_APP_URL = "onos.app.url";
private static final String ONOS_APP_README = "onos.app.readme";
private static final String JAR = "jar";
private static final String XML = "xml";
private static final String APP_ZIP = "oar";
......@@ -72,6 +83,9 @@ public class OnosAppMojo extends AbstractMojo {
private static final String DEFAULT_ORIGIN = "ON.Lab";
private static final String DEFAULT_VERSION = "${project.version}";
private static final String DEFAULT_CATEGORY = "Default";
private static final String DEFAULT_URL = "http://onosproject.org";
private static final String DEFAULT_FEATURES_REPO =
"mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features";
private static final String DEFAULT_ARTIFACT =
......@@ -82,6 +96,9 @@ public class OnosAppMojo extends AbstractMojo {
private String name;
private String origin;
private String requiredApps;
private String category;
private String url;
private String readme;
private String version = DEFAULT_VERSION;
private String featuresRepo = DEFAULT_FEATURES_REPO;
private List<String> artifacts;
......@@ -137,7 +154,6 @@ public class OnosAppMojo extends AbstractMojo {
@Component
protected MavenProjectHelper projectHelper;
private File m2Directory;
protected File stageDirectory;
protected String projectPath;
......@@ -165,6 +181,16 @@ public class OnosAppMojo extends AbstractMojo {
requiredApps = (String) project.getProperties().get(ONOS_APP_REQUIRES);
requiredApps = requiredApps == null ? "" : requiredApps.replaceAll("[\\s]", "");
category = (String) project.getProperties().get(ONOS_APP_CATEGORY);
category = category != null ? category : DEFAULT_CATEGORY;
url = (String) project.getProperties().get(ONOS_APP_URL);
url = url != null ? url : DEFAULT_URL;
// if readme does not exist, we simply fallback to use description
readme = (String) project.getProperties().get(ONOS_APP_README);
readme = readme != null ? readme : projectDescription;
if (appFile.exists()) {
loadAppFile(appFile);
} else {
......@@ -344,6 +370,9 @@ public class OnosAppMojo extends AbstractMojo {
string.replaceAll("\\$\\{onos.app.name\\}", name)
.replaceAll("\\$\\{onos.app.origin\\}", origin)
.replaceAll("\\$\\{onos.app.requires\\}", requiredApps)
.replaceAll("\\$\\{onos.app.category\\}", category)
.replaceAll("\\$\\{onos.app.url\\}", url)
.replaceAll("\\$\\{onos.app.readme\\}", readme)
.replaceAll("\\$\\{project.groupId\\}", projectGroupId)
.replaceAll("\\$\\{project.artifactId\\}", projectArtifactId)
.replaceAll("\\$\\{project.version\\}", projectVersion)
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Open Networking Laboratory
~ Copyright 2015-2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
......@@ -15,8 +15,10 @@
~ limitations under the License.
-->
<app name="${onos.app.name}" origin="${onos.app.origin}" version="${project.version}"
category="${onos.app.category}" url="${onos.app.url}"
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}" apps="${onos.app.requires}">
<description>${project.description}</description>
<readme>${onos.app.readme}</readme>
<artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
</app>
......
......@@ -85,19 +85,27 @@ public class ApplicationsResourceTest extends ResourceTest {
private Application app1 =
new DefaultApplication(id1, VER,
"app1", "origin1", ApplicationRole.ADMIN, ImmutableSet.of(), Optional.of(FURL),
"app1", "origin1", "category1", "url1",
"readme1", new byte[0], ApplicationRole.ADMIN,
ImmutableSet.of(), Optional.of(FURL),
ImmutableList.of("My Feature"), ImmutableList.of());
private Application app2 =
new DefaultApplication(id2, VER,
"app2", "origin2", ApplicationRole.ADMIN, ImmutableSet.of(), Optional.of(FURL),
"app2", "origin2", "category2", "url2",
"readme2", new byte[0], ApplicationRole.ADMIN,
ImmutableSet.of(), Optional.of(FURL),
ImmutableList.of("My Feature"), ImmutableList.of());
private Application app3 =
new DefaultApplication(id3, VER,
"app3", "origin3", ApplicationRole.ADMIN, ImmutableSet.of(), Optional.of(FURL),
"app3", "origin3", "category3", "url3",
"readme3", new byte[0], ApplicationRole.ADMIN,
ImmutableSet.of(), Optional.of(FURL),
ImmutableList.of("My Feature"), ImmutableList.of());
private Application app4 =
new DefaultApplication(id4, VER,
"app4", "origin4", ApplicationRole.ADMIN, ImmutableSet.of(), Optional.of(FURL),
"app4", "origin4", "category4", "url4",
"readme4", new byte[0], ApplicationRole.ADMIN,
ImmutableSet.of(), Optional.of(FURL),
ImmutableList.of("My Feature"), ImmutableList.of());
/**
......