diff --git a/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-api/pom.xml b/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-api/pom.xml
index 047fe7f..51399fb 100644
--- a/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-api/pom.xml
+++ b/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-api/pom.xml
@@ -65,4 +65,4 @@
         </dependency>
     </dependencies>
 
-</project>
+</project>
\ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-api/src/main/java/org/openecomp/sdc/generator/datatypes/tosca/VspModelInfo.java b/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-api/src/main/java/org/openecomp/sdc/generator/datatypes/tosca/VspModelInfo.java
index 1fb1030..025db1c 100644
--- a/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-api/src/main/java/org/openecomp/sdc/generator/datatypes/tosca/VspModelInfo.java
+++ b/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-api/src/main/java/org/openecomp/sdc/generator/datatypes/tosca/VspModelInfo.java
@@ -55,4 +55,79 @@
   public void setNics(Map<String, List<Nic>> nics) {
     this.nics = nics;
   }
+
+  @Override
+  public int hashCode() {
+    int result = releaseVendor != null ? releaseVendor.hashCode() : 0;
+    result = 31 * result + (components != null ? components.hashCode() : 0);
+    result = 31 * result + (allowedFlavors != null ? allowedFlavors.hashCode() : 0);
+    result = 31 * result + (multiFlavorVfcImages != null ? multiFlavorVfcImages.hashCode() : 0);
+    result = 31 * result + (nics != null ? nics.hashCode() : 0);
+    return result;
+  }
+
+  @Override
+  public String toString() {
+    return "VspModelInfo{"
+       + "releaseVendor='" + releaseVendor + '\''
+       + ", components=" + components
+       + ", allowedFlavors=" + allowedFlavors
+       + ", multiFlavorVfcImages=" + multiFlavorVfcImages
+       + ", nics=" + nics
+       + '}';
+  }
+
+  @Override
+  public boolean equals(Object obj) {
+    if (this == obj) {
+      return true;
+    }
+    if (getClass() != obj.getClass()) {
+      return false;
+    }
+    VspModelInfo other = (VspModelInfo) obj;
+    if (this.releaseVendor == null) {
+      if (other.releaseVendor != null) {
+        return false;
+      }
+    } else if (!releaseVendor.equals(other.releaseVendor)) {
+      return false;
+    }
+    if (this.components == null) {
+      if (other.components != null) {
+        return false;
+      }
+    } else if (!components.equals(other.components)) {
+      return false;
+    }
+    if (this.allowedFlavors == null) {
+      if (other.allowedFlavors != null) {
+        return false;
+      }
+    } else if (!allowedFlavors.equals(other.allowedFlavors)) {
+      return false;
+    }
+    if (this.multiFlavorVfcImages == null) {
+      if (other.multiFlavorVfcImages != null) {
+        return false;
+      }
+    } else if (!multiFlavorVfcImages.equals(other.multiFlavorVfcImages)) {
+      return false;
+    }
+    if (this.multiFlavorVfcImages == null) {
+      if (other.multiFlavorVfcImages != null) {
+        return false;
+      }
+    } else if (!multiFlavorVfcImages.equals(other.multiFlavorVfcImages)) {
+      return false;
+    }
+    if (this.nics == null) {
+      if (other.nics != null) {
+        return false;
+      }
+    } else if (!nics.equals(other.nics)) {
+      return false;
+    }
+    return true;
+  }
 }
diff --git a/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-api/src/main/java/org/openecomp/sdc/generator/util/GeneratorConstants.java b/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-api/src/main/java/org/openecomp/sdc/generator/util/GeneratorConstants.java
index b24a85d..5464627 100644
--- a/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-api/src/main/java/org/openecomp/sdc/generator/util/GeneratorConstants.java
+++ b/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-api/src/main/java/org/openecomp/sdc/generator/util/GeneratorConstants.java
@@ -5,9 +5,10 @@
   public static final String IMAGES_PROPERTY = "images";
   public static final String RELEASE_VENDOR = "releaseVendor";
   public static final String VNF_CONFIG_NODE_TEMPLATE_ID_SUFFIX = "_VNF_Configuration";
