Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Log all configuration(add/modify/delete) changes to a new log file audit.log
[controller.git]
/
opendaylight
/
northbound
/
flowprogrammer
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
flowprogrammer
/
northbound
/
FlowProgrammerNorthbound.java
diff --git
a/opendaylight/northbound/flowprogrammer/src/main/java/org/opendaylight/controller/flowprogrammer/northbound/FlowProgrammerNorthbound.java
b/opendaylight/northbound/flowprogrammer/src/main/java/org/opendaylight/controller/flowprogrammer/northbound/FlowProgrammerNorthbound.java
index d3cbc4aceed0ad88a887d3a870a7d184b35a85df..6bccc2d2e9ff25bde94925be51f4555f409c5e98 100644
(file)
--- a/
opendaylight/northbound/flowprogrammer/src/main/java/org/opendaylight/controller/flowprogrammer/northbound/FlowProgrammerNorthbound.java
+++ b/
opendaylight/northbound/flowprogrammer/src/main/java/org/opendaylight/controller/flowprogrammer/northbound/FlowProgrammerNorthbound.java
@@
-322,7
+322,9
@@
public class FlowProgrammerNorthbound {
}
Status status = frm.addStaticFlow(flowConfig.getValue());
}
Status status = frm.addStaticFlow(flowConfig.getValue());
+
if (status.isSuccess()) {
if (status.isSuccess()) {
+ NorthboundUtils.auditlog("Flow", username, "added", name, containerName);
return Response.status(Response.Status.CREATED).build();
}
throw new InternalServerErrorException(status.getDescription());
return Response.status(Response.Status.CREATED).build();
}
throw new InternalServerErrorException(status.getDescription());
@@
-385,6
+387,7
@@
public class FlowProgrammerNorthbound {
Status status = frm.removeStaticFlow(name, node);
if (status.isSuccess()) {
Status status = frm.removeStaticFlow(name, node);
if (status.isSuccess()) {
+ NorthboundUtils.auditlog("Flow", username, "removed", name, containerName);
return Response.ok().build();
}
throw new InternalServerErrorException(status.getDescription());
return Response.ok().build();
}
throw new InternalServerErrorException(status.getDescription());
@@
-446,6
+449,7
@@
public class FlowProgrammerNorthbound {
Status status = frm.toggleStaticFlowStatus(staticFlow);
if (status.isSuccess()) {
Status status = frm.toggleStaticFlowStatus(staticFlow);
if (status.isSuccess()) {
+ NorthboundUtils.auditlog("Flow", username, "toggled", name, containerName);
return Response.ok().build();
}
throw new InternalServerErrorException(status.getDescription());
return Response.ok().build();
}
throw new InternalServerErrorException(status.getDescription());