Jian Li
Committed by Gerrit Code Review

Split CPMan into api and app submodules

Change-Id: Iacddea67ea0f7189ab918cf9e2a7a414100fc503
Showing 36 changed files with 375 additions and 190 deletions
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 +<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 + <modelVersion>4.0.0</modelVersion>
21 +
22 + <parent>
23 + <artifactId>onos-cpman</artifactId>
24 + <groupId>org.onosproject</groupId>
25 + <version>1.5.0-SNAPSHOT</version>
26 + <relativePath>../pom.xml</relativePath>
27 + </parent>
28 +
29 + <artifactId>onos-app-cpman-api</artifactId>
30 + <packaging>bundle</packaging>
31 +
32 + <url>http://onosproject.org</url>
33 +
34 + <description>Control Plane Management Application API</description>
35 +
36 + <dependencies>
37 + <dependency>
38 + <groupId>org.onosproject</groupId>
39 + <artifactId>onlab-junit</artifactId>
40 + <scope>test</scope>
41 + </dependency>
42 + <dependency>
43 + <groupId>org.onosproject</groupId>
44 + <artifactId>onos-core-serializers</artifactId>
45 + <version>${project.version}</version>
46 + </dependency>
47 +
48 + <dependency>
49 + <groupId>org.onosproject</groupId>
50 + <artifactId>onos-incubator-api</artifactId>
51 + <version>${project.version}</version>
52 + </dependency>
53 + <dependency>
54 + <groupId>org.onosproject</groupId>
55 + <artifactId>onos-api</artifactId>
56 + <version>${project.version}</version>
57 + <classifier>tests</classifier>
58 + <scope>test</scope>
59 + </dependency>
60 + </dependencies>
61 +</project>
1 +/*
2 + * Copyright 2016 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 +package org.onosproject.cpman;
17 +
18 +/**
19 + * Control Plane Service interface.
20 + */
21 +public interface ControlPlaneService {
22 +}
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
15 */ 15 */
16 package org.onosproject.cpman; 16 package org.onosproject.cpman;
17 17
18 -import static com.google.common.base.MoreObjects.toStringHelper; 18 +import com.google.common.base.MoreObjects;
19 19
20 /** 20 /**
21 * Primitive Metric Value. 21 * Primitive Metric Value.
...@@ -145,7 +145,7 @@ public final class MetricValue { ...@@ -145,7 +145,7 @@ public final class MetricValue {
145 145
146 @Override 146 @Override
147 public String toString() { 147 public String toString() {
148 - return toStringHelper(getClass()) 148 + return MoreObjects.toStringHelper(getClass())
149 .add("rate", Long.toHexString(rate)) 149 .add("rate", Long.toHexString(rate))
150 .add("load", Long.toHexString(load)) 150 .add("load", Long.toHexString(load))
151 .add("count", Long.toHexString(count)).toString(); 151 .add("count", Long.toHexString(count)).toString();
......
1 /* 1 /*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2016 Open Networking Laboratory
3 * 3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License. 5 * you may not use this file except in compliance with the License.
...@@ -15,6 +15,6 @@ ...@@ -15,6 +15,6 @@
15 */ 15 */
16 16
17 /** 17 /**
18 - * Application for control plane management. 18 + * An application that manages the control plane.
19 */ 19 */
20 package org.onosproject.cpman; 20 package org.onosproject.cpman;
...\ No newline at end of file ...\ No newline at end of file
......
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.cpman" origin="ON.Lab" version="${project.version}"
18 + category="default" url="http://onosproject.org"
19 + featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
20 + features="${project.artifactId}">
21 + <description>${project.description}</description>
22 + <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
23 + <artifact>mvn:${project.groupId}/onos-app-cpman-api/${project.version}</artifact>
24 +</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-cpman-api/${project.version}</bundle>
22 + <bundle>mvn:${project.groupId}/onos-app-cpman/${project.version}</bundle>
23 + </feature>
24 +</features>
1 +<?xml version="1.0" encoding="UTF-8"?>
2 +<!--
3 + ~ Copyright 2015-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 +<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 + <modelVersion>4.0.0</modelVersion>
21 + <parent>
22 + <groupId>org.onosproject</groupId>
23 + <artifactId>onos-cpman</artifactId>
24 + <version>1.5.0-SNAPSHOT</version>
25 + <relativePath>../pom.xml</relativePath>
26 + </parent>
27 +
28 + <artifactId>onos-app-cpman</artifactId>
29 + <packaging>bundle</packaging>
30 +
31 + <url>http://onosproject.org</url>
32 +
33 + <description>Control Plane Management Application</description>
34 +
35 + <properties>
36 + <web.context>/onos/cpman</web.context>
37 + <api.version>1.0.0</api.version>
38 + <api.title>Control Plane Manager REST API</api.title>
39 + <api.description>
40 + APIs for interacting with the Control Plane Management application.
41 + </api.description>
42 + <api.package>org.onosproject.cpman.rest</api.package>
43 + </properties>
44 +
45 + <dependencies>
46 + <dependency>
47 + <groupId>org.onosproject</groupId>
48 + <artifactId>onos-app-cpman-api</artifactId>
49 + <version>${project.version}</version>
50 + </dependency>
51 + <dependency>
52 + <groupId>org.osgi</groupId>
53 + <artifactId>org.osgi.compendium</artifactId>
54 + </dependency>
55 +
56 + <dependency>
57 + <groupId>org.onosproject</groupId>
58 + <artifactId>onos-cli</artifactId>
59 + <version>${project.version}</version>
60 + </dependency>
61 +
62 + <dependency>
63 + <groupId>org.apache.karaf.shell</groupId>
64 + <artifactId>org.apache.karaf.shell.console</artifactId>
65 + <scope>compile</scope>
66 + </dependency>
67 +
68 + <dependency>
69 + <groupId>org.onosproject</groupId>
70 + <artifactId>onlab-junit</artifactId>
71 + <scope>test</scope>
72 + </dependency>
73 + <dependency>
74 + <groupId>org.onosproject</groupId>
75 + <artifactId>onos-core-serializers</artifactId>
76 + <version>${project.version}</version>
77 + </dependency>
78 +
79 + <dependency>
80 + <groupId>org.onosproject</groupId>
81 + <artifactId>onos-incubator-api</artifactId>
82 + <version>${project.version}</version>
83 + </dependency>
84 + <dependency>
85 + <groupId>org.onosproject</groupId>
86 + <artifactId>onos-api</artifactId>
87 + <version>${project.version}</version>
88 + <classifier>tests</classifier>
89 + <scope>test</scope>
90 + </dependency>
91 +
92 + <dependency>
93 + <groupId>org.onosproject</groupId>
94 + <artifactId>onos-rest</artifactId>
95 + <version>${project.version}</version>
96 + </dependency>
97 + <dependency>
98 + <groupId>org.onosproject</groupId>
99 + <artifactId>onlab-rest</artifactId>
100 + <version>${project.version}</version>
101 + </dependency>
102 + <dependency>
103 + <groupId>javax.ws.rs</groupId>
104 + <artifactId>jsr311-api</artifactId>
105 + <version>1.1.1</version>
106 + </dependency>
107 + <dependency>
108 + <groupId>com.sun.jersey</groupId>
109 + <artifactId>jersey-servlet</artifactId>
110 + </dependency>
111 + <dependency>
112 + <groupId>com.fasterxml.jackson.core</groupId>
113 + <artifactId>jackson-databind</artifactId>
114 + </dependency>
115 + <dependency>
116 + <groupId>com.fasterxml.jackson.core</groupId>
117 + <artifactId>jackson-annotations</artifactId>
118 + </dependency>
119 + <dependency>
120 + <groupId>com.sun.jersey</groupId>
121 + <artifactId>jersey-client</artifactId>
122 + <scope>test</scope>
123 + </dependency>
124 + <dependency>
125 + <groupId>org.easymock</groupId>
126 + <artifactId>easymock</artifactId>
127 + <scope>test</scope>
128 + </dependency>
129 + <dependency>
130 + <groupId>com.sun.jersey.jersey-test-framework</groupId>
131 + <artifactId>jersey-test-framework-core</artifactId>
132 + <scope>test</scope>
133 + </dependency>
134 + <dependency>
135 + <groupId>com.sun.jersey.jersey-test-framework</groupId>
136 + <artifactId>jersey-test-framework-grizzly2</artifactId>
137 + <scope>test</scope>
138 + </dependency>
139 + <dependency>
140 + <groupId>org.onosproject</groupId>
141 + <artifactId>onlab-osgi</artifactId>
142 + <version>${project.version}</version>
143 + <classifier>tests</classifier>
144 + <scope>test</scope>
145 + </dependency>
146 + </dependencies>
147 +
148 + <build>
149 + <plugins>
150 + <plugin>
151 + <groupId>org.apache.felix</groupId>
152 + <artifactId>maven-bundle-plugin</artifactId>
153 + <extensions>true</extensions>
154 + <configuration>
155 + <instructions>
156 + <_wab>src/main/webapp/</_wab>
157 + <Include-Resource>
158 + WEB-INF/classes/apidoc/swagger.json=target/swagger.json,
159 + {maven-resources}
160 + </Include-Resource>
161 + <Bundle-SymbolicName>
162 + ${project.groupId}.${project.artifactId}
163 + </Bundle-SymbolicName>
164 + <Import-Package>
165 + org.slf4j,
166 + org.osgi.framework,
167 + javax.ws.rs,
168 + javax.ws.rs.core,
169 + com.sun.jersey.api.core,
170 + com.sun.jersey.spi.container.servlet,
171 + com.sun.jersey.server.impl.container.servlet,
172 + com.fasterxml.jackson.databind,
173 + com.fasterxml.jackson.databind.node,
174 + com.fasterxml.jackson.core,
175 + org.apache.karaf.shell.commands,
176 + org.apache.karaf.shell.console,
177 + com.google.common.*,
178 + org.onlab.packet.*,
179 + org.onlab.rest.*,
180 + org.onosproject.*,
181 + org.onlab.util.*,
182 + org.jboss.netty.util.*
183 + </Import-Package>
184 + <Web-ContextPath>${web.context}</Web-ContextPath>
185 + </instructions>
186 + </configuration>
187 + </plugin>
188 + </plugins>
189 + </build>
190 +</project>
...\ No newline at end of file ...\ No newline at end of file
...@@ -13,12 +13,13 @@ ...@@ -13,12 +13,13 @@
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.cpman; 16 +package org.onosproject.cpman.impl;
17 17
18 import com.google.common.collect.ImmutableMap; 18 import com.google.common.collect.ImmutableMap;
19 import com.google.common.collect.ImmutableSet; 19 import com.google.common.collect.ImmutableSet;
20 import com.google.common.collect.Sets; 20 import com.google.common.collect.Sets;
21 import org.onlab.metrics.MetricsService; 21 import org.onlab.metrics.MetricsService;
22 +import org.onosproject.cpman.ControlMetricType;
22 import org.onosproject.net.DeviceId; 23 import org.onosproject.net.DeviceId;
23 import org.onosproject.net.device.DeviceService; 24 import org.onosproject.net.device.DeviceService;
24 25
......
...@@ -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.cpman; 16 +package org.onosproject.cpman.impl;
17 17
18 import org.onosproject.net.DeviceId; 18 import org.onosproject.net.DeviceId;
19 19
......
...@@ -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.cpman; 16 +package org.onosproject.cpman.impl;
17 17
18 /** 18 /**
19 * Control metrics class for storing system specification. 19 * Control metrics class for storing system specification.
......
...@@ -13,12 +13,11 @@ ...@@ -13,12 +13,11 @@
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.cpman; 16 +package org.onosproject.cpman.impl;
17 17
18 import org.apache.felix.scr.annotations.Activate; 18 import org.apache.felix.scr.annotations.Activate;
19 import org.apache.felix.scr.annotations.Component; 19 import org.apache.felix.scr.annotations.Component;
20 import org.apache.felix.scr.annotations.Deactivate; 20 import org.apache.felix.scr.annotations.Deactivate;
21 -import org.apache.felix.scr.annotations.Modified;
22 import org.apache.felix.scr.annotations.Reference; 21 import org.apache.felix.scr.annotations.Reference;
23 import org.apache.felix.scr.annotations.ReferenceCardinality; 22 import org.apache.felix.scr.annotations.ReferenceCardinality;
24 import org.onosproject.core.ApplicationId; 23 import org.onosproject.core.ApplicationId;
...@@ -28,7 +27,7 @@ import org.slf4j.Logger; ...@@ -28,7 +27,7 @@ import org.slf4j.Logger;
28 import org.slf4j.LoggerFactory; 27 import org.slf4j.LoggerFactory;
29 28
30 /** 29 /**
31 - * Skeletal ONOS application component. 30 + * Skeletal control plane management component.
32 */ 31 */
33 @Component(immediate = true) 32 @Component(immediate = true)
34 public class ControlPlaneManager { 33 public class ControlPlaneManager {
...@@ -55,8 +54,4 @@ public class ControlPlaneManager { ...@@ -55,8 +54,4 @@ public class ControlPlaneManager {
55 log.info("Stopped"); 54 log.info("Stopped");
56 } 55 }
57 56
58 - @Modified
59 - protected void modified() {
60 - }
61 -
62 } 57 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -13,16 +13,18 @@ ...@@ -13,16 +13,18 @@
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.cpman; 16 +package org.onosproject.cpman.impl;
17 17
18 import org.apache.felix.scr.annotations.Activate; 18 import org.apache.felix.scr.annotations.Activate;
19 import org.apache.felix.scr.annotations.Component; 19 import org.apache.felix.scr.annotations.Component;
20 import org.apache.felix.scr.annotations.Deactivate; 20 import org.apache.felix.scr.annotations.Deactivate;
21 -import org.apache.felix.scr.annotations.Modified;
22 import org.apache.felix.scr.annotations.Service; 21 import org.apache.felix.scr.annotations.Service;
23 import org.onosproject.cluster.NodeId; 22 import org.onosproject.cluster.NodeId;
23 +import org.onosproject.cpman.ControlLoad;
24 +import org.onosproject.cpman.ControlMetric;
25 +import org.onosproject.cpman.ControlMetricType;
26 +import org.onosproject.cpman.ControlPlaneMonitorService;
24 import org.onosproject.net.DeviceId; 27 import org.onosproject.net.DeviceId;
25 -import org.osgi.service.component.ComponentContext;
26 import org.slf4j.Logger; 28 import org.slf4j.Logger;
27 29
28 import java.util.Optional; 30 import java.util.Optional;
...@@ -48,10 +50,6 @@ public class ControlPlaneMonitor implements ControlPlaneMonitorService { ...@@ -48,10 +50,6 @@ public class ControlPlaneMonitor implements ControlPlaneMonitorService {
48 public void deactivate() { 50 public void deactivate() {
49 } 51 }
50 52
51 - @Modified
52 - public void modified(ComponentContext context) {
53 - }
54 -
55 @Override 53 @Override
56 public void updateMetric(ControlMetric cpm, Integer updateInterval, 54 public void updateMetric(ControlMetric cpm, Integer updateInterval,
57 Optional<DeviceId> deviceId) { 55 Optional<DeviceId> deviceId) {
......
...@@ -13,10 +13,13 @@ ...@@ -13,10 +13,13 @@
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.cpman; 16 +package org.onosproject.cpman.impl;
17 17
18 import org.apache.felix.scr.annotations.Reference; 18 import org.apache.felix.scr.annotations.Reference;
19 import org.apache.felix.scr.annotations.ReferenceCardinality; 19 import org.apache.felix.scr.annotations.ReferenceCardinality;
20 +import org.onosproject.cpman.ControlMetric;
21 +import org.onosproject.cpman.ControlPlaneMonitorService;
22 +import org.onosproject.cpman.MetricValue;
20 import org.onosproject.net.DeviceId; 23 import org.onosproject.net.DeviceId;
21 24
22 import java.util.Optional; 25 import java.util.Optional;
......
...@@ -13,13 +13,14 @@ ...@@ -13,13 +13,14 @@
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.cpman; 16 +package org.onosproject.cpman.impl;
17 17
18 import com.codahale.metrics.Meter; 18 import com.codahale.metrics.Meter;
19 import org.apache.commons.lang3.StringUtils; 19 import org.apache.commons.lang3.StringUtils;
20 import org.onlab.metrics.MetricsComponent; 20 import org.onlab.metrics.MetricsComponent;
21 import org.onlab.metrics.MetricsFeature; 21 import org.onlab.metrics.MetricsFeature;
22 import org.onlab.metrics.MetricsService; 22 import org.onlab.metrics.MetricsService;
23 +import org.onosproject.cpman.ControlMetricType;
23 import org.onosproject.net.DeviceId; 24 import org.onosproject.net.DeviceId;
24 25
25 import java.util.Optional; 26 import java.util.Optional;
......
1 +/*
2 + * Copyright 2015 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 + * Implementation for control plane management.
19 + */
20 +package org.onosproject.cpman.impl;
...\ No newline at end of file ...\ No newline at end of file
...@@ -19,7 +19,7 @@ import com.fasterxml.jackson.databind.JsonNode; ...@@ -19,7 +19,7 @@ import com.fasterxml.jackson.databind.JsonNode;
19 import com.fasterxml.jackson.databind.node.ObjectNode; 19 import com.fasterxml.jackson.databind.node.ObjectNode;
20 import org.onosproject.cpman.ControlMetric; 20 import org.onosproject.cpman.ControlMetric;
21 import org.onosproject.cpman.ControlMetricType; 21 import org.onosproject.cpman.ControlMetricType;
22 -import org.onosproject.cpman.ControlMetricsSystemSpec; 22 +import org.onosproject.cpman.impl.ControlMetricsSystemSpec;
23 import org.onosproject.cpman.ControlPlaneMonitorService; 23 import org.onosproject.cpman.ControlPlaneMonitorService;
24 import org.onosproject.cpman.MetricValue; 24 import org.onosproject.cpman.MetricValue;
25 import org.onosproject.rest.AbstractWebResource; 25 import org.onosproject.rest.AbstractWebResource;
......
1 /* 1 /*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2016 Open Networking Laboratory
3 * 3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License. 5 * you may not use this file except in compliance with the License.
...@@ -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.cpman; 16 +package org.onosproject.cpman.impl;
17 17
18 import org.junit.After; 18 import org.junit.After;
19 import org.junit.Before; 19 import org.junit.Before;
......
1 <?xml version="1.0" encoding="UTF-8"?> 1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- 2 <!--
3 - ~ Copyright 2015-2016 Open Networking Laboratory 3 + ~ Copyright 2016 Open Networking Laboratory
4 ~ 4 ~
5 ~ Licensed under the Apache License, Version 2.0 (the "License"); 5 ~ Licensed under the Apache License, Version 2.0 (the "License");
6 ~ you may not use this file except in compliance with the License. 6 ~ you may not use this file except in compliance with the License.
...@@ -16,8 +16,9 @@ ...@@ -16,8 +16,9 @@
16 --> 16 -->
17 <project xmlns="http://maven.apache.org/POM/4.0.0" 17 <project xmlns="http://maven.apache.org/POM/4.0.0"
18 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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"> 19 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
20 <modelVersion>4.0.0</modelVersion> 20 <modelVersion>4.0.0</modelVersion>
21 +
21 <parent> 22 <parent>
22 <groupId>org.onosproject</groupId> 23 <groupId>org.onosproject</groupId>
23 <artifactId>onos-apps</artifactId> 24 <artifactId>onos-apps</artifactId>
...@@ -25,169 +26,14 @@ ...@@ -25,169 +26,14 @@
25 <relativePath>../pom.xml</relativePath> 26 <relativePath>../pom.xml</relativePath>
26 </parent> 27 </parent>
27 28
28 - <artifactId>onos-app-cpman</artifactId> 29 + <artifactId>onos-cpman</artifactId>
29 - <packaging>bundle</packaging> 30 + <packaging>pom</packaging>
30 -
31 - <url>http://onosproject.org</url>
32 -
33 - <description>Control Plane Management Application</description>
34 31
35 - <properties> 32 + <description>ONOS CPMan applications</description>
36 - <onos.app.name>org.onosproject.cpman</onos.app.name>
37 - <onos.app.category>default</onos.app.category>
38 - <onos.app.url>http://onosproject.org</onos.app.url>
39 - <onos.app.readme>Control plane management application.</onos.app.readme>
40 - <web.context>/onos/cpman</web.context>
41 - <api.version>1.0.0</api.version>
42 - <api.title>Control Plane Manager REST API</api.title>
43 - <api.description>
44 - APIs for interacting with the Control Plane Management application.
45 - </api.description>
46 - <api.package>org.onosproject.cpman.rest</api.package>
47 - </properties>
48 -
49 - <dependencies>
50 - <dependency>
51 - <groupId>org.osgi</groupId>
52 - <artifactId>org.osgi.compendium</artifactId>
53 - </dependency>
54 - <dependency>
55 - <groupId>org.osgi</groupId>
56 - <artifactId>org.osgi.core</artifactId>
57 - </dependency>
58 - <dependency>
59 - <groupId>org.apache.felix</groupId>
60 - <artifactId>org.apache.felix.scr.annotations</artifactId>
61 - </dependency>
62 - <dependency>
63 - <groupId>org.apache.karaf.shell</groupId>
64 - <artifactId>org.apache.karaf.shell.console</artifactId>
65 - <scope>compile</scope>
66 - </dependency>
67 - <dependency>
68 - <groupId>org.onosproject</groupId>
69 - <artifactId>onos-cli</artifactId>
70 - <version>${project.version}</version>
71 - </dependency>
72 - <dependency>
73 - <groupId>org.onosproject</groupId>
74 - <artifactId>onos-core-serializers</artifactId>
75 - <version>${project.version}</version>
76 - </dependency>
77 - <dependency>
78 - <groupId>org.onosproject</groupId>
79 - <artifactId>onlab-junit</artifactId>
80 - <scope>test</scope>
81 - </dependency>
82 - <dependency>
83 - <groupId>org.onosproject</groupId>
84 - <artifactId>onos-rest</artifactId>
85 - <version>${project.version}</version>
86 - </dependency>
87 - <dependency>
88 - <groupId>org.onosproject</groupId>
89 - <artifactId>onlab-rest</artifactId>
90 - <version>${project.version}</version>
91 - </dependency>
92 - <dependency>
93 - <groupId>org.onosproject</groupId>
94 - <artifactId>onos-api</artifactId>
95 - <version>${project.version}</version>
96 - <classifier>tests</classifier>
97 - <scope>test</scope>
98 - </dependency>
99 - <dependency>
100 - <groupId>org.onosproject</groupId>
101 - <artifactId>onlab-misc</artifactId>
102 - </dependency>
103 - <dependency>
104 - <groupId>javax.ws.rs</groupId>
105 - <artifactId>jsr311-api</artifactId>
106 - <version>1.1.1</version>
107 - <scope>provided</scope>
108 - </dependency>
109 - <dependency>
110 - <groupId>com.sun.jersey</groupId>
111 - <artifactId>jersey-servlet</artifactId>
112 - </dependency>
113 33
114 - <dependency> 34 + <modules>
115 - <groupId>com.fasterxml.jackson.core</groupId> 35 + <module>api</module>
116 - <artifactId>jackson-databind</artifactId> 36 + <module>app</module>
117 - </dependency> 37 + </modules>
118 - <dependency>
119 - <groupId>com.fasterxml.jackson.core</groupId>
120 - <artifactId>jackson-annotations</artifactId>
121 - </dependency>
122 - <dependency>
123 - <groupId>com.sun.jersey</groupId>
124 - <artifactId>jersey-client</artifactId>
125 - <scope>test</scope>
126 - </dependency>
127 - <dependency>
128 - <groupId>org.easymock</groupId>
129 - <artifactId>easymock</artifactId>
130 - <scope>test</scope>
131 - </dependency>
132 - <dependency>
133 - <groupId>com.sun.jersey.jersey-test-framework</groupId>
134 - <artifactId>jersey-test-framework-core</artifactId>
135 - <scope>test</scope>
136 - </dependency>
137 - <dependency>
138 - <groupId>com.sun.jersey.jersey-test-framework</groupId>
139 - <artifactId>jersey-test-framework-grizzly2</artifactId>
140 - <scope>test</scope>
141 - </dependency>
142 - <dependency>
143 - <groupId>org.onosproject</groupId>
144 - <artifactId>onlab-osgi</artifactId>
145 - <version>${project.version}</version>
146 - <classifier>tests</classifier>
147 - <scope>test</scope>
148 - </dependency>
149 - </dependencies>
150 38
151 - <build>
152 - <plugins>
153 - <plugin>
154 - <groupId>org.apache.felix</groupId>
155 - <artifactId>maven-bundle-plugin</artifactId>
156 - <extensions>true</extensions>
157 - <configuration>
158 - <instructions>
159 - <_wab>src/main/webapp/</_wab>
160 - <Include-Resource>
161 - WEB-INF/classes/apidoc/swagger.json=target/swagger.json,
162 - {maven-resources}
163 - </Include-Resource>
164 - <Bundle-SymbolicName>
165 - ${project.groupId}.${project.artifactId}
166 - </Bundle-SymbolicName>
167 - <Import-Package>
168 - org.slf4j,
169 - org.osgi.framework,
170 - javax.ws.rs,
171 - javax.ws.rs.core,
172 - com.sun.jersey.api.core,
173 - com.sun.jersey.spi.container.servlet,
174 - com.sun.jersey.server.impl.container.servlet,
175 - com.fasterxml.jackson.databind,
176 - com.fasterxml.jackson.databind.node,
177 - com.fasterxml.jackson.core,
178 - org.apache.karaf.shell.commands,
179 - org.apache.karaf.shell.console,
180 - com.google.common.*,
181 - org.onlab.packet.*,
182 - org.onlab.rest.*,
183 - org.onosproject.*,
184 - org.onlab.util.*,
185 - org.jboss.netty.util.*
186 - </Import-Package>
187 - <Web-ContextPath>${web.context}</Web-ContextPath>
188 - </instructions>
189 - </configuration>
190 - </plugin>
191 - </plugins>
192 - </build>
193 </project> 39 </project>
......