-  public static final String VFC_NODE_TEMPLATE_ID_SUFFIX = "_VFC";
   public static final String VNF_NODE_TEMPLATE_ID_SUFFIX = "_VNF";
-  public static final String PORT_NODE_TEMPLATE_ID_SUFFIX = "_wan_port";
+  public static final String PORT_TYPE_INTERNAL_NODE_TEMPLATE_SUFFIX = "_lan";
+  public static final String PORT_TYPE_EXTERNAL_NODE_TEMPLATE_SUFFIX = "_wan";
+  public static final String PORT_NODE_TEMPLATE_ID_SUFFIX = "_port";
 
   public static final String TOSCA_SERVICE_TEMPLATE_FILE_NAME_SUFFIX = "ServiceTemplate.yaml";
 
diff --git a/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-core/src/main/java/org/openecomp/sdc/generator/core/services/ManualVspToscaGenerationService.java b/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-core/src/main/java/org/openecomp/sdc/generator/core/services/ManualVspToscaGenerationService.java
index 6d488c0..6ec7bfc 100644
--- a/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-core/src/main/java/org/openecomp/sdc/generator/core/services/ManualVspToscaGenerationService.java
+++ b/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-core/src/main/java/org/openecomp/sdc/generator/core/services/ManualVspToscaGenerationService.java
@@ -9,9 +9,10 @@
 import static org.openecomp.sdc.generator.util.GeneratorConstants.NUM_CPUS;
 import static org.openecomp.sdc.generator.util.GeneratorConstants.NUM_CPUS_PROP_DESC_PREFIX;
 import static org.openecomp.sdc.generator.util.GeneratorConstants.PORT_NODE_TEMPLATE_ID_SUFFIX;
+import static org.openecomp.sdc.generator.util.GeneratorConstants.PORT_TYPE_EXTERNAL_NODE_TEMPLATE_SUFFIX;
+import static org.openecomp.sdc.generator.util.GeneratorConstants.PORT_TYPE_INTERNAL_NODE_TEMPLATE_SUFFIX;
 import static org.openecomp.sdc.generator.util.GeneratorConstants.RELEASE_VENDOR;
 import static org.openecomp.sdc.generator.util.GeneratorConstants.TOSCA_SERVICE_TEMPLATE_FILE_NAME_SUFFIX;
-import static org.openecomp.sdc.generator.util.GeneratorConstants.VFC_NODE_TEMPLATE_ID_SUFFIX;
 import static org.openecomp.sdc.generator.util.GeneratorConstants.VNF_CONFIG_NODE_TEMPLATE_ID_SUFFIX;
 import static org.openecomp.sdc.generator.util.GeneratorConstants.VNF_NODE_TEMPLATE_ID_SUFFIX;
 
@@ -36,6 +37,7 @@
 import org.openecomp.sdc.tosca.services.impl.ToscaAnalyzerServiceImpl;
 import org.openecomp.sdc.translator.services.heattotosca.Constants;
 import org.openecomp.sdc.translator.services.heattotosca.globaltypes.GlobalTypesGenerator;
+import org.openecomp.sdc.vendorsoftwareproduct.types.composition.NetworkType;
 import org.openecomp.sdc.vendorsoftwareproduct.types.composition.Nic;
 
 import java.util.ArrayList;
@@ -118,8 +120,7 @@
       // May be need to revisited for supporting multiple components
       String componentId = components.entrySet().iterator().next().getKey();
       createVnfConfigurationNodeTemplate(mainServiceTemplate, vspModelInfo);
-      createComponentNodeTemplate(mainServiceTemplate, vspModelInfo, componentId);
-      createVnfNodeTemplate(mainServiceTemplate, vspModelInfo);
+      createVnfNodeTemplate(mainServiceTemplate, vspModelInfo, componentId);
     }
     return mainServiceTemplate;
   }
