X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fweb%2Fflows%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fflows%2Fweb%2FFlows.java;h=9444360eecb7d7ae4a6e084a4fde8512c7b5ed71;hp=4396c957bf86f96f37c8784967bc4b605f2196a7;hb=65c9b2ea72201b67ece5d6e5e210857d69df743c;hpb=8bcd39b0fdd03d1ebbc46118d3ae4f2ee096b012 diff --git a/opendaylight/web/flows/src/main/java/org/opendaylight/controller/flows/web/Flows.java b/opendaylight/web/flows/src/main/java/org/opendaylight/controller/flows/web/Flows.java index 4396c957bf..9444360eec 100644 --- a/opendaylight/web/flows/src/main/java/org/opendaylight/controller/flows/web/Flows.java +++ b/opendaylight/web/flows/src/main/java/org/opendaylight/controller/flows/web/Flows.java @@ -47,6 +47,7 @@ import com.google.gson.Gson; public class Flows implements IDaylightWeb { private static final UserLevel AUTH_LEVEL = UserLevel.CONTAINERUSER; private static final String WEB_NAME = "Flows"; + private static final String WEB_ID = "flows"; private static final short WEB_ORDER = 2; @@ -237,6 +238,7 @@ public class Flows implements IDaylightWeb { Status result = new Status(StatusCode.BADREQUEST, "Invalid request"); if (action.equals("add")) { result = frm.addStaticFlow(flow); + DaylightWebUtil.auditlog("Flow", userName, "added", flow.getName(), containerName); } return (result.isSuccess()) ? StatusCode.SUCCESS.toString() : result @@ -270,8 +272,14 @@ public class Flows implements IDaylightWeb { } if (action.equals("remove")) { result = frm.removeStaticFlow(name, node); + if(result.isSuccess()) { + DaylightWebUtil.auditlog("Flow", userName, "removed", name, containerName); + } } else if (action.equals("toggle")) { result = frm.toggleStaticFlowStatus(name, node); + if(result.isSuccess()) { + DaylightWebUtil.auditlog("Flow", userName, "toggled", name, containerName); + } } else { result = new Status(StatusCode.BADREQUEST, "Unknown action"); }