[ONOS-3624] update vtnweb's bug and add Not-Null constraints of export.

Change-Id: I7699d8766f0653f5fafd4b32a68051994f43b00e
diff --git a/apps/vtn/vtnmgr/src/main/java/org/onosproject/vtn/manager/impl/VTNManager.java b/apps/vtn/vtnmgr/src/main/java/org/onosproject/vtn/manager/impl/VTNManager.java
index 53fa64a..ac898d1 100644
--- a/apps/vtn/vtnmgr/src/main/java/org/onosproject/vtn/manager/impl/VTNManager.java
+++ b/apps/vtn/vtnmgr/src/main/java/org/onosproject/vtn/manager/impl/VTNManager.java
@@ -413,7 +413,9 @@
         if (type == Objective.Operation.ADD) {
             // Save external port
             Port export = getExPort(device.id());
-            exPortOfDevice.put(device.id(), export);
+            if (export != null) {
+                exPortOfDevice.put(device.id(), export);
+            }
             switchOfLocalHostPorts.put(device.id(), new NetworkOfLocalHostPorts());
         } else if (type == Objective.Operation.REMOVE) {
             exPortOfDevice.remove(device.id());
@@ -777,7 +779,7 @@
         for (RouterInterface r : interfacesSet) {
             // Get all the host of the subnet
             Map<HostId, Host> hosts = hostsOfSubnet.get(r.subnetId());
-            if (hosts.size() > 0) {
+            if (hosts != null && hosts.size() > 0) {
                 subnetVmNum++;
                 if (subnetVmNum >= SUBNET_NUM) {
                     routerInfFlagOfTenant.put(r.tenantId(), true);