Refactor TAPI 2.4
[transportpce.git] / tapi / src / main / java / org / opendaylight / transportpce / tapi / utils / TapiContext.java
index b75cb2d709bc7b6d77c1ea887dc0eda2550618e4..f2e5b8ddbb2988067a2683da69c5a1b4ad20841a 100644 (file)
@@ -232,7 +232,7 @@ public class TapiContext {
             Optional<OwnedNodeEdgePoint> optionalOnep = this.networkTransactionService.read(
                     LogicalDatastoreType.OPERATIONAL, onepIID).get();
             if (!optionalOnep.isPresent()) {
-                LOG.error("ONEP is not present in datastore");
+                LOG.error("ONEP is not present in datastore for topoUuid {}, NodeUuid {}", topoUuid, nodeUuid);
                 return;
             }
             OwnedNodeEdgePoint onep = optionalOnep.orElseThrow();
@@ -587,7 +587,7 @@ public class TapiContext {
         try {
             Optional<OwnedNodeEdgePoint> optNode = this.networkTransactionService
                 .read(LogicalDatastoreType.OPERATIONAL, nepIID).get();
-            if (!optNode.isPresent()) {
+            if (optNode.isEmpty()) {
                 LOG.error(NODE_NOT_PRESENT);
                 return null;
             }