Fix Match intersection logic
[controller.git] / opendaylight / northbound / topology / src / main / java / org / opendaylight / controller / topology / northbound / TopologyNorthboundJAXRS.java
index 10480bc4ec3f153312b6d1f7cae0f0bf658772a1..fb4e8229ff48fd87dd8e6195ee272d497bfbd095 100644 (file)
@@ -45,7 +45,7 @@ import org.opendaylight.controller.topologymanager.TopologyUserLinkConfig;
 
 /**
  * Topology Northbound REST API
- * 
+ *
  * <br>
  * <br>
  * Authentication scheme : <b>HTTP Basic</b><br>
@@ -74,12 +74,12 @@ public class TopologyNorthboundJAXRS {
     }
 
     /**
-     * 
+     *
      * Retrieve the Topology
-     * 
+     *
      * @param containerName
      *            The container for which we want to retrieve the topology
-     * 
+     *
      * @return A List of EdgeProps each EdgeProp represent an Edge of the grap
      *         with the corresponding properties attached to it.
      */
@@ -119,10 +119,10 @@ public class TopologyNorthboundJAXRS {
 
     /**
      * Retrieve the user configured links
-     * 
+     *
      * @param containerName
      *            The container for which we want to retrieve the user links
-     * 
+     *
      * @return A List of user configured links
      */
     @Path("/{containerName}/userLink")
@@ -159,7 +159,7 @@ public class TopologyNorthboundJAXRS {
 
     /**
      * Add an User Link
-     * 
+     *
      * @param containerName
      *            Name of the Container. The base Container is "default".
      * @param TopologyUserLinkConfig
@@ -195,6 +195,7 @@ public class TopologyNorthboundJAXRS {
 
         Status status = topologyManager.addUserLink(userLinkConfig.getValue());
         if (status.isSuccess()) {
+            NorthboundUtils.auditlog("User Link", username, "added", userLinkConfig.getValue().getName(), containerName);
             return Response.status(Response.Status.CREATED).build();
         }
         throw new InternalServerErrorException(status.getDescription());
@@ -202,7 +203,7 @@ public class TopologyNorthboundJAXRS {
 
     /**
      * Delete an User Link
-     * 
+     *
      * @param containerName
      *            Name of the Container. The base Container is "default".
      * @param name
@@ -236,6 +237,7 @@ public class TopologyNorthboundJAXRS {
 
         Status ret = topologyManager.deleteUserLink(name);
         if (ret.isSuccess()) {
+            NorthboundUtils.auditlog("User Link", username, "removed", name, containerName);
             return Response.ok().build();
         }
         throw new ResourceNotFoundException(ret.getDescription());