@@ -141,42 +142,16 @@
     }
   }
 
-  private void createComponentNodeTemplate(ServiceTemplate mainServiceTemplate,
-                                                  VspModelInfo vspModelInfo,
-                                                  String componentId) {
-    Optional<String> componentName = getComponentNameFromVspModel(vspModelInfo);
-    if (componentName.isPresent()) {
-      NodeTemplate vfcNodeTemplate = new NodeTemplate();
-      vfcNodeTemplate.setType(ToscaNodeType.MULTIFLAVOR_VFC_NODE_TYPE);
-      Map<String, Object> properties = new LinkedHashMap<>();
-      if (MapUtils.isNotEmpty(vspModelInfo.getMultiFlavorVfcImages())) {
-        List<MultiFlavorVfcImage> componentImages =
-            vspModelInfo.getMultiFlavorVfcImages().get(componentId);
-        Map<String, MultiFlavorVfcImage> vfcImages = new HashMap<>();
-        for (MultiFlavorVfcImage image : componentImages) {
-          vfcImages.put(image.getSoftware_version(), image);
-        }
-        properties.put(IMAGES_PROPERTY, vfcImages);
-        vfcNodeTemplate.setProperties(properties);
-      }
-      String nodeTemplateId = componentName.get() + VFC_NODE_TEMPLATE_ID_SUFFIX;
-      DataModelUtil.addNodeTemplate(mainServiceTemplate, nodeTemplateId,
-          vfcNodeTemplate);
-    }
-  }
-
   private void createVnfNodeTemplate(ServiceTemplate mainServiceTemplate,
-                                      VspModelInfo vspModelInfo) {
+                                     VspModelInfo vspModelInfo, String componentId) {
     Optional<String> componentName = getComponentNameFromVspModel(vspModelInfo);
     if (componentName.isPresent()) {
       NodeTemplate vnfNodeTemplate = new NodeTemplate();
-      String vnfNodeTemplateType =
-          ToscaNodeType.MULTIDEPLOYMENTFLAVOR_NODE_TYPE + "." + componentName.get();
-      vnfNodeTemplate.setType(vnfNodeTemplateType);
+      vnfNodeTemplate.setType(ToscaNodeType.MULTIDEPLOYMENTFLAVOR_NODE_TYPE);
       List<String> directiveList = new ArrayList<>();
       directiveList.add(ToscaConstants.NODE_TEMPLATE_DIRECTIVE_SUBSTITUTABLE);
       vnfNodeTemplate.setDirectives(directiveList);
-      vnfNodeTemplate.setProperties(new LinkedHashMap<>());
+      vnfNodeTemplate.setProperties(getVnfNodeTemplateProperties(vspModelInfo, componentId));
       DataModelUtil
           .addSubstitutionFilteringProperty(getSubstitutionServiceTemplateFileName(componentName
                   .get()), vnfNodeTemplate, 1);
@@ -186,10 +161,28 @@
       String nodeTemplateId = componentName.get() + VNF_NODE_TEMPLATE_ID_SUFFIX;
       DataModelUtil.addNodeTemplate(mainServiceTemplate, nodeTemplateId,
           vnfNodeTemplate);
-      abstractSubstitutionIdTypes.put(componentName.get(), vnfNodeTemplateType);
+      abstractSubstitutionIdTypes.put(componentName.get(), ToscaNodeType
+          .MULTIDEPLOYMENTFLAVOR_NODE_TYPE);
     }
   }
 
