From afae2f71fc3901772853f4e4b55edf8b04fb3fce Mon Sep 17 00:00:00 2001 From: Simon Hunt Date: Fri, 4 Mar 2016 21:18:23 -0800 Subject: [PATCH] Apps-- added onos.app.title property to applications. Change-Id: Id845390ee0bee5b871c0ce9f47b2ce98fbcf26b9 --- apps/acl/pom.xml | 1 + apps/cip/pom.xml | 1 + apps/cordfabric/pom.xml | 1 + apps/cordvtn/pom.xml | 1 + apps/drivermatrix/pom.xml | 3 +- apps/events/pom.xml | 1 + apps/flowanalyzer/pom.xml | 1 + apps/fwd/pom.xml | 1 + apps/igmp/pom.xml | 1 + apps/iptopology-api/pom.xml | 1 + apps/metrics/pom.xml | 4 +- apps/mfwd/pom.xml | 4 +- apps/mlb/pom.xml | 1 + apps/mobility/pom.xml | 4 +- apps/openstackinterface/app/pom.xml | 1 + apps/openstacknetworking/app/pom.xml | 1 + apps/openstacknode/pom.xml | 1 + apps/optical/pom.xml | 1 + apps/pathpainter/pom.xml | 5 +- apps/pcep-api/pom.xml | 1 + apps/pim/pom.xml | 1 + apps/proxyarp/pom.xml | 1 + apps/reactive-routing/pom.xml | 1 + apps/routing-api/pom.xml | 1 + apps/routing/pom.xml | 3 +- apps/segmentrouting/pom.xml | 1 + apps/test/demo/pom.xml | 1 + apps/test/distributed-primitives/pom.xml | 1 + apps/test/election/pom.xml | 1 + apps/test/intent-perf/pom.xml | 1 + apps/test/loadtest/pom.xml | 1 + apps/test/messaging-perf/pom.xml | 1 + apps/virtualbng/pom.xml | 1 + apps/xos-integration/pom.xml | 1 + .../app/ApplicationDescription.java | 7 +++ .../app/DefaultApplicationDescription.java | 11 +++- .../org/onosproject/core/Application.java | 9 +++ .../onosproject/core/DefaultApplication.java | 17 +++++- .../onosproject/app/ApplicationEventTest.java | 2 +- .../DefaultApplicationDescriptionTest.java | 4 +- .../core/DefaultApplicationTest.java | 20 +++---- .../common/app/ApplicationArchive.java | 8 ++- .../common/app/ApplicationArchiveTest.java | 1 + .../store/trivial/SimpleApplicationStore.java | 53 ++++++++++++------ .../org/onosproject/common/app/app.xml | 6 +- .../org/onosproject/common/app/app.zip | Bin 1490 -> 776 bytes .../app/impl/ApplicationManagerTest.java | 2 +- .../store/app/GossipApplicationStore.java | 19 +++++-- providers/host/pom.xml | 1 + providers/lldp/pom.xml | 1 + providers/netcfghost/pom.xml | 1 + providers/netcfglinks/pom.xml | 1 + providers/null/pom.xml | 1 + providers/openflow/app/pom.xml | 1 + providers/ovsdb/app/pom.xml | 1 + .../resources/archetype-resources/pom.xml | 1 + .../resources/archetype-resources/pom.xml | 1 + .../resources/archetype-resources/pom.xml | 1 + .../resources/archetype-resources/pom.xml | 1 + .../org/onosproject/maven/OnosAppMojo.java | 7 +++ .../resources/org/onosproject/maven/app.xml | 2 +- .../rest/ApplicationsResourceTest.java | 16 +++--- .../impl/ApplicationViewMessageHandler.java | 5 +- 63 files changed, 194 insertions(+), 57 deletions(-) diff --git a/apps/acl/pom.xml b/apps/acl/pom.xml index d1f57f1e1a..b5af2a3b97 100644 --- a/apps/acl/pom.xml +++ b/apps/acl/pom.xml @@ -40,6 +40,7 @@ org.onosproject.acl DLUT + ONOS ACL App default http://onosproject.org ONOS ACL application. diff --git a/apps/cip/pom.xml b/apps/cip/pom.xml index 687de6001e..263b8c94de 100644 --- a/apps/cip/pom.xml +++ b/apps/cip/pom.xml @@ -34,6 +34,7 @@ org.onosproject.cip default + Cluster IP Alias App http://onosproject.org Cluster IP alias application. diff --git a/apps/cordfabric/pom.xml b/apps/cordfabric/pom.xml index 9015140ae8..7ad3259c24 100644 --- a/apps/cordfabric/pom.xml +++ b/apps/cordfabric/pom.xml @@ -32,6 +32,7 @@ org.onosproject.cordfabric + CORD Fabric App default http://onosproject.org Simple fabric application for CORD. diff --git a/apps/cordvtn/pom.xml b/apps/cordvtn/pom.xml index b5c572eebd..783e96c391 100644 --- a/apps/cordvtn/pom.xml +++ b/apps/cordvtn/pom.xml @@ -33,6 +33,7 @@ org.onosproject.cordvtn + CORD Virtual Tenant Network default http://onosproject.org Virtual tenant network service for CORD. diff --git a/apps/drivermatrix/pom.xml b/apps/drivermatrix/pom.xml index 3e5db9741a..9837cea20e 100644 --- a/apps/drivermatrix/pom.xml +++ b/apps/drivermatrix/pom.xml @@ -33,9 +33,10 @@ org.onosproject.drivermatrix + Driver Behaviour Support Matrix default http://onosproject.org - Driver behavior support matrix. + Driver behaviour support matrix. diff --git a/apps/events/pom.xml b/apps/events/pom.xml index 643ec0fd61..8d002859bb 100644 --- a/apps/events/pom.xml +++ b/apps/events/pom.xml @@ -32,6 +32,7 @@ org.onosproject.events + ONOS Event History App default http://onosproject.org ONOS event history display application. diff --git a/apps/flowanalyzer/pom.xml b/apps/flowanalyzer/pom.xml index 8369087835..686711f43a 100644 --- a/apps/flowanalyzer/pom.xml +++ b/apps/flowanalyzer/pom.xml @@ -33,6 +33,7 @@ org.onosproject.flowanalyzer + Flow Space Analyzer default http://onosproject.org Simple flow space analyzer. diff --git a/apps/fwd/pom.xml b/apps/fwd/pom.xml index d902ace53a..1b1c9be75e 100644 --- a/apps/fwd/pom.xml +++ b/apps/fwd/pom.xml @@ -33,6 +33,7 @@ org.onosproject.fwd + Reactive Forwarding App default http://onosproject.org Reactive forwarding application using flow subsystem. diff --git a/apps/igmp/pom.xml b/apps/igmp/pom.xml index c6d550d411..90759d8cb7 100644 --- a/apps/igmp/pom.xml +++ b/apps/igmp/pom.xml @@ -33,6 +33,7 @@ org.onosproject.igmp + IGMP App default http://onosproject.org IGMP implementation. diff --git a/apps/iptopology-api/pom.xml b/apps/iptopology-api/pom.xml index b8cf442439..d6bc64e079 100644 --- a/apps/iptopology-api/pom.xml +++ b/apps/iptopology-api/pom.xml @@ -30,6 +30,7 @@ org.onosproject.iptopology-api + IP Layer Topology API default http://onosproject.org IP layer topology API. diff --git a/apps/metrics/pom.xml b/apps/metrics/pom.xml index f3cdd0d5e6..9c75b6e762 100644 --- a/apps/metrics/pom.xml +++ b/apps/metrics/pom.xml @@ -33,9 +33,11 @@ org.onosproject.metrics + Performance Metrics App default http://onosproject.org - Performance metrics collection application. + + Performance metrics collection application. diff --git a/apps/mfwd/pom.xml b/apps/mfwd/pom.xml index ec80266db8..24c763bf82 100644 --- a/apps/mfwd/pom.xml +++ b/apps/mfwd/pom.xml @@ -33,9 +33,11 @@ org.onosproject.mfwd + Multicast Forwarding App default http://onosproject.org - Multicast forwarding application. + + Multicast forwarding application. diff --git a/apps/mlb/pom.xml b/apps/mlb/pom.xml index a300b41800..cebf68d3fa 100644 --- a/apps/mlb/pom.xml +++ b/apps/mlb/pom.xml @@ -33,6 +33,7 @@ org.onosproject.mlb + Mastership Load Balancer App default http://onosproject.org Application that balances mastership among nodes. diff --git a/apps/mobility/pom.xml b/apps/mobility/pom.xml index 0f2b39e50b..f1b2587e49 100644 --- a/apps/mobility/pom.xml +++ b/apps/mobility/pom.xml @@ -33,9 +33,11 @@ org.onosproject.mobility + Host Mobility App default http://onosproject.org - Host mobility application. + + Host mobility application. diff --git a/apps/openstackinterface/app/pom.xml b/apps/openstackinterface/app/pom.xml index 77715be5e9..b3b620f18d 100644 --- a/apps/openstackinterface/app/pom.xml +++ b/apps/openstackinterface/app/pom.xml @@ -32,6 +32,7 @@ org.onosproject.openstackinterface + Openstack Interface App default http://onosproject.org Openstack Interface Application. diff --git a/apps/openstacknetworking/app/pom.xml b/apps/openstacknetworking/app/pom.xml index acf7e22bf2..9e1cdd6f98 100644 --- a/apps/openstacknetworking/app/pom.xml +++ b/apps/openstacknetworking/app/pom.xml @@ -31,6 +31,7 @@ org.onosproject.openstacknetworking + Openstack Networking App default http://onosproject.org Openstack Networking Application. diff --git a/apps/openstacknode/pom.xml b/apps/openstacknode/pom.xml index f97f890d09..884619b7cb 100644 --- a/apps/openstacknode/pom.xml +++ b/apps/openstacknode/pom.xml @@ -34,6 +34,7 @@ org.onosproject.openstacknode + SONA Openstack Node Bootstrap App default http://onosproject.org SONA Openstack Node Bootstrap Application diff --git a/apps/optical/pom.xml b/apps/optical/pom.xml index 7ca8c53ea7..57906aedcf 100644 --- a/apps/optical/pom.xml +++ b/apps/optical/pom.xml @@ -33,6 +33,7 @@ org.onosproject.optical + Packet/Optical Use-Case App default http://onosproject.org Packet/Optical use-case application. diff --git a/apps/pathpainter/pom.xml b/apps/pathpainter/pom.xml index ee43a504e8..155241530c 100644 --- a/apps/pathpainter/pom.xml +++ b/apps/pathpainter/pom.xml @@ -33,10 +33,13 @@ org.onosproject.pathpainter + Path Visualization App default https://wiki.onosproject.org/display/ONOS/Path+Painter+Application+GUI + + Path visualization application + - Path visualization application. Allows the user to visualize different types of paths between network entities such as switches and hosts. Selectable path types are shortest, disjoint and geographical. diff --git a/apps/pcep-api/pom.xml b/apps/pcep-api/pom.xml index 5d652cfc89..c9be8164ee 100644 --- a/apps/pcep-api/pom.xml +++ b/apps/pcep-api/pom.xml @@ -30,6 +30,7 @@ org.onosproject.pcep-api + PCEP Protocol API default http://onosproject.org PCEP protocol API. diff --git a/apps/pim/pom.xml b/apps/pim/pom.xml index 9685aee794..058be7dec2 100644 --- a/apps/pim/pom.xml +++ b/apps/pim/pom.xml @@ -33,6 +33,7 @@ org.onosproject.pim + Protocol Independent Multicast Emulation default http://onosproject.org Protocol independent multicast emulation. diff --git a/apps/proxyarp/pom.xml b/apps/proxyarp/pom.xml index 4dda8aa094..0bd4824392 100644 --- a/apps/proxyarp/pom.xml +++ b/apps/proxyarp/pom.xml @@ -33,6 +33,7 @@ org.onosproject.proxyarp + Proxy ARP/NDP App default http://onosproject.org Proxy ARP/NDP application. diff --git a/apps/reactive-routing/pom.xml b/apps/reactive-routing/pom.xml index ba43d94619..e85f3caddd 100644 --- a/apps/reactive-routing/pom.xml +++ b/apps/reactive-routing/pom.xml @@ -33,6 +33,7 @@ org.onosproject.reactive.routing + SDN-IP Reactive Routing App default http://onosproject.org SDN-IP reactive routing application. diff --git a/apps/routing-api/pom.xml b/apps/routing-api/pom.xml index d24580b567..d1c3e0c2dc 100644 --- a/apps/routing-api/pom.xml +++ b/apps/routing-api/pom.xml @@ -32,6 +32,7 @@ org.onosproject.routing-api + Routing API default http://onosproject.org API for routing applications. diff --git a/apps/routing/pom.xml b/apps/routing/pom.xml index b1de5f32a4..1fb132f3f1 100644 --- a/apps/routing/pom.xml +++ b/apps/routing/pom.xml @@ -32,9 +32,10 @@ org.onosproject.routing + SDN-IP Routing App default http://onosproject.org - SDN-IP reactive routing application. + SDN-IP routing application. diff --git a/apps/segmentrouting/pom.xml b/apps/segmentrouting/pom.xml index 68777eff73..c634de4a4a 100644 --- a/apps/segmentrouting/pom.xml +++ b/apps/segmentrouting/pom.xml @@ -32,6 +32,7 @@ org.onosproject.segmentrouting + Segment Routing App default http://onosproject.org Segment routing application. diff --git a/apps/test/demo/pom.xml b/apps/test/demo/pom.xml index a9ab0167b5..423d371240 100644 --- a/apps/test/demo/pom.xml +++ b/apps/test/demo/pom.xml @@ -33,6 +33,7 @@ org.onosproject.demo + Flow Throughput Demo test http://onosproject.org Flow throughput test application. diff --git a/apps/test/distributed-primitives/pom.xml b/apps/test/distributed-primitives/pom.xml index 5ccf5183d9..5915e9baa8 100644 --- a/apps/test/distributed-primitives/pom.xml +++ b/apps/test/distributed-primitives/pom.xml @@ -34,6 +34,7 @@ org.onosproject.distributedprimitives + Distributed Primitives Test App test http://onosproject.org ONOS app to test distributed primitives. diff --git a/apps/test/election/pom.xml b/apps/test/election/pom.xml index cca002574d..b18b6c5b03 100644 --- a/apps/test/election/pom.xml +++ b/apps/test/election/pom.xml @@ -34,6 +34,7 @@ org.onosproject.election + Master Election Test App test http://onosproject.org Master election test application. diff --git a/apps/test/intent-perf/pom.xml b/apps/test/intent-perf/pom.xml index 1f85c02a5a..07c81f1a87 100644 --- a/apps/test/intent-perf/pom.xml +++ b/apps/test/intent-perf/pom.xml @@ -33,6 +33,7 @@ org.onosproject.intentperf + Intent Performance Test App test http://onosproject.org intent performance test application. diff --git a/apps/test/loadtest/pom.xml b/apps/test/loadtest/pom.xml index e0a85a6c9d..144f67265f 100644 --- a/apps/test/loadtest/pom.xml +++ b/apps/test/loadtest/pom.xml @@ -34,6 +34,7 @@ org.onosproject.loadtest + Distributed Load Test App test http://onosproject.org Distributed consensus load test application. diff --git a/apps/test/messaging-perf/pom.xml b/apps/test/messaging-perf/pom.xml index b8f3f080ff..2c0869a4a3 100644 --- a/apps/test/messaging-perf/pom.xml +++ b/apps/test/messaging-perf/pom.xml @@ -33,6 +33,7 @@ org.onosproject.messagingperf + Messaging Performance Test App test http://onosproject.org Messaging performance test application. diff --git a/apps/virtualbng/pom.xml b/apps/virtualbng/pom.xml index c078823a17..ca169420fa 100644 --- a/apps/virtualbng/pom.xml +++ b/apps/virtualbng/pom.xml @@ -33,6 +33,7 @@ org.onosproject.virtualbng + Virtual Broadband Gateway App default http://onosproject.org Virtual broadband gateway application. diff --git a/apps/xos-integration/pom.xml b/apps/xos-integration/pom.xml index e9994c79c8..ee33f6e5c3 100644 --- a/apps/xos-integration/pom.xml +++ b/apps/xos-integration/pom.xml @@ -33,6 +33,7 @@ org.onosproject.xosintegration + ONOS XOS Integration App default http://onosproject.org ONOS XOS integration application. diff --git a/core/api/src/main/java/org/onosproject/app/ApplicationDescription.java b/core/api/src/main/java/org/onosproject/app/ApplicationDescription.java index 1528f351ed..87327321ba 100644 --- a/core/api/src/main/java/org/onosproject/app/ApplicationDescription.java +++ b/core/api/src/main/java/org/onosproject/app/ApplicationDescription.java @@ -50,6 +50,13 @@ public interface ApplicationDescription { */ String origin(); + /** + * Returns title of the application. + * + * @return application title text + */ + String title(); + /** * Returns description of the application. * diff --git a/core/api/src/main/java/org/onosproject/app/DefaultApplicationDescription.java b/core/api/src/main/java/org/onosproject/app/DefaultApplicationDescription.java index 3aaca4c5ff..1d371c4582 100644 --- a/core/api/src/main/java/org/onosproject/app/DefaultApplicationDescription.java +++ b/core/api/src/main/java/org/onosproject/app/DefaultApplicationDescription.java @@ -35,6 +35,7 @@ public class DefaultApplicationDescription implements ApplicationDescription { private final String name; private final Version version; + private final String title; private final String description; private final String origin; private final String category; @@ -52,6 +53,7 @@ public class DefaultApplicationDescription implements ApplicationDescription { * * @param name application name * @param version application version + * @param title application title * @param description application description * @param origin origin company * @param category application category @@ -64,7 +66,7 @@ public class DefaultApplicationDescription implements ApplicationDescription { * @param features application features * @param requiredApps list of required application names */ - public DefaultApplicationDescription(String name, Version version, + public DefaultApplicationDescription(String name, Version version, String title, String description, String origin, String category, String url, String readme, byte[] icon, ApplicationRole role, Set permissions, @@ -72,6 +74,7 @@ public class DefaultApplicationDescription implements ApplicationDescription { List requiredApps) { this.name = checkNotNull(name, "Name cannot be null"); this.version = checkNotNull(version, "Version cannot be null"); + this.title = checkNotNull(title, "Title 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"); @@ -96,6 +99,11 @@ public class DefaultApplicationDescription implements ApplicationDescription { return version; } + @Override + public String title() { + return title; + } + @Override public String description() { return description; @@ -157,6 +165,7 @@ public class DefaultApplicationDescription implements ApplicationDescription { .add("name", name) .add("version", version) .add("description", description) + .add("title", title) .add("origin", origin) .add("category", category) .add("url", url) diff --git a/core/api/src/main/java/org/onosproject/core/Application.java b/core/api/src/main/java/org/onosproject/core/Application.java index 8700cadde8..04a1e09ad8 100644 --- a/core/api/src/main/java/org/onosproject/core/Application.java +++ b/core/api/src/main/java/org/onosproject/core/Application.java @@ -41,6 +41,15 @@ public interface Application { */ Version version(); + /** + * Returns the title of the application. + * This should be a short, human-readable string, as opposed + * to the unique identifier returned by {@link #id()}. + * + * @return application title text + */ + String title(); + /** * Returns description of the application. * diff --git a/core/api/src/main/java/org/onosproject/core/DefaultApplication.java b/core/api/src/main/java/org/onosproject/core/DefaultApplication.java index 7737ef84e7..487e709f3f 100644 --- a/core/api/src/main/java/org/onosproject/core/DefaultApplication.java +++ b/core/api/src/main/java/org/onosproject/core/DefaultApplication.java @@ -36,6 +36,7 @@ public class DefaultApplication implements Application { private final ApplicationId appId; private final Version version; + private final String title; private final String description; private final String category; private final String url; @@ -53,6 +54,7 @@ public class DefaultApplication implements Application { * * @param appId application identifier * @param version application version + * @param title application title * @param description application description * @param origin origin company * @param category application category @@ -65,7 +67,7 @@ public class DefaultApplication implements Application { * @param features application features * @param requiredApps list of required application names */ - public DefaultApplication(ApplicationId appId, Version version, + public DefaultApplication(ApplicationId appId, Version version, String title, String description, String origin, String category, String url, String readme, byte[] icon, ApplicationRole role, Set permissions, @@ -73,6 +75,7 @@ public class DefaultApplication implements Application { List requiredApps) { this.appId = checkNotNull(appId, "ID cannot be null"); this.version = checkNotNull(version, "Version cannot be null"); + this.title = checkNotNull(title, "Title 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"); @@ -103,6 +106,11 @@ public class DefaultApplication implements Application { return version; } + @Override + public String title() { + return title; + } + @Override public String description() { return description; @@ -160,7 +168,7 @@ public class DefaultApplication implements Application { @Override public int hashCode() { - return Objects.hash(appId, version, description, origin, category, url, + return Objects.hash(appId, version, title, description, origin, category, url, readme, role, permissions, featuresRepo, features, requiredApps); } @@ -173,8 +181,12 @@ public class DefaultApplication implements Application { return false; } final DefaultApplication other = (DefaultApplication) obj; + // TODO: review -- do ALL the fields need to be included? + // It is debatable whether fields like description, url, and readme, + // need to be included in the notion of equivalence. return Objects.equals(this.appId, other.appId) && Objects.equals(this.version, other.version) && + Objects.equals(this.title, other.title) && Objects.equals(this.description, other.description) && Objects.equals(this.origin, other.origin) && Objects.equals(this.category, other.category) && @@ -192,6 +204,7 @@ public class DefaultApplication implements Application { return toStringHelper(this) .add("appId", appId) .add("version", version) + .add("title", title) .add("description", description) .add("origin", origin) .add("category", category) diff --git a/core/api/src/test/java/org/onosproject/app/ApplicationEventTest.java b/core/api/src/test/java/org/onosproject/app/ApplicationEventTest.java index 0d4ae4c78e..2edd1f007b 100644 --- a/core/api/src/test/java/org/onosproject/app/ApplicationEventTest.java +++ b/core/api/src/test/java/org/onosproject/app/ApplicationEventTest.java @@ -32,7 +32,7 @@ import static org.onosproject.core.DefaultApplicationTest.APP_ID; public class ApplicationEventTest extends AbstractEventTest { private Application createApp() { - return new DefaultApplication(APP_ID, VER, DESC, ORIGIN, CATEGORY, + return new DefaultApplication(APP_ID, VER, TITLE, DESC, ORIGIN, CATEGORY, URL, README, ICON, ROLE, PERMS, Optional.of(FURL), FEATURES, APPS); } diff --git a/core/api/src/test/java/org/onosproject/app/DefaultApplicationDescriptionTest.java b/core/api/src/test/java/org/onosproject/app/DefaultApplicationDescriptionTest.java index e01d4d8354..7e8b6eabf2 100644 --- a/core/api/src/test/java/org/onosproject/app/DefaultApplicationDescriptionTest.java +++ b/core/api/src/test/java/org/onosproject/app/DefaultApplicationDescriptionTest.java @@ -38,6 +38,7 @@ public class DefaultApplicationDescriptionTest { public static final String APP_NAME = "org.foo.app"; public static final Version VER = Version.version(1, 2, "a", null); + public static final String TITLE = "Awesome App"; public static final String DESC = "Awesome application from Circus, Inc."; public static final String ORIGIN = "Circus"; public static final String CATEGORY = "other"; @@ -55,11 +56,12 @@ public class DefaultApplicationDescriptionTest { @Test public void basics() { ApplicationDescription app = - new DefaultApplicationDescription(APP_NAME, VER, DESC, ORIGIN, + new DefaultApplicationDescription(APP_NAME, VER, TITLE, 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 title", TITLE, app.title()); assertEquals("incorrect description", DESC, app.description()); assertEquals("incorrect origin", ORIGIN, app.origin()); assertEquals("incorrect category", CATEGORY, app.category()); diff --git a/core/api/src/test/java/org/onosproject/core/DefaultApplicationTest.java b/core/api/src/test/java/org/onosproject/core/DefaultApplicationTest.java index c0fbf9cc90..8e141ce134 100644 --- a/core/api/src/test/java/org/onosproject/core/DefaultApplicationTest.java +++ b/core/api/src/test/java/org/onosproject/core/DefaultApplicationTest.java @@ -43,7 +43,7 @@ public class DefaultApplicationTest { @Test public void basics() { - Application app = new DefaultApplication(APP_ID, VER, DESC, ORIGIN, + Application app = new DefaultApplication(APP_ID, VER, TITLE, DESC, ORIGIN, CATEGORY, URL, README, ICON, ROLE, PERMS, Optional.of(FURL), FEATURES, APPS); assertEquals("incorrect id", APP_ID, app.id()); @@ -64,16 +64,16 @@ public class DefaultApplicationTest { @Test public void testEquality() { - Application a1 = new DefaultApplication(APP_ID, VER, DESC, ORIGIN, + Application a1 = new DefaultApplication(APP_ID, VER, TITLE, DESC, ORIGIN, CATEGORY, URL, README, ICON, ROLE, PERMS, Optional.of(FURL), FEATURES, APPS); - Application a2 = new DefaultApplication(APP_ID, VER, DESC, ORIGIN, + Application a2 = new DefaultApplication(APP_ID, VER, TITLE, DESC, ORIGIN, CATEGORY, URL, README, ICON, ROLE, PERMS, Optional.of(FURL), FEATURES, APPS); - Application a3 = new DefaultApplication(APP_ID, VER, DESC, ORIGIN, + Application a3 = new DefaultApplication(APP_ID, VER, TITLE, DESC, ORIGIN, CATEGORY, URL, README, ICON, ROLE, PERMS, Optional.empty(), FEATURES, APPS); - Application a4 = new DefaultApplication(APP_ID, VER, DESC, ORIGIN + "asd", + Application a4 = new DefaultApplication(APP_ID, VER, TITLE, DESC, ORIGIN + "asd", CATEGORY, URL, README, ICON, ROLE, PERMS, Optional.of(FURL), FEATURES, APPS); new EqualsTester().addEqualityGroup(a1, a2) @@ -87,7 +87,7 @@ public class DefaultApplicationTest { public void immutableIcon() { byte[] iconSourceData = ICON_ORIG.clone(); - Application app = new DefaultApplication(APP_ID, VER, DESC, ORIGIN, + Application app = new DefaultApplication(APP_ID, VER, TITLE, DESC, ORIGIN, CATEGORY, URL, README, iconSourceData, ROLE, PERMS, Optional.of(FURL), FEATURES, APPS); @@ -128,7 +128,7 @@ public class DefaultApplicationTest { // Set p = PERMS_ORIG; Set p = PERMS_UNSAFE; - Application app = new DefaultApplication(APP_ID, VER, DESC, ORIGIN, + Application app = new DefaultApplication(APP_ID, VER, TITLE, DESC, ORIGIN, CATEGORY, URL, README, ICON, ROLE, p, Optional.of(FURL), FEATURES, APPS); @@ -170,7 +170,7 @@ public class DefaultApplicationTest { // List f = FEATURES_ORIG; List f = FEATURES_UNSAFE; - Application app = new DefaultApplication(APP_ID, VER, DESC, ORIGIN, + Application app = new DefaultApplication(APP_ID, VER, TITLE, DESC, ORIGIN, CATEGORY, URL, README, ICON, ROLE, PERMS, Optional.of(FURL), f, APPS); @@ -190,7 +190,7 @@ public class DefaultApplicationTest { // List ra = REQ_APPS_ORIG; List ra = REQ_APPS_UNSAFE; - Application app = new DefaultApplication(APP_ID, VER, DESC, ORIGIN, + Application app = new DefaultApplication(APP_ID, VER, TITLE, DESC, ORIGIN, CATEGORY, URL, README, ICON, ROLE, PERMS, Optional.of(FURL), FEATURES, ra); @@ -206,7 +206,7 @@ public class DefaultApplicationTest { @Test public void nullIcon() { - Application app = new DefaultApplication(APP_ID, VER, DESC, ORIGIN, + Application app = new DefaultApplication(APP_ID, VER, TITLE, DESC, ORIGIN, CATEGORY, URL, README, null, ROLE, PERMS, Optional.of(FURL), FEATURES, APPS); byte[] icon = app.icon(); diff --git a/core/common/src/main/java/org/onosproject/common/app/ApplicationArchive.java b/core/common/src/main/java/org/onosproject/common/app/ApplicationArchive.java index 1e3f49ce36..3699b5d054 100644 --- a/core/common/src/main/java/org/onosproject/common/app/ApplicationArchive.java +++ b/core/common/src/main/java/org/onosproject/common/app/ApplicationArchive.java @@ -88,6 +88,7 @@ public class ApplicationArchive private static final String CATEGORY = "[@category]"; private static final String URL = "[@url]"; + private static final String TITLE = "[@title]"; private static final String ROLE = "security.role"; private static final String APP_PERMISSIONS = "security.permissions.app-perm"; @@ -294,6 +295,11 @@ public class ApplicationArchive String name = cfg.getString(NAME); Version version = Version.version(cfg.getString(VERSION)); String origin = cfg.getString(ORIGIN); + + String title = cfg.getString(TITLE); + // FIXME: title should be set as attribute to APP, but fallback for now... + title = title == null ? name : title; + String category = cfg.getString(CATEGORY, UTILITY); String url = cfg.getString(URL); byte[] icon = getApplicationIcon(name); @@ -313,7 +319,7 @@ public class ApplicationArchive // put short description to description field String desc = compactDescription(readme); - return new DefaultApplicationDescription(name, version, desc, origin, + return new DefaultApplicationDescription(name, version, title, desc, origin, category, url, readme, icon, role, perms, featuresRepo, features, requiredApps); diff --git a/core/common/src/test/java/org/onosproject/common/app/ApplicationArchiveTest.java b/core/common/src/test/java/org/onosproject/common/app/ApplicationArchiveTest.java index 87c6363874..f7258c343b 100644 --- a/core/common/src/test/java/org/onosproject/common/app/ApplicationArchiveTest.java +++ b/core/common/src/test/java/org/onosproject/common/app/ApplicationArchiveTest.java @@ -65,6 +65,7 @@ public class ApplicationArchiveTest { assertEquals("incorrect url", URL, app.url()); assertEquals("incorrect readme", README, app.readme()); + assertEquals("incorrect title", TITLE, app.title()); assertEquals("incorrect description", DESC, app.description()); assertEquals("incorrect features URI", FURL, app.featuresRepo().get()); assertEquals("incorrect permissions", PERMS, app.permissions()); diff --git a/core/common/src/test/java/org/onosproject/store/trivial/SimpleApplicationStore.java b/core/common/src/test/java/org/onosproject/store/trivial/SimpleApplicationStore.java index 98c18b40eb..5047987a8c 100644 --- a/core/common/src/test/java/org/onosproject/store/trivial/SimpleApplicationStore.java +++ b/core/common/src/test/java/org/onosproject/store/trivial/SimpleApplicationStore.java @@ -49,14 +49,18 @@ import static org.slf4j.LoggerFactory.getLogger; */ @Component(immediate = true) @Service -public class SimpleApplicationStore extends ApplicationArchive implements ApplicationStore { +public class SimpleApplicationStore extends ApplicationArchive + implements ApplicationStore { private final Logger log = getLogger(getClass()); // App inventory & states - private final ConcurrentMap apps = new ConcurrentHashMap<>(); - private final ConcurrentMap states = new ConcurrentHashMap<>(); - private final ConcurrentMap> permissions = new ConcurrentHashMap<>(); + private final ConcurrentMap apps = + new ConcurrentHashMap<>(); + private final ConcurrentMap states = + new ConcurrentHashMap<>(); + private final ConcurrentMap> permissions = + new ConcurrentHashMap<>(); @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) protected ApplicationIdStore idStore; @@ -72,13 +76,20 @@ public class SimpleApplicationStore extends ApplicationArchive implements Applic ApplicationId appId = idStore.registerApplication(name); ApplicationDescription appDesc = getApplicationDescription(name); 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()); + new DefaultApplication(appId, + appDesc.version(), + appDesc.title(), + appDesc.description(), + appDesc.origin(), + appDesc.category(), + appDesc.url(), + appDesc.readme(), + appDesc.icon(), + appDesc.role(), + appDesc.permissions(), + appDesc.featuresRepo(), + appDesc.features(), + appDesc.requiredApps()); apps.put(appId, app); states.put(appId, isActive(name) ? INSTALLED : ACTIVE); // load app permissions @@ -118,12 +129,20 @@ public class SimpleApplicationStore extends ApplicationArchive implements Applic ApplicationDescription appDesc = saveApplication(appDescStream); ApplicationId appId = idStore.registerApplication(appDesc.name()); 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()); + new DefaultApplication(appId, + appDesc.version(), + appDesc.title(), + appDesc.description(), + appDesc.origin(), + appDesc.category(), + appDesc.url(), + appDesc.readme(), + appDesc.icon(), + appDesc.role(), + appDesc.permissions(), + appDesc.featuresRepo(), + appDesc.features(), + appDesc.requiredApps()); apps.put(appId, app); states.put(appId, INSTALLED); delegate.notify(new ApplicationEvent(APP_INSTALLED, app)); diff --git a/core/common/src/test/resources/org/onosproject/common/app/app.xml b/core/common/src/test/resources/org/onosproject/common/app/app.xml index f62372287e..0f84e6178d 100644 --- a/core/common/src/test/resources/org/onosproject/common/app/app.xml +++ b/core/common/src/test/resources/org/onosproject/common/app/app.xml @@ -13,8 +13,10 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - Awesome application from Circus, Inc. diff --git a/core/common/src/test/resources/org/onosproject/common/app/app.zip b/core/common/src/test/resources/org/onosproject/common/app/app.zip index 6ee64c01964e43685f4f76881baccc53c63bd196..137f9dff3047a123e7ebcc4ecc6979b668e59cfe 100644 GIT binary patch literal 776 zcmWIWW@Zs#U|`^2;9i>I!Cw5@JB5jXA&rHBft^8yA+ex9uOc@mG=!6Z*);i9ST+!s zR&X;gvV3J^U;t}u4LX>2%Ryl8XVKvKQJl9umwcNbr6S&uHC2k!Bhc?^(y_GY>hj&Y z`yO7(fBz;)=u(IldqVoXJ(Zu+CYdK%F#O;ZUfDM*yqeoQ{Q7(6U%wc*TbYWs%)Mg2 zb49|rZ9&G`UoTGmvB^?DK;n+0cG-%9?*xO6a{YQ~?EItcR)OXNwOviy`2@bKd~nzO zeBl&blQ$erQ5n2KoaOS>tz=|zuB>IR(|yFL%TNn&H69o@XV0W zaaU80=z--WQ`ff5OP##dUjN<>)Wna{^~ z(ju#ced%2ul_}Q2h2=#Btv{SxH2oL#9BP`rXTeLCtDCqMPU>ILx|^eQ*TZ9LuTMBK z_xZ}o!@8U8zGazQ*Wx+e+!DilP)dgNNo9zar*;5i=Oa<^#R-Q>FV13+^FMCPwQlk3 z4p!#<=BIOgTQl3;%-%g%u^~ZBdza6n;^1#5!mclVkaRZ4WAT(*J1Nb&+|-hFjA=E?oJz_{sW9fes%YPJ5Z~M))M3@4}r$Wt{?WNTy@$P?A;6oFNsbv;GL--(Uj_zXdSqDA g2x7q#Eh{9^q9xb>Z&o&tGDaZu1=34_>79WA0PW;TRR910 literal 1490 zcmWIWW@Zs#-~hr-KNAlIB*4iaz>ru_pl7I8k((15!NU-8a(-A45PxM9VQ39Hn0MQN zXYX@ui@9bB8*el1F7ac~_cTnN$$aBw(>%7L3uSY+E%7Y68}se$;-^b|FEXA!Dk%T+ zhup~*cTZE z8Ycv-aJ$}gnrWf%y9d&9Gno886(|K-AJ?28+`25hawg{;TkiMu?9adCN|eQl7wB6B zEaQ5uc(ZMF%08dZPg`2-r{6s-wU)Jce{|xBZ|^u_CU0tb?~#AjI)JSrb%Me2s;6@W z``XOeR(oA9Y@U~{zs5M}`mXTB)~{9mPvcr-6|`?19LePc^k-HILZYBQAg2?efl zoN_gyBS_?lUzqNC0j;kcZr{WgUNkxM?e$ib!uOR~7dej4?cclc+V)vKX^T6Su}w0! zNHzJqAfzj7fn=x9)Cs|6;>$90n~y)NSoX$h2d71Ill7Vx3@g`|A9kyoxOV08H%YU- zv{v{2>TG=-erkcsyQreM3&Vo1*_^r^eEp;(=SoKY`LnES-2Lu6e?BGfSH*GO*_8^n z7VGw0*n2VZ&caaMdHD;nHAK_IZ`(8@5>Tjw&ne# org.onosproject.hostprovider + Host Location Provider ON.Lab default http://onosproject.org diff --git a/providers/lldp/pom.xml b/providers/lldp/pom.xml index 65afe07e98..f7e3f1dc39 100644 --- a/providers/lldp/pom.xml +++ b/providers/lldp/pom.xml @@ -32,6 +32,7 @@ org.onosproject.lldpprovider + LLDP Link Provider ON.Lab default http://onosproject.org diff --git a/providers/netcfghost/pom.xml b/providers/netcfghost/pom.xml index 4990541cd2..76bc50e0b3 100644 --- a/providers/netcfghost/pom.xml +++ b/providers/netcfghost/pom.xml @@ -34,6 +34,7 @@ org.onosproject.netcfghostprovider + Network Config host Provider ON.Lab default http://onosproject.org diff --git a/providers/netcfglinks/pom.xml b/providers/netcfglinks/pom.xml index 9eda8372d8..4ef71ec05f 100644 --- a/providers/netcfglinks/pom.xml +++ b/providers/netcfglinks/pom.xml @@ -34,6 +34,7 @@ org.onosproject.netcfglinksprovider + Network Config Link Provider ON.Lab diff --git a/providers/null/pom.xml b/providers/null/pom.xml index 241ce14e00..d498c7f599 100644 --- a/providers/null/pom.xml +++ b/providers/null/pom.xml @@ -33,6 +33,7 @@ org.onosproject.null + Null Southbound Provider ON.Lab default http://onosproject.org diff --git a/providers/openflow/app/pom.xml b/providers/openflow/app/pom.xml index 7eb5d10ba3..58650a08f5 100644 --- a/providers/openflow/app/pom.xml +++ b/providers/openflow/app/pom.xml @@ -31,6 +31,7 @@ org.onosproject.openflow + OpenFlow Southbound Meta App org.onosproject.openflow-base, org.onosproject.hostprovider, diff --git a/providers/ovsdb/app/pom.xml b/providers/ovsdb/app/pom.xml index 2f548e66db..fa69badcbc 100644 --- a/providers/ovsdb/app/pom.xml +++ b/providers/ovsdb/app/pom.xml @@ -31,6 +31,7 @@ org.onosproject.ovsdb + OVSDB Southbound Meta App org.onosproject.ovsdb-base, org.onosproject.ovsdbhostprovider diff --git a/tools/package/archetypes/bundle/src/main/resources/archetype-resources/pom.xml b/tools/package/archetypes/bundle/src/main/resources/archetype-resources/pom.xml index 308835300f..fe3d57d840 100644 --- a/tools/package/archetypes/bundle/src/main/resources/archetype-resources/pom.xml +++ b/tools/package/archetypes/bundle/src/main/resources/archetype-resources/pom.xml @@ -35,6 +35,7 @@ 1.5.0-SNAPSHOT ${project.description} diff --git a/web/api/src/test/java/org/onosproject/rest/ApplicationsResourceTest.java b/web/api/src/test/java/org/onosproject/rest/ApplicationsResourceTest.java index 3cb7c8d739..ca960a0b9d 100644 --- a/web/api/src/test/java/org/onosproject/rest/ApplicationsResourceTest.java +++ b/web/api/src/test/java/org/onosproject/rest/ApplicationsResourceTest.java @@ -84,26 +84,26 @@ public class ApplicationsResourceTest extends ResourceTest { private static final Version VER = Version.version(1, 2, "a", null); private Application app1 = - new DefaultApplication(id1, VER, - "app1", "origin1", "category1", "url1", + new DefaultApplication(id1, VER, "title1", + "desc1", "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", "category2", "url2", + new DefaultApplication(id2, VER, "title2", + "desc2", "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", "category3", "url3", + new DefaultApplication(id3, VER, "title3", + "desc3", "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", "category4", "url4", + new DefaultApplication(id4, VER, "title4", + "desc4", "origin4", "category4", "url4", "readme4", new byte[0], ApplicationRole.ADMIN, ImmutableSet.of(), Optional.of(FURL), ImmutableList.of("My Feature"), ImmutableList.of()); diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/ApplicationViewMessageHandler.java b/web/gui/src/main/java/org/onosproject/ui/impl/ApplicationViewMessageHandler.java index dca882eb05..51e538b612 100644 --- a/web/gui/src/main/java/org/onosproject/ui/impl/ApplicationViewMessageHandler.java +++ b/web/gui/src/main/java/org/onosproject/ui/impl/ApplicationViewMessageHandler.java @@ -54,6 +54,7 @@ public class ApplicationViewMessageHandler extends UiMessageHandler { private static final String VERSION = "version"; private static final String CATEGORY = "category"; private static final String ORIGIN = "origin"; + private static final String TITLE = "title"; private static final String DESC = "desc"; private static final String URL = "url"; private static final String README = "readme"; @@ -66,7 +67,7 @@ public class ApplicationViewMessageHandler extends UiMessageHandler { private static final String ICON_ID_INACTIVE = "appInactive"; private static final String[] COL_IDS = { - STATE, STATE_IID, ID, ICON, VERSION, CATEGORY, ORIGIN, DESC, + STATE, STATE_IID, ID, ICON, VERSION, CATEGORY, ORIGIN, TITLE, DESC, URL, README, ROLE, REQUIRED_APPS, FEATURES, PERMISSIONS }; @@ -118,6 +119,7 @@ public class ApplicationViewMessageHandler extends UiMessageHandler { .cell(VERSION, app.version()) .cell(CATEGORY, app.category()) .cell(ORIGIN, app.origin()) + .cell(TITLE, app.title()) .cell(DESC, app.description()) .cell(URL, app.url()); } @@ -168,6 +170,7 @@ public class ApplicationViewMessageHandler extends UiMessageHandler { data.put(VERSION, app.version().toString()); data.put(ROLE, app.role().toString()); data.put(CATEGORY, app.category()); + data.put(TITLE, app.title()); data.put(ORIGIN, app.origin()); data.put(README, app.readme()); data.put(DESC, app.description());