Revert "Add async addStaticFlow api to FRM" 72/6972/2
authorEd Warnicke <eaw@cisco.com>
Tue, 13 May 2014 17:37:55 +0000 (12:37 -0500)
committerEd Warnicke <eaw@cisco.com>
Thu, 15 May 2014 00:49:05 +0000 (19:49 -0500)
This reverts commit 198d5e3309648814c6d5ef849d86d15dfc8e886f.

Change-Id: I2a4483ecd310e8ab6f683c65726c8c5d1d21aaf3
Signed-off-by: Ed Warnicke <eaw@cisco.com>
opendaylight/commons/opendaylight/pom.xml
opendaylight/forwardingrulesmanager/api/pom.xml
opendaylight/forwardingrulesmanager/api/src/main/java/org/opendaylight/controller/forwardingrulesmanager/IForwardingRulesManager.java
opendaylight/forwardingrulesmanager/implementation/src/main/java/org/opendaylight/controller/forwardingrulesmanager/internal/ForwardingRulesManager.java

index 83abc4cef5b05fcd94b566210e6fb3545b90356d..586a818862f1fe87d69b14febec4178ab5f7a5aa 100644 (file)
@@ -43,7 +43,7 @@
     <exi.nagasena.version>0000.0002.0038.0</exi.nagasena.version>
     <failsafe.version>2.15</failsafe.version>
     <forwarding.staticrouting>0.5.2-SNAPSHOT</forwarding.staticrouting>
-    <forwardingrulesmanager.version>0.6.0-SNAPSHOT</forwardingrulesmanager.version>
+    <forwardingrulesmanager.version>0.5.1-SNAPSHOT</forwardingrulesmanager.version>
     <geminiweb.version>2.2.0.RELEASE</geminiweb.version>
     <guava.version>14.0.1</guava.version>
     <hosttracker.api.version>0.5.2-SNAPSHOT</hosttracker.api.version>
index 82f5f9b9e9d2e8640c96a42b1923b5b185a06397..cb1c8562d35fccbdb4a0fe54122746e9e302ec22 100644 (file)
@@ -9,7 +9,7 @@
   </parent>
 
   <artifactId>forwardingrulesmanager</artifactId>
-  <version>0.6.0-SNAPSHOT</version>
+  <version>0.5.1-SNAPSHOT</version>
   <packaging>bundle</packaging>
   <dependencies>
     <dependency>
