better with files
diff --git a/providers/of/flow/.checkstyle b/providers/of/flow/.checkstyle
new file mode 100644
index 0000000..68c7cd3
--- /dev/null
+++ b/providers/of/flow/.checkstyle
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<fileset-config file-format-version="1.2.0" simple-config="false" sync-formatter="false">
+ <local-check-config name="maven-checkstyle-plugin validate-checkstyle" location="jar:file:/Users/ash/.m2/repository/org/onlab/tools/onos-build-conf/1.0/onos-build-conf-1.0.jar!/onos/checkstyle.xml" type="remote" description="maven-checkstyle-plugin configuration validate-checkstyle">
+ <property name="checkstyle.cache.file" value="${project_loc}/target/checkstyle-cachefile"/>
+ <property name="checkstyle.suppressions.file" value="/Users/ash/work/onos-next/providers/of/host/target/checkstyle-suppressions-validate-checkstyle.xml"/>
+ <property name="checkstyle.header.file" value="/Users/ash/work/onos-next/providers/of/host/target/checkstyle-header-validate-checkstyle.txt"/>
+ </local-check-config>
+ <fileset name="java-sources-validate-checkstyle" enabled="true" check-config-name="maven-checkstyle-plugin validate-checkstyle" local="true">
+ <file-match-pattern match-pattern="src/test/java.*\.java" include-pattern="true"/>
+ <file-match-pattern match-pattern="src/main/java/.*\.java" include-pattern="true"/>
+ <file-match-pattern match-pattern="src/main/resources.*\.properties" include-pattern="true"/>
+ <file-match-pattern match-pattern="src/test/resources.*\.properties" include-pattern="true"/>
+ </fileset>
+</fileset-config>
diff --git a/providers/of/flow/pom.xml b/providers/of/flow/pom.xml
new file mode 100644
index 0000000..4c7a467
--- /dev/null
+++ b/providers/of/flow/pom.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.onlab.onos</groupId>
+ <artifactId>onos-of-providers</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>onos-of-provider-flow</artifactId>
+ <packaging>bundle</packaging>
+
+ <description>ONOS OpenFlow protocol flow provider</description>
+
+</project>
diff --git a/providers/of/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/OpenFlowRuleProvider.java b/providers/of/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/OpenFlowRuleProvider.java
new file mode 100644
index 0000000..29a716d
--- /dev/null
+++ b/providers/of/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/OpenFlowRuleProvider.java
@@ -0,0 +1,85 @@
+package org.onlab.onos.provider.of.flow.impl;
+
+import static org.slf4j.LoggerFactory.getLogger;
+
+import org.apache.felix.scr.annotations.Activate;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Deactivate;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.ReferenceCardinality;
+import org.onlab.onos.net.DeviceId;
+import org.onlab.onos.net.flow.FlowEntry;
+import org.onlab.onos.net.flow.FlowRule;
+import org.onlab.onos.net.flow.FlowRuleProvider;
+import org.onlab.onos.net.flow.FlowRuleProviderRegistry;
+import org.onlab.onos.net.flow.FlowRuleProviderService;
+import org.onlab.onos.net.provider.AbstractProvider;
+import org.onlab.onos.net.provider.ProviderId;
+import org.onlab.onos.net.topology.TopologyService;
+import org.onlab.onos.of.controller.OpenFlowController;
+import org.slf4j.Logger;
+
+/**
+ * Provider which uses an OpenFlow controller to detect network
+ * end-station hosts.
+ */
+@Component(immediate = true)
+public class OpenFlowRuleProvider extends AbstractProvider implements FlowRuleProvider {
+
+ private final Logger log = getLogger(getClass());
+
+ @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+ protected FlowRuleProviderRegistry providerRegistry;
+
+ @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+ protected OpenFlowController controller;
+
+ @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+ protected TopologyService topologyService;
+
+ private FlowRuleProviderService providerService;
+
+ /**
+ * Creates an OpenFlow host provider.
+ */
+ public OpenFlowRuleProvider() {
+ super(new ProviderId("org.onlab.onos.provider.openflow"));
+ }
+
+ @Activate
+ public void activate() {
+ providerService = providerRegistry.register(this);
+ log.info("Started");
+ }
+
+ @Deactivate
+ public void deactivate() {
+ providerRegistry.unregister(this);
+ providerService = null;
+
+ log.info("Stopped");
+ }
+ @Override
+ public void applyFlowRule(FlowRule... flowRules) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void removeFlowRule(FlowRule... flowRules) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public Iterable<FlowEntry> getFlowMetrics(DeviceId deviceId) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+
+ //TODO: InternalFlowRuleProvider listening to stats and error and flowremoved.
+ // possibly barriers as well. May not be internal at all...
+
+
+}
diff --git a/providers/of/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/package-info.java b/providers/of/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/package-info.java
new file mode 100644
index 0000000..66a475e
--- /dev/null
+++ b/providers/of/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/package-info.java
@@ -0,0 +1,4 @@
+/**
+ * Provider that uses OpenFlow controller as a means of ending and receiving flow information.
+ */
+package org.onlab.onos.provider.of.flow.impl;