+  private Map<String, Object> getVnfNodeTemplateProperties(VspModelInfo vspModelInfo,
+                                                           String componentId) {
+    Map<String, Object> properties = new LinkedHashMap<>();
+    if (MapUtils.isNotEmpty(vspModelInfo.getMultiFlavorVfcImages())) {
+      List<MultiFlavorVfcImage> componentImages =
+          vspModelInfo.getMultiFlavorVfcImages().get(componentId);
+      if (Objects.nonNull(componentImages)) {
+        Map<String, MultiFlavorVfcImage> vfcImages = new HashMap<>();
+        componentImages.stream()
+            .forEach(multiFlavorVfcImage ->
+                vfcImages.put(multiFlavorVfcImage.getSoftware_version(), multiFlavorVfcImage));
+        properties.put(IMAGES_PROPERTY, vfcImages);
+      }
+    }
+    return properties;
+  }
+
   private String getSubstitutionServiceTemplateFileName(String componentName) {
     return componentName + TOSCA_SERVICE_TEMPLATE_FILE_NAME_SUFFIX;
   }
@@ -276,7 +269,7 @@
             nicNodeTemplate.setType(ToscaNodeType.NETWORK_PORT);
             DataModelUtil.addBindingReqFromPortToCompute(componentNodeTemplateId, nicNodeTemplate);
             DataModelUtil.addNodeTemplate(substitutionServiceTemplate,
-                getNicNodeTemplateId(nic.getName()), nicNodeTemplate);
+                getNicNodeTemplateId(nic.getName(), nic.getNetworkType()), nicNodeTemplate);
           }
         }
       }
@@ -288,9 +281,14 @@
     return componentName;
   }
 
-  private String getNicNodeTemplateId(String nicName) {
+  private String getNicNodeTemplateId(String nicName, NetworkType nicNetworkType) {
     StringBuilder builder = new StringBuilder();
     builder.append(nicName);
+    if (nicNetworkType == NetworkType.External) {
+      builder.append(PORT_TYPE_EXTERNAL_NODE_TEMPLATE_SUFFIX);
+    } else if (nicNetworkType == NetworkType.Internal) {
+      builder.append(PORT_TYPE_INTERNAL_NODE_TEMPLATE_SUFFIX);
+    }
     builder.append(PORT_NODE_TEMPLATE_ID_SUFFIX);
     return builder.toString();
   }
@@ -337,7 +335,6 @@
         createGlobalSubstitutionNodeType(substitutionServiceTemplate, componentName);
     DataModelUtil.addNodeType(globalSubstitutionServiceTemplate, substitutionNodeTypeId,
         substitutionNodeType);
-
     Map<String, Map<String, List<String>>> substitutionMapping =
         GeneratorUtils.getSubstitutionNodeTypeExposedConnectionPoints(substitutionNodeType,
             substitutionServiceTemplate, toscaServiceModel);
@@ -379,7 +376,7 @@
                                                 String componentName) {
     NodeType substitutionNodeType = new ToscaAnalyzerServiceImpl()
         .createInitSubstitutionNodeType(substitutionServiceTemplate,
-            ToscaNodeType.VFC_ABSTRACT_SUBSTITUTE);
+            ToscaNodeType.MULTIFLAVOR_VFC_NODE_TYPE);
     substitutionNodeType.setProperties(
         getManualVspSubstitutionNodeTypeProperties(substitutionNodeType, componentName));
     return substitutionNodeType;
diff --git a/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-core/src/main/java/org/openecomp/sdc/generator/core/utils/GeneratorUtils.java b/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-core/src/main/java/org/openecomp/sdc/generator/core/utils/GeneratorUtils.java
index c13997b..59b06ba 100644
--- a/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-core/src/main/java/org/openecomp/sdc/generator/core/utils/GeneratorUtils.java
+++ b/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-core/src/main/java/org/openecomp/sdc/generator/core/utils/GeneratorUtils.java
@@ -163,8 +163,8 @@
     } catch (Exception ex) {
       MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_API,
           LoggerTragetServiceName.GENERATE_MANUAL_VSP_TOSCA, ErrorLevel.INFO.name(),
-          LoggerErrorCode.DATA_ERROR.getErrorCode(), "Error occured in get node type exposed "
-              + "points");
+          LoggerErrorCode.DATA_ERROR.getErrorCode(),
+          "Error occured in get node type exposed points : " + ex.getMessage());
       return null;
     }
     return substitutionMapping;
