tom

Added a shell of a openflow device provider and fixed features.

...@@ -55,9 +55,11 @@ ...@@ -55,9 +55,11 @@
55 <feature>onos-core</feature> 55 <feature>onos-core</feature>
56 <bundle>mvn:io.netty/netty/3.9.2.Final</bundle> 56 <bundle>mvn:io.netty/netty/3.9.2.Final</bundle>
57 57
58 - <bundle>mvn:org.onlab.onos/openflow-api/1.0.0-SNAPSHOT</bundle> 58 + <bundle>mvn:org.projectfloodlight/openflowj/0.3.8-SNAPSHOT</bundle>
59 - <bundle>mvn:org.onlab.onos/openflow-ctl/1.0.0-SNAPSHOT</bundle> 59 + <!--bundle>mvn:org.onlab.onos/onos-of-api/1.0.0-SNAPSHOT</bundle-->
60 - <bundle>mvn:org.onlab.onos/onos-of-providers/1.0.0-SNAPSHOT</bundle> 60 + <bundle>mvn:org.onlab.onos/onos-of-ctl/1.0.0-SNAPSHOT</bundle>
61 +
62 + <bundle>mvn:org.onlab.onos/onos-of-provider-device/1.0.0-SNAPSHOT</bundle>
61 </feature> 63 </feature>
62 64
63 </features> 65 </features>
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
68 <dependency> 68 <dependency>
69 <groupId>org.projectfloodlight</groupId> 69 <groupId>org.projectfloodlight</groupId>
70 <artifactId>openflowj</artifactId> 70 <artifactId>openflowj</artifactId>
71 - <version>0.3.6-SNAPSHOT</version> 71 + <version>0.3.8-SNAPSHOT</version>
72 </dependency> 72 </dependency>
73 <!-- Floodlight's dependencies --> 73 <!-- Floodlight's dependencies -->
74 <dependency> 74 <dependency>
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
59 <dependency> 59 <dependency>
60 <groupId>com.google.guava</groupId> 60 <groupId>com.google.guava</groupId>
61 <artifactId>guava</artifactId> 61 <artifactId>guava</artifactId>
62 - <version>15.0</version> 62 + <version>17.0</version>
63 </dependency> 63 </dependency>
64 <dependency> 64 <dependency>
65 <groupId>org.slf4j</groupId> 65 <groupId>org.slf4j</groupId>
......
1 +package org.onlab.onos.provider.of.device.impl;
2 +
3 +import org.apache.felix.scr.annotations.Activate;
4 +import org.apache.felix.scr.annotations.Component;
5 +import org.apache.felix.scr.annotations.Deactivate;
6 +import org.apache.felix.scr.annotations.Reference;
7 +import org.apache.felix.scr.annotations.ReferenceCardinality;
8 +import org.onlab.onos.net.device.DeviceProviderBroker;
9 +import org.slf4j.Logger;
10 +import org.slf4j.LoggerFactory;
11 +
12 +/**
13 + * Device provider which uses an OpenFlow controller to detect devices.
14 + */
15 +@Component
16 +public class OpenFlowDeviceProvider {
17 +
18 + private final Logger log = LoggerFactory.getLogger(OpenFlowDeviceProvider.class);
19 +
20 + @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
21 + protected DeviceProviderBroker broker;
22 +
23 +// @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
24 +// protected OpenFlowController controller;
25 +
26 + @Activate
27 + public void activate() {
28 + log.info("Started");
29 + }
30 +
31 + @Deactivate
32 + public void deactivate() {
33 + log.info("Stopped");
34 + }
35 +
36 +}
...@@ -17,15 +17,12 @@ ...@@ -17,15 +17,12 @@
17 <description>ONOS OpenFlow protocol adapters</description> 17 <description>ONOS OpenFlow protocol adapters</description>
18 18
19 <modules> 19 <modules>
20 + <module>device</module>
20 </modules> 21 </modules>
21 22
22 <dependencies> 23 <dependencies>
23 <dependency> 24 <dependency>
24 <groupId>org.onlab.onos</groupId> 25 <groupId>org.onlab.onos</groupId>
25 - <artifactId>onos-api</artifactId>
26 - </dependency>
27 - <dependency>
28 - <groupId>org.onlab.onos</groupId>
29 <artifactId>onos-of-api</artifactId> 26 <artifactId>onos-of-api</artifactId>
30 </dependency> 27 </dependency>
31 </dependencies> 28 </dependencies>
......
...@@ -26,11 +26,20 @@ ...@@ -26,11 +26,20 @@
26 <artifactId>onos-api</artifactId> 26 <artifactId>onos-api</artifactId>
27 <version>${project.version}</version> 27 <version>${project.version}</version>
28 </dependency> 28 </dependency>
29 +
29 <dependency> 30 <dependency>
30 - <groupId>org.onlab.onos</groupId> 31 + <groupId>org.apache.felix</groupId>
31 - <artifactId>onos-of-api</artifactId> 32 + <artifactId>org.apache.felix.scr.annotations</artifactId>
32 - <version>${project.version}</version>
33 </dependency> 33 </dependency>
34 </dependencies> 34 </dependencies>
35 35
36 + <build>
37 + <plugins>
38 + <plugin>
39 + <groupId>org.apache.felix</groupId>
40 + <artifactId>maven-bundle-plugin</artifactId>
41 + </plugin>
42 + </plugins>
43 + </build>
44 +
36 </project> 45 </project>
......