BUG 2302 : odl-clustering-test-app should not be part of the odl-restconf-all feature set
[controller.git] / opendaylight / forwardingrulesmanager / api / src / main / java / org / opendaylight / controller / forwardingrulesmanager / IForwardingRulesManager.java
index b3d0c8acdf535f2f48d77c5940970587bbee954d..070e8c499800c39068bbb16d2a879a4eb353497b 100644 (file)
@@ -18,7 +18,6 @@ import org.opendaylight.controller.sal.utils.Status;
 /**
  * Interface that describes methods for installing or removing forwarding rules
  * and to access to the flows database.
- *
  */
 public interface IForwardingRulesManager {
 
@@ -46,6 +45,19 @@ public interface IForwardingRulesManager {
      */
     public Status uninstallFlowEntry(FlowEntry flow);
 
+    /**
+     * It requests FRM to remove all the Flow Entry that are part of the
+     * specified group. FRM will request the SDN protocol plugin to uninstall
+     * the flows from the network node one by one. Based on the result of this
+     * operation FRM will update its database accordingly and will return the
+     * proper {@code Status} code.
+     *
+     * @param groupName
+     *            the group name
+     * @return the {@code Status} object indicating the result of this action
+     */
+    public Status uninstallFlowEntryGroup(String groupName);
+
     /**
      * It requests FRM to replace the currently installed Flow Entry with the
      * new one. It is up to the SDN protocol plugin to decide how to convey this
@@ -73,7 +85,6 @@ public interface IForwardingRulesManager {
      * not valid an error code is returned. If the existing flow is equal to the
      * passed one it will be a no op and success code is returned.
      *
-     *
      * @param newone
      *            the new flow entry to install
      * @return the {@code Status} object indicating the result of this action
@@ -99,7 +110,7 @@ public interface IForwardingRulesManager {
      * call. A unique request id is returned to the caller. FRM will request the
      * SDN protocol plugin to uninstall the flow from the network node. As
      * immediate result of this asynchronous call, FRM will update its flow
-     * database as if the flow was successfully installed.
+     * database as if the flow was successfully removed.
      *
      * @param flow
      *            the flow entry to uninstall
@@ -108,6 +119,19 @@ public interface IForwardingRulesManager {
      */
     public Status uninstallFlowEntryAsync(FlowEntry flow);
 
+    /**
+     * It requests FRM to remove all the Flow Entry that are part of the
+     * specified group through an asynchronous call. FRM will request the SDN
+     * protocol plugin to uninstall the flows from the network node one by one.
+     * As immediate result of this asynchronous call, FRM will update its flow
+     * database as if the flow was successfully removed.
+     *
+     * @param groupName
+     *            the group name
+     * @return the {@code Status} object indicating the result of this action
+     */
+    public Status uninstallFlowEntryGroupAsync(String groupName);
+
     /**
      * It requests FRM to replace the currently installed Flow Entry with the
      * new one through an asynchronous call. A unique request id is returned to
@@ -175,14 +199,29 @@ public interface IForwardingRulesManager {
 
     /**
      * Returns the list of Flow entries across network nodes which are part of
-     * the same flow group, policy
+     * the same flow group, policy. This list contains the flows as they were
+     * requested to be installed by the applications, before any merging with
+     * container flow is done.
      *
      * @param group
      *            the group name
-     * @return the list of flow entries belonging to the specified group
+     * @return the original list of flow entries belonging to the specified group
      */
     public List<FlowEntry> getFlowEntriesForGroup(String group);
 
+    /**
+     * Returns the list of Flow entries installed in network nodes which are part of
+     * the same flow group, policy. This list contains the effective flows installed
+     * on the nodes after the merging with any possible container flow was performed.
+     * If no container flow are specified, this method returns the same list returned
+     * by getFlowEntriesForGroup(String group).
+     *
+     * @param group
+     *            the group name
+     * @return the list of container flow merged flow entries belonging to the specified group
+     */
+    public List<FlowEntry> getInstalledFlowEntriesForGroup(String policyName);
+
     /**
      * Add a list of output port to the flow with the specified name on the
      * specified network node
@@ -194,8 +233,7 @@ public interface IForwardingRulesManager {
      * @param dstPort
      *            the list of ports to be added to the flow output actions
      */
-    public void addOutputPort(Node node, String flowName,
-            List<NodeConnector> dstPort);
+    public void addOutputPort(Node node, String flowName, List<NodeConnector> dstPort);
 
     /**
      * Remove a list of output port from the flow with the specified name on the
@@ -208,8 +246,7 @@ public interface IForwardingRulesManager {
      * @param dstPortthe
      *            list of ports to be removed from the flow output actions
      */
-    public void removeOutputPort(Node node, String flowName,
-            List<NodeConnector> dstPort);
+    public void removeOutputPort(Node node, String flowName, List<NodeConnector> dstPort);
 
     /**
      * Replace the current output port in the specified flow with the specified
@@ -224,8 +261,7 @@ public interface IForwardingRulesManager {
      * @param dstPort
      *            the new output action port
      */
-    public void replaceOutputPort(Node node, String flowName,
-            NodeConnector outPort);
+    public void replaceOutputPort(Node node, String flowName, NodeConnector outPort);
 
     /**
      * Returns the output port configured on the specified flow
@@ -329,12 +365,19 @@ public interface IForwardingRulesManager {
      *
      * @param config
      *            the {@code FlowConfig} object representing the static flow
-     * @param restore
-     *            if set to true, the config object validation will be skipped.
-     *            Used only internally, always set it to false.
      * @return the {@code Status} object indicating the result of this action.
      */
-    public Status addStaticFlow(FlowConfig config, boolean restore);
+    public Status addStaticFlow(FlowConfig config);
+
+    /**
+     * Add a flow specified by the {@code FlowConfig} object on the current
+     * container, through an asynchronous call.
+     *
+     * @param config
+     *            the {@code FlowConfig} object representing the static flow
+     * @return the {@code Status} object indicating the result of this action.
+     */
+    public Status addStaticFlowAsync(FlowConfig config);
 
     /**
      * Remove a flow specified by the {@code FlowConfig} object on the current
@@ -346,6 +389,16 @@ public interface IForwardingRulesManager {
      */
     public Status removeStaticFlow(FlowConfig config);
 
+    /**
+     * Remove a flow specified by the {@code FlowConfig} object on the current
+     * container, through an asynchronous call.
+     *
+     * @param config
+     *            the {@code FlowConfig} object representing the static flow
+     * @return the {@code Status} object indicating the result of this action
+     */
+    public Status removeStaticFlowAsync(FlowConfig config);
+
     /**
      * Replace the flow identified by the {@code FlowConfig.name} name for the
      * {@code FlowConfig.node} network node with the new flow specified by
@@ -353,7 +406,7 @@ public interface IForwardingRulesManager {
      *
      * @param config
      *            the {@code FlowConfig} object
-     * @returnthe {@code Status} object indicating the result of this action
+     * @return the {@code Status} object indicating the result of this action
      */
     public Status modifyStaticFlow(FlowConfig config);
 
@@ -368,6 +421,18 @@ public interface IForwardingRulesManager {
      */
     public Status removeStaticFlow(String name, Node node);
 
+    /**
+     * Remove the flow specified by name on the passed network node via an
+     * asynchronous call
+     *
+     * @param name
+     *            for the static flow
+     * @param node
+     *            on which the flow is attached
+     * @return the {@code Status} object indicating the result of this action
+     */
+    public Status removeStaticFlowAsync(String name, Node node);
+
     /**
      * Toggle the installation status of the specified configured flow If the
      * flow configuration status is active, this call will change the flow
@@ -400,4 +465,27 @@ public interface IForwardingRulesManager {
 
     public PortGroupProvider getPortGroupProvider();
 
+    /**
+     * Returns the list of Flow entries for a network node.
+     * This list contains the flows as they were
+     * requested to be installed by the applications, before any merging with
+     * container flow is done.
+     *
+     * @param node
+     * @return the original list of flow entries belonging to the specified node
+     */
+    public List<FlowEntry> getFlowEntriesForNode(Node node);
+
+    /**
+     * Returns the list of Flow entries installed in a network node.
+     * This list contains the effective flows installed
+     * on the nodes after the merging with any possible container flow was performed.
+     * If no container flow are specified, this method returns the same list as returned
+     * by getFlowEntriesForNode(Node node).
+     *
+     * @param node
+     * @return the list of container flow merged flow entries belonging to the specified node
+     */
+    public List<FlowEntry> getInstalledFlowEntriesForNode(Node node);
+
 }