index 070e8c499800c39068bbb16d2a879a4eb353497b..9d68f84a3ae62dff4e968acba87cb8a4ec5e9b76 100644 (file)
@@ -369,16 +369,6 @@ public interface IForwardingRulesManager {
      */
     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
      * container
@@ -389,16 +379,6 @@ 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
@@ -406,7 +386,7 @@ public interface IForwardingRulesManager {
      *
      * @param config
      *            the {@code FlowConfig} object
-     * @return the {@code Status} object indicating the result of this action
+     * @returnthe {@code Status} object indicating the result of this action
      */
     public Status modifyStaticFlow(FlowConfig config);
 
@@ -421,18 +401,6 @@ 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
index 46008b24c638241c665a7bde863f0ff5052d587a..b5dcfe005e8787cc0787d3f0f9075e4d2d3768f8 100644 (file)
@@ -1590,10 +1590,6 @@ public class ForwardingRulesManager implements
 
     @Override
     public Status addStaticFlow(FlowConfig config) {
-        return addStaticFlow(config, false);
-    }
-
-    private Status addStaticFlow(FlowConfig config, boolean async) {
         // Configuration object validation
         Status status = config.validate();
         if (!status.isSuccess()) {
@@ -1602,13 +1598,7 @@ public class ForwardingRulesManager implements
             config.setStatus(error);
             return new Status(StatusCode.BADREQUEST, error);
         }
-        return addStaticFlowInternal(config, async, false);
-    }
-
-
-    @Override
-    public Status addStaticFlowAsync(FlowConfig config) {
-        return addStaticFlow(config, true);
+        return addStaticFlowInternal(config, false);
     }
 
     /**
@@ -1626,7 +1616,7 @@ public class ForwardingRulesManager implements
      *            installation on the network node was successful
      * @return The status of this request
      */
-    private Status addStaticFlowInternal(FlowConfig config, boolean async, boolean restore) {
+    private Status addStaticFlowInternal(FlowConfig config, boolean restore) {
         boolean multipleFlowPush = false;
         String error;
         Status status;
@@ -1663,7 +1653,7 @@ public class ForwardingRulesManager implements
             // Program hw
             if (config.installInHw()) {
                 FlowEntry entry = config.getFlowEntry();
-                status = async ? this.installFlowEntryAsync(entry) : this.installFlowEntry(entry);
+                status = this.installFlowEntry(entry);
                 if (!status.isSuccess()) {
                     config.setStatus(status.getDescription());
                     if (!restore) {
@@ -1775,15 +1765,6 @@ public class ForwardingRulesManager implements
 
     @Override
     public Status removeStaticFlow(FlowConfig config) {
-        return removeStaticFlow(config, false);
-    }
-
-    @Override
-    public Status removeStaticFlowAsync(FlowConfig config) {
-        return removeStaticFlow(config, true);
-    }
-
-    private Status removeStaticFlow(FlowConfig config, boolean async) {
         /*
          * No config.isInternal() check as NB does not take this path and GUI
          * cannot issue a delete on an internal generated flow. We need this
@@ -1807,8 +1788,7 @@ public class ForwardingRulesManager implements
         }
 
         // Program the network node
-        Status status = async ? this.uninstallFlowEntryAsync(config.getFlowEntry()) : this.uninstallFlowEntry(config
-                .getFlowEntry());
+        Status status = this.uninstallFlowEntry(config.getFlowEntry());
 
         // Update configuration database if programming was successful
         if (status.isSuccess()) {
@@ -1820,15 +1800,6 @@ public class ForwardingRulesManager implements
 
     @Override
     public Status removeStaticFlow(String name, Node node) {
-       return removeStaticFlow(name, node, false);
-    }
-
-    @Override
-    public Status removeStaticFlowAsync(String name, Node node) {
-        return removeStaticFlow(name, node, true);
-    }
-
-    private Status removeStaticFlow(String name, Node node, boolean async) {
         // Look for the target configuration entry
         Integer key = 0;
         FlowConfig target = null;
@@ -1859,7 +1830,7 @@ public class ForwardingRulesManager implements
         }
 
         // Program the network node
-        Status status = this.removeEntry(target.getFlowEntry(), async);
+        Status status = this.removeEntry(target.getFlowEntry(), false);
 
         // Update configuration database if programming was successful
         if (status.isSuccess()) {
@@ -2110,7 +2081,7 @@ public class ForwardingRulesManager implements
         }
 
         for (ConfigurationObject conf : configurationService.retrieveConfiguration(this, STATIC_FLOWS_FILE_NAME)) {
-            addStaticFlowInternal((FlowConfig) conf, false, true);
+            addStaticFlowInternal((FlowConfig) conf, true);
         }
     }
 
@@ -2222,7 +2193,7 @@ public class ForwardingRulesManager implements
                     // check if the frm really needs to act on the notification.
                     // this is to check against duplicate notifications
                     if(programInternalFlow(proactive, fc)) {
-                        Status status = (proactive) ? addStaticFlowInternal(fc, false, false) : removeStaticFlow(fc);
+                        Status status = (proactive) ? addStaticFlowInternal(fc, false) : removeStaticFlow(fc);
                         if (status.isSuccess()) {
                             log.trace("{} Proactive Static flow: {}", (proactive ? "Installed" : "Removed"), fc.getName());
                         } else {
@@ -2405,7 +2376,7 @@ public class ForwardingRulesManager implements
             if ((staticFlow.getNode().equals(node)) && (staticFlow.getPortGroup().equals(config.getName()))) {
                 for (Short port : data.getPorts()) {
                     FlowConfig derivedFlow = getDerivedFlowConfig(staticFlow, config.getName(), port);
-                    addStaticFlowInternal(derivedFlow, false, false);
+                    addStaticFlowInternal(derivedFlow, false);
                 }
             }
         }
@@ -3269,5 +3240,4 @@ public class ForwardingRulesManager implements
         }
         return list;
     }
-
 }