- if (status.isSuccess()) {
- NorthboundUtils.auditlog("Flow Entry", username, "added",
- name + " on Node " + NorthboundUtils.getNodeDesc(node, containerName, this), containerName);
- return Response.status(Response.Status.CREATED).entity("Success").build();
+ if (staticFlow == null) {
+ status = frm.addStaticFlow(flowConfig);
+ if(status.isSuccess()){
+ NorthboundUtils.auditlog("Flow Entry", username, "added",
+ name + " on Node " + NorthboundUtils.getNodeDesc(node, containerName, this), containerName);
+ return Response.status(Response.Status.CREATED).entity("Success").build();
+ }
+ } else {
+ status = frm.modifyStaticFlow(flowConfig);
+ if(status.isSuccess()){
+ NorthboundUtils.auditlog("Flow Entry", username, "updated",
+ name + " on Node " + NorthboundUtils.getNodeDesc(node, containerName, this), containerName);
+ return NorthboundUtils.getResponse(status);
+ }