Modify intent handler.
[nemo.git] / nemo-impl / src / main / java / org / opendaylight / nemo / intent / computation / VNMappingUnit.java
index bad4d7d2d13f2ca3491efbf91f76fd499a50f86f..17e60097e1f6e49979a046906e8f150595e75c94 100644 (file)
@@ -115,6 +115,11 @@ public class VNMappingUnit implements AutoCloseable {
             throw new VNMappingException("Can not read the physical nodes.");\r
         }\r
 \r
+        if ( !result.isPresent() ) {\r
+            throw new VNMappingException("Failed virtual network mapping caused by " +\r
+                    "absent underlying network topology.");\r
+        }\r
+\r
         PhysicalNodes physicalNodes = result.get();\r
         List<PhysicalNode> physicalNodeList = physicalNodes.getPhysicalNode();\r
 \r