Additions to southbound API interfaces
added API interfaces for topology
added rough API interfaces for flow
Change-Id: I84ee2b70dd33dcbca98c1863e7f1766cc02642c5
diff --git a/net/api/src/main/java/net/onrc/onos/api/flow/FlowDescription.java b/net/api/src/main/java/net/onrc/onos/api/flow/FlowDescription.java
new file mode 100644
index 0000000..80fc051
--- /dev/null
+++ b/net/api/src/main/java/net/onrc/onos/api/flow/FlowDescription.java
@@ -0,0 +1,12 @@
+package net.onrc.onos.api.flow;
+
+package net.onrc.onos.api.Description;
+
+/**
+ * Information about a flow rule.
+ */
+public interface FlowDescription extends Description {
+
+ // Match and action, possibly reason for flow rule, unless reason is too OF-specific.
+
+}
diff --git a/net/api/src/main/java/net/onrc/onos/api/flow/FlowRuleProvider.java b/net/api/src/main/java/net/onrc/onos/api/flow/FlowRuleProvider.java
new file mode 100644
index 0000000..acb63b4
--- /dev/null
+++ b/net/api/src/main/java/net/onrc/onos/api/flow/FlowRuleProvider.java
@@ -0,0 +1,9 @@
+package net.onrc.onos.api.flow;
+
+import net.onrc.onos.api.Provider;
+
+/**
+ * Abstraction of a flow rule provider.
+ */
+public interface FlowRuleProvider extends Provider {
+}
\ No newline at end of file
diff --git a/net/api/src/main/java/net/onrc/onos/api/flow/FlowRuleProviderBroker.java b/net/api/src/main/java/net/onrc/onos/api/flow/FlowRuleProviderBroker.java
new file mode 100644
index 0000000..27f1ca6
--- /dev/null
+++ b/net/api/src/main/java/net/onrc/onos/api/flow/FlowRuleProviderBroker.java
@@ -0,0 +1,10 @@
+package net.onrc.onos.api.flow;
+
+import net.onrc.onos.api.ProviderBroker;
+
+/**
+ * Abstraction for a flow rule provider brokerage.
+ */
+public interface FlowRuleProviderBroker
+ extends ProviderBroker<FlowRuleProvider, FlowRuleProviderService> {
+}
diff --git a/net/api/src/main/java/net/onrc/onos/api/flow/FlowRuleProviderService.java b/net/api/src/main/java/net/onrc/onos/api/flow/FlowRuleProviderService.java
new file mode 100644
index 0000000..8f90c32
--- /dev/null
+++ b/net/api/src/main/java/net/onrc/onos/api/flow/FlowRuleProviderService.java
@@ -0,0 +1,35 @@
+package net.onrc.onos.api.flow;
+
+import net.onrc.onos.api.ProviderService;
+
+/**
+ * Service through which flowrule providers can inject flowrule information into
+ * the core.
+ */
+public interface FlowRuleProviderService extends ProviderService {
+
+ /**
+ * Signals that a flow that was previously installed has been removed.
+ *
+ * @param flowDescription information about the removed flow
+ */
+ void flowRemoved(FlowDescription flowDescription);
+
+ /**
+ * Signals that a flowrule is missing for some network traffic.
+ *
+ * @param flowDescription information about traffic in need of flow rule(s)
+ */
+ void flowMissing(FlowDescription flowDescription);
+
+ /**
+ * Signals that a flowrule has been added.
+ *
+ * TODO think about if this really makes sense, e.g. if stats collection or
+ * something can leverage it.
+ *
+ * @param flowDescription the rule that was added
+ */
+ void flowAdded(FlowDescription flowDescription);
+
+}
\ No newline at end of file
diff --git a/net/api/src/main/java/net/onrc/onos/api/topology/TopologyDescription.java b/net/api/src/main/java/net/onrc/onos/api/topology/TopologyDescription.java
new file mode 100644
index 0000000..306447e
--- /dev/null
+++ b/net/api/src/main/java/net/onrc/onos/api/topology/TopologyDescription.java
@@ -0,0 +1,20 @@
+package net.onrc.onos.api.topology;
+
+import net.onrc.onos.api.Description;
+
+import java.util.Collection;
+
+/**
+ * Describes attribute(s) of a network topology.
+ */
+public interface TopologyDescription extends Description {
+
+ /**
+ * A collection of Device, Link, and Host descriptors that describe
+ * the changes tha have occurred in the network topology.
+ *
+ * @return network element descriptions describing topology change
+ */
+ Collection<Description> details();
+
+}
\ No newline at end of file
diff --git a/net/api/src/main/java/net/onrc/onos/api/topology/TopologyProvider.java b/net/api/src/main/java/net/onrc/onos/api/topology/TopologyProvider.java
new file mode 100644
index 0000000..f997c61
--- /dev/null
+++ b/net/api/src/main/java/net/onrc/onos/api/topology/TopologyProvider.java
@@ -0,0 +1,10 @@
+package net.onrc.onos.api.topology;
+
+import net.onrc.onos.api.Provider;
+
+/**
+ * Means for injecting topology information into the core.
+ */
+public interface TopologyProvider extends Provider {
+
+}
diff --git a/net/api/src/main/java/net/onrc/onos/api/topology/TopologyProviderBroker.java b/net/api/src/main/java/net/onrc/onos/api/topology/TopologyProviderBroker.java
new file mode 100644
index 0000000..207f33a
--- /dev/null
+++ b/net/api/src/main/java/net/onrc/onos/api/topology/TopologyProviderBroker.java
@@ -0,0 +1,10 @@
+package net.onrc.onos.api.topology;
+
+import net.onrc.onos.api.ProviderBroker;
+
+/**
+ * Abstraction of a network topology provider brokerage.
+ */
+public interface TopologyProviderBroker extends
+ ProviderBroker<TopologyProvider, TopologyProviderService> {
+}
diff --git a/net/api/src/main/java/net/onrc/onos/api/topology/TopologyProviderService.java b/net/api/src/main/java/net/onrc/onos/api/topology/TopologyProviderService.java
new file mode 100644
index 0000000..67fbb1d
--- /dev/null
+++ b/net/api/src/main/java/net/onrc/onos/api/topology/TopologyProviderService.java
@@ -0,0 +1,20 @@
+package net.onrc.onos.api.topology;
+
+import net.onrc.onos.api.ProviderService;
+
+/**
+ * Means for injecting topology information into the core.
+ */
+public interface TopologyProviderService extends ProviderService {
+
+ // What can be conveyed in a topology that isn't by individual
+ // providers?
+
+ /**
+ * Signals the core that some aspect of the topology has changed.
+ *
+ * @param topoDescription information about topology
+ */
+ void topologyChanged(TopologyDescription topoDescription);
+
+}