Merge "Update diagram and developer guide for Si and P"
[transportpce.git] / tapi / src / main / java / org / opendaylight / transportpce / tapi / utils / TapiContext.java
index 14fdb46df990f45c6776d470db1309b71c9001bc..045577c1fb29fdcf5c54b28af39fe70bd682456a 100644 (file)
@@ -262,6 +262,8 @@ public class TapiContext {
             }
             // TODO -> Need to remove CEPs from NEPs. If not error from get Topology details output
             Node node = optNode.get();
+            LOG.debug("NEPs of node before creating map to be returned to the getTapiNode function = {}",
+                node.getOwnedNodeEdgePoint().size());
             Map<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> onepMap = new HashMap<>();
             for (OwnedNodeEdgePoint onep: node.getOwnedNodeEdgePoint().values()) {
                 if (onep.augmentation(OwnedNodeEdgePoint1.class) == null) {
@@ -283,8 +285,11 @@ public class TapiContext {
                 if (onep.getMappedServiceInterfacePoint() != null) {
                     newOnepBuilder.setMappedServiceInterfacePoint(onep.getMappedServiceInterfacePoint());
                 }
-                onepMap.put(newOnepBuilder.key(), newOnepBuilder.build());
+                OwnedNodeEdgePoint newOnep = newOnepBuilder.build();
+                onepMap.put(newOnep.key(), newOnep);
             }
+            LOG.debug("NEPs of node after creating map to be returned to the getTapiNode function = {}",
+                onepMap.size());
             return new NodeBuilder(node)
                 .setOwnedNodeEdgePoint(onepMap)
                 .build();
@@ -399,6 +404,7 @@ public class TapiContext {
         try {
             this.networkTransactionService.delete(LogicalDatastoreType.OPERATIONAL, connectivityServIID);
             this.networkTransactionService.commit().get();
+            LOG.info("Connectivity service deleted");
         } catch (InterruptedException | ExecutionException e) {
             LOG.error("Failed to delete Connectivity service", e);
         }