Srikanth Vavilapalli
Committed by Gerrit Code Review

CORD-60:Splitting OLT application bundle into api and app bundles so that other …

…applications can import the necessary packages from api bundle

Change-Id: Ib2bacc28e50f2b65dadd3dd20c642afccba88ac7
Showing 19 changed files with 302 additions and 118 deletions
1 +
2 +<?xml version="1.0" encoding="UTF-8"?>
3 +<!--
4 + ~ Copyright 2016 Open Networking Laboratory
5 + ~
6 + ~ Licensed under the Apache License, Version 2.0 (the "License");
7 + ~ you may not use this file except in compliance with the License.
8 + ~ You may obtain a copy of the License at
9 + ~
10 + ~ http://www.apache.org/licenses/LICENSE-2.0
11 + ~
12 + ~ Unless required by applicable law or agreed to in writing, software
13 + ~ distributed under the License is distributed on an "AS IS" BASIS,
14 + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 + ~ See the License for the specific language governing permissions and
16 + ~ limitations under the License.
17 + -->
18 +<project xmlns="http://maven.apache.org/POM/4.0.0"
19 + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
21 + <modelVersion>4.0.0</modelVersion>
22 +
23 + <parent>
24 + <artifactId>onos-olt</artifactId>
25 + <groupId>org.onosproject</groupId>
26 + <version>1.5.0-SNAPSHOT</version>
27 + <relativePath>../pom.xml</relativePath>
28 + </parent>
29 +
30 + <artifactId>onos-app-olt-api</artifactId>
31 + <packaging>bundle</packaging>
32 +
33 + <url>http://onosproject.org</url>
34 +
35 + <description>CORD OLT application API</description>
36 +
37 + <dependencies>
38 + <dependency>
39 + <groupId>org.onosproject</groupId>
40 + <artifactId>onlab-junit</artifactId>
41 + <scope>test</scope>
42 + </dependency>
43 + <dependency>
44 + <groupId>org.onosproject</groupId>
45 + <artifactId>onos-core-serializers</artifactId>
46 + <version>${project.version}</version>
47 + </dependency>
48 +
49 + <dependency>
50 + <groupId>org.onosproject</groupId>
51 + <artifactId>onos-api</artifactId>
52 + <version>${project.version}</version>
53 + <classifier>tests</classifier>
54 + <scope>test</scope>
55 + </dependency>
56 +
57 + </dependencies>
58 +
59 + <build>
60 + <plugins>
61 + <plugin>
62 + <groupId>org.apache.felix</groupId>
63 + <artifactId>maven-bundle-plugin</artifactId>
64 + <extensions>true</extensions>
65 + <configuration>
66 + <instructions>
67 + <Export-Package>org.onosproject.olt</Export-Package>
68 + </instructions>
69 + </configuration>
70 + </plugin>
71 + </plugins>
72 + </build>
73 +</project>
1 -package org.onosproject.olt.api; 1 +package org.onosproject.olt;
2 2
3 import org.onlab.packet.VlanId; 3 import org.onlab.packet.VlanId;
4 import org.onosproject.event.AbstractEvent; 4 import org.onosproject.event.AbstractEvent;
......
1 -package org.onosproject.olt.api; 1 +package org.onosproject.olt;
2 2
3 import org.onosproject.event.EventListener; 3 import org.onosproject.event.EventListener;
4 4
......
...@@ -19,8 +19,6 @@ package org.onosproject.olt; ...@@ -19,8 +19,6 @@ package org.onosproject.olt;
19 import org.onlab.packet.VlanId; 19 import org.onlab.packet.VlanId;
20 import org.onosproject.event.ListenerService; 20 import org.onosproject.event.ListenerService;
21 import org.onosproject.net.ConnectPoint; 21 import org.onosproject.net.ConnectPoint;
22 -import org.onosproject.olt.api.AccessDeviceEvent;
23 -import org.onosproject.olt.api.AccessDeviceListener;
24 22
25 /** 23 /**
26 * Service for interacting with an access device (OLT). 24 * Service for interacting with an access device (OLT).
......
...@@ -15,6 +15,6 @@ ...@@ -15,6 +15,6 @@
15 */ 15 */
16 16
17 /** 17 /**
18 - * OLT event api. 18 + * OLT application api.
19 */ 19 */
20 -package org.onosproject.olt.api; 20 +package org.onosproject.olt;
......
1 +<?xml version="1.0" encoding="UTF-8"?>
2 +<!--
3 + ~ Copyright 2016 Open Networking Laboratory
4 + ~
5 + ~ Licensed under the Apache License, Version 2.0 (the "License");
6 + ~ you may not use this file except in compliance with the License.
7 + ~ You may obtain a copy of the License at
8 + ~
9 + ~ http://www.apache.org/licenses/LICENSE-2.0
10 + ~
11 + ~ Unless required by applicable law or agreed to in writing, software
12 + ~ distributed under the License is distributed on an "AS IS" BASIS,
13 + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 + ~ See the License for the specific language governing permissions and
15 + ~ limitations under the License.
16 + -->
17 +<app name="org.onosproject.olt" origin="ON.Lab" version="${project.version}"
18 + featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
19 + features="${project.artifactId}">
20 + <description>${project.description}</description>
21 + <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
22 + <artifact>mvn:${project.groupId}/onos-app-olt-api/${project.version}</artifact>
23 +</app>
1 +<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2 +<!--
3 + ~ Copyright 2016 Open Networking Laboratory
4 + ~
5 + ~ Licensed under the Apache License, Version 2.0 (the "License");
6 + ~ you may not use this file except in compliance with the License.
7 + ~ You may obtain a copy of the License at
8 + ~
9 + ~ http://www.apache.org/licenses/LICENSE-2.0
10 + ~
11 + ~ Unless required by applicable law or agreed to in writing, software
12 + ~ distributed under the License is distributed on an "AS IS" BASIS,
13 + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 + ~ See the License for the specific language governing permissions and
15 + ~ limitations under the License.
16 + -->
17 +<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="${project.artifactId}-${project.version}">
18 + <feature name="${project.artifactId}" version="${project.version}"
19 + description="${project.description}">
20 + <feature>onos-api</feature>
21 + <bundle>mvn:${project.groupId}/onos-app-olt-api/${project.version}</bundle>
22 + <bundle>mvn:${project.groupId}/onos-app-olt/${project.version}</bundle>
23 + </feature>
24 +</features>
1 +<?xml version="1.0" encoding="UTF-8"?>
2 +<!--
3 + ~ Copyright 2015 Open Networking Laboratory
4 + ~
5 + ~ Licensed under the Apache License, Version 2.0 (the "License");
6 + ~ you may not use this file except in compliance with the License.
7 + ~ You may obtain a copy of the License at
8 + ~
9 + ~ http://www.apache.org/licenses/LICENSE-2.0
10 + ~
11 + ~ Unless required by applicable law or agreed to in writing, software
12 + ~ distributed under the License is distributed on an "AS IS" BASIS,
13 + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 + ~ See the License for the specific language governing permissions and
15 + ~ limitations under the License.
16 + -->
17 +<project xmlns="http://maven.apache.org/POM/4.0.0"
18 + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
20 + <parent>
21 + <groupId>org.onosproject</groupId>
22 + <artifactId>onos-olt</artifactId>
23 + <version>1.5.0-SNAPSHOT</version>
24 + <relativePath>../pom.xml</relativePath>
25 + </parent>
26 + <modelVersion>4.0.0</modelVersion>
27 +
28 + <artifactId>onos-app-olt</artifactId>
29 +
30 + <packaging>bundle</packaging>
31 + <description>OLT application for CORD</description>
32 +
33 + <properties>
34 + <onos.app.name>org.onosproject.olt</onos.app.name>
35 + <web.context>/onos/olt</web.context>
36 + <api.version>1.0.0</api.version>
37 + <api.title>ONOS OLT REST API</api.title>
38 + <api.description>
39 + APIs for interacting with the CORD OLT application.
40 + </api.description>
41 + <api.package>org.onosproject.olt.rest</api.package>
42 + </properties>
43 +
44 + <dependencies>
45 + <dependency>
46 + <groupId>org.onosproject</groupId>
47 + <artifactId>onos-app-olt-api</artifactId>
48 + <version>${project.version}</version>
49 + </dependency>
50 +
51 + <dependency>
52 + <groupId>org.onosproject</groupId>
53 + <artifactId>onos-cli</artifactId>
54 + <version>${project.version}</version>
55 + </dependency>
56 +
57 + <dependency>
58 + <groupId>org.apache.karaf.shell</groupId>
59 + <artifactId>org.apache.karaf.shell.console</artifactId>
60 + </dependency>
61 + <dependency>
62 + <groupId>org.onosproject</groupId>
63 + <artifactId>onos-rest</artifactId>
64 + <version>${project.version}</version>
65 + </dependency>
66 + <dependency>
67 + <groupId>org.onosproject</groupId>
68 + <artifactId>onlab-rest</artifactId>
69 + <version>${project.version}</version>
70 + </dependency>
71 + <dependency>
72 + <groupId>javax.ws.rs</groupId>
73 + <artifactId>jsr311-api</artifactId>
74 + <version>1.1.1</version>
75 + </dependency>
76 + <dependency>
77 + <groupId>com.sun.jersey</groupId>
78 + <artifactId>jersey-servlet</artifactId>
79 + </dependency>
80 + <dependency>
81 + <groupId>com.fasterxml.jackson.core</groupId>
82 + <artifactId>jackson-databind</artifactId>
83 + </dependency>
84 +
85 + <dependency>
86 + <groupId>com.fasterxml.jackson.core</groupId>
87 + <artifactId>jackson-annotations</artifactId>
88 + </dependency>
89 +
90 + <dependency>
91 + <groupId>org.osgi</groupId>
92 + <artifactId>org.osgi.compendium</artifactId>
93 + </dependency>
94 + <dependency>
95 + <groupId>org.osgi</groupId>
96 + <artifactId>org.osgi.core</artifactId>
97 + </dependency>
98 + </dependencies>
99 +
100 + <build>
101 + <plugins>
102 + <plugin>
103 + <groupId>org.apache.felix</groupId>
104 + <artifactId>maven-bundle-plugin</artifactId>
105 + <extensions>true</extensions>
106 + <configuration>
107 + <instructions>
108 + <_wab>src/main/webapp/</_wab>
109 + <Include-Resource>
110 + WEB-INF/classes/apidoc/swagger.json=target/swagger.json,
111 + {maven-resources}
112 + </Include-Resource>
113 + <Bundle-SymbolicName>
114 + ${project.groupId}.${project.artifactId}
115 + </Bundle-SymbolicName>
116 + <Import-Package>
117 + org.slf4j,
118 + org.osgi.framework,
119 + org.osgi.service.*,
120 + javax.ws.rs,
121 + javax.ws.rs.core,
122 + com.sun.jersey.api.core,
123 + com.sun.jersey.spi.container.servlet,
124 + com.sun.jersey.server.impl.container.servlet,
125 + com.fasterxml.jackson.databind,
126 + com.fasterxml.jackson.databind.node,
127 + org.apache.karaf.shell.commands,
128 + org.apache.commons.lang.math.*,
129 + com.google.common.*,
130 + org.onlab.packet.*,
131 + org.onlab.rest.*,
132 + org.onosproject.*,
133 + org.onlab.util.*,
134 + org.jboss.netty.util.*
135 + </Import-Package>
136 + <Web-ContextPath>${web.context}</Web-ContextPath>
137 + </instructions>
138 + </configuration>
139 + </plugin>
140 + </plugins>
141 + </build>
142 +</project>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17 -package org.onosproject.olt; 17 +package org.onosproject.olt.cli;
18 18
19 import org.apache.karaf.shell.commands.Argument; 19 import org.apache.karaf.shell.commands.Argument;
20 import org.apache.karaf.shell.commands.Command; 20 import org.apache.karaf.shell.commands.Command;
...@@ -23,6 +23,7 @@ import org.onosproject.cli.AbstractShellCommand; ...@@ -23,6 +23,7 @@ import org.onosproject.cli.AbstractShellCommand;
23 import org.onosproject.net.ConnectPoint; 23 import org.onosproject.net.ConnectPoint;
24 import org.onosproject.net.DeviceId; 24 import org.onosproject.net.DeviceId;
25 import org.onosproject.net.PortNumber; 25 import org.onosproject.net.PortNumber;
26 +import org.onosproject.olt.AccessDeviceService;
26 27
27 /** 28 /**
28 * Adds a subscriber to an access device. 29 * Adds a subscriber to an access device.
......
...@@ -17,4 +17,4 @@ ...@@ -17,4 +17,4 @@
17 /** 17 /**
18 * OLT application handling PMC OLT hardware. 18 * OLT application handling PMC OLT hardware.
19 */ 19 */
20 -package org.onosproject.olt; 20 +package org.onosproject.olt.cli;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17 -package org.onosproject.olt; 17 +package org.onosproject.olt.impl;
18 18
19 import com.fasterxml.jackson.databind.JsonNode; 19 import com.fasterxml.jackson.databind.JsonNode;
20 import org.onlab.packet.VlanId; 20 import org.onlab.packet.VlanId;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17 -package org.onosproject.olt; 17 +package org.onosproject.olt.impl;
18 18
19 import org.onlab.packet.VlanId; 19 import org.onlab.packet.VlanId;
20 import org.onosproject.net.DeviceId; 20 import org.onosproject.net.DeviceId;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
13 * See the License for the specific language governing permissions and 13 * See the License for the specific language governing permissions and
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 -package org.onosproject.olt; 16 +package org.onosproject.olt.impl;
17 17
18 import com.google.common.collect.Maps; 18 import com.google.common.collect.Maps;
19 import com.google.common.collect.Sets; 19 import com.google.common.collect.Sets;
...@@ -54,8 +54,9 @@ import org.onosproject.net.flowobjective.ForwardingObjective; ...@@ -54,8 +54,9 @@ import org.onosproject.net.flowobjective.ForwardingObjective;
54 import org.onosproject.net.flowobjective.Objective; 54 import org.onosproject.net.flowobjective.Objective;
55 import org.onosproject.net.flowobjective.ObjectiveContext; 55 import org.onosproject.net.flowobjective.ObjectiveContext;
56 import org.onosproject.net.flowobjective.ObjectiveError; 56 import org.onosproject.net.flowobjective.ObjectiveError;
57 -import org.onosproject.olt.api.AccessDeviceEvent; 57 +import org.onosproject.olt.AccessDeviceEvent;
58 -import org.onosproject.olt.api.AccessDeviceListener; 58 +import org.onosproject.olt.AccessDeviceListener;
59 +import org.onosproject.olt.AccessDeviceService;
59 import org.slf4j.Logger; 60 import org.slf4j.Logger;
60 61
61 import java.util.Map; 62 import java.util.Map;
......
1 +/*
2 + * Copyright 2014 Open Networking Laboratory
3 + *
4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 + * you may not use this file except in compliance with the License.
6 + * You may obtain a copy of the License at
7 + *
8 + * http://www.apache.org/licenses/LICENSE-2.0
9 + *
10 + * Unless required by applicable law or agreed to in writing, software
11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 + * See the License for the specific language governing permissions and
14 + * limitations under the License.
15 + */
16 +
17 +/**
18 + * OLT application handling PMC OLT hardware.
19 + */
20 +package org.onosproject.olt.impl;
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
17 17
18 <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0"> 18 <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
19 <command> 19 <command>
20 - <action class="org.onosproject.olt.SubscriberAddCommand"/> 20 + <action class="org.onosproject.olt.cli.SubscriberAddCommand"/>
21 <completers> 21 <completers>
22 <ref component-id="deviceIdCompleter"/> 22 <ref component-id="deviceIdCompleter"/>
23 <null/> 23 <null/>
......
...@@ -25,112 +25,14 @@ ...@@ -25,112 +25,14 @@
25 </parent> 25 </parent>
26 <modelVersion>4.0.0</modelVersion> 26 <modelVersion>4.0.0</modelVersion>
27 27
28 - <artifactId>onos-app-olt</artifactId> 28 + <artifactId>onos-olt</artifactId>
29 29
30 - <packaging>bundle</packaging> 30 + <packaging>pom</packaging>
31 <description>OLT application for CORD</description> 31 <description>OLT application for CORD</description>
32 32
33 - <properties> 33 + <modules>
34 - <onos.app.name>org.onosproject.olt</onos.app.name> 34 + <module>api</module>
35 - <web.context>/onos/olt</web.context> 35 + <module>app</module>
36 - <api.version>1.0.0</api.version> 36 + </modules>
37 - <api.title>ONOS OLT REST API</api.title>
38 - <api.description>
39 - APIs for interacting with the CORD OLT application.
40 - </api.description>
41 - <api.package>org.onosproject.olt</api.package>
42 - </properties>
43 37
44 - <dependencies>
45 - <dependency>
46 - <groupId>org.onosproject</groupId>
47 - <artifactId>onos-cli</artifactId>
48 - <version>${project.version}</version>
49 - </dependency>
50 -
51 - <dependency>
52 - <groupId>org.apache.karaf.shell</groupId>
53 - <artifactId>org.apache.karaf.shell.console</artifactId>
54 - </dependency>
55 - <dependency>
56 - <groupId>org.onosproject</groupId>
57 - <artifactId>onos-rest</artifactId>
58 - <version>${project.version}</version>
59 - </dependency>
60 - <dependency>
61 - <groupId>org.onosproject</groupId>
62 - <artifactId>onlab-rest</artifactId>
63 - <version>${project.version}</version>
64 - </dependency>
65 - <dependency>
66 - <groupId>javax.ws.rs</groupId>
67 - <artifactId>jsr311-api</artifactId>
68 - <version>1.1.1</version>
69 - </dependency>
70 - <dependency>
71 - <groupId>com.sun.jersey</groupId>
72 - <artifactId>jersey-servlet</artifactId>
73 - </dependency>
74 - <dependency>
75 - <groupId>com.fasterxml.jackson.core</groupId>
76 - <artifactId>jackson-databind</artifactId>
77 - </dependency>
78 -
79 - <dependency>
80 - <groupId>com.fasterxml.jackson.core</groupId>
81 - <artifactId>jackson-annotations</artifactId>
82 - </dependency>
83 -
84 - <dependency>
85 - <groupId>org.osgi</groupId>
86 - <artifactId>org.osgi.compendium</artifactId>
87 - </dependency>
88 - <dependency>
89 - <groupId>org.osgi</groupId>
90 - <artifactId>org.osgi.core</artifactId>
91 - </dependency>
92 - </dependencies>
93 -
94 - <build>
95 - <plugins>
96 - <plugin>
97 - <groupId>org.apache.felix</groupId>
98 - <artifactId>maven-bundle-plugin</artifactId>
99 - <extensions>true</extensions>
100 - <configuration>
101 - <instructions>
102 - <_wab>src/main/webapp/</_wab>
103 - <Include-Resource>
104 - WEB-INF/classes/apidoc/swagger.json=target/swagger.json,
105 - {maven-resources}
106 - </Include-Resource>
107 - <Bundle-SymbolicName>
108 - ${project.groupId}.${project.artifactId}
109 - </Bundle-SymbolicName>
110 - <Import-Package>
111 - org.slf4j,
112 - org.osgi.framework,
113 - org.osgi.service.*,
114 - javax.ws.rs,
115 - javax.ws.rs.core,
116 - com.sun.jersey.api.core,
117 - com.sun.jersey.spi.container.servlet,
118 - com.sun.jersey.server.impl.container.servlet,
119 - com.fasterxml.jackson.databind,
120 - com.fasterxml.jackson.databind.node,
121 - org.apache.karaf.shell.commands,
122 - org.apache.commons.lang.math.*,
123 - com.google.common.*,
124 - org.onlab.packet.*,
125 - org.onlab.rest.*,
126 - org.onosproject.*,
127 - org.onlab.util.*,
128 - org.jboss.netty.util.*
129 - </Import-Package>
130 - <Web-ContextPath>${web.context}</Web-ContextPath>
131 - </instructions>
132 - </configuration>
133 - </plugin>
134 - </plugins>
135 - </build>
136 </project> 38 </project>
......