Provide edit functionality for Static Flows
[controller.git] / opendaylight / web / flows / src / main / java / org / opendaylight / controller / flows / web / Flows.java
index a014528ded3ccfea19f47ea21ecae64ec83d513c..8a7c3983d1cae6e7c2260c00dbdeb8d1263065f2 100644 (file)
@@ -212,6 +212,7 @@ public class Flows implements IDaylightWeb {
         return nodes;
     }
 
+
     @RequestMapping(value = "/flow", method = RequestMethod.POST)
     @ResponseBody
     public String actionFlow(@RequestParam(required = true) String action, @RequestParam(required = false) String body,
@@ -243,6 +244,12 @@ public class Flows implements IDaylightWeb {
                 DaylightWebUtil.auditlog("Flow Entry", userName, "added", flow.getName() + " on Node "
                         + DaylightWebUtil.getNodeDesc(node, containerName, this), containerName);
             }
+        } else if (action.equals("edit")){
+            result = frm.modifyStaticFlow(flow);
+            if (result.isSuccess()) {
+                DaylightWebUtil.auditlog("Flow Entry", userName, "updated", flow.getName() + " on Node "
+                        + DaylightWebUtil.getNodeDesc(node, containerName, this), containerName);
+            }
         }
 
         return (result.isSuccess()) ? StatusCode.SUCCESS.toString() : result.getDescription();