diff --git a/openecomp-bdd/features/AbortFunctionality/TestAbort_ForInvalidHeatFile.feature b/openecomp-bdd/features/AbortFunctionality/TestAbort_ForInvalidHeatFile.feature
new file mode 100644
index 0000000..cdfea4f
--- /dev/null
+++ b/openecomp-bdd/features/AbortFunctionality/TestAbort_ForInvalidHeatFile.feature
@@ -0,0 +1,45 @@
+# Copyright © 2016-2018 European Support Limited
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+Feature: Abort Flow
+
+  Background: Init
+    Given I want to create a VLM
+
+  Scenario: Test abort functionality , Check validation data for invalid heat
+    When I want to create a VSP with onboarding type "NetworkPackage"
+    Then I want to make sure this Item has status "Draft"
+
+    When I want to upload a NetworkPackage for this VSP from path "resources/uploads/errorHeat.zip"
+    # abort
+    When I want to delete for path "/vendor-software-products/{item.id}/versions/{item.versionId}/orchestration-template-candidate"
+
+    When I want to get path "/vendor-software-products/{item.id}/versions/{item.versionId}"
+    Then I want to check property "onboardingOrigin" does not exist
+    Then I want to check property "candidateOnboardingOrigin" does not exist
+    Then I want to check property "validationData" does not exist
+
+    When I want to upload a NetworkPackage for this VSP from path "resources/uploads/errorHeat.zip"
+    When I want to process the NetworkPackage file for this VSP
+    # validation data should have been updated as heat is invalid
+    Then I want to get path "/vendor-software-products/{item.id}/versions/{item.versionId}"
+    Then I want to check property "validationData" exists
+
+    # abort - processed invalid file and check validation data
+    When I want to delete for path "/vendor-software-products/{item.id}/versions/{item.versionId}/orchestration-template-candidate"
+
+    When I want to get path "/vendor-software-products/{item.id}/versions/{item.versionId}"
+    Then I want to check property "onboardingOrigin" does not exist
+    Then I want to check property "candidateOnboardingOrigin" does not exist
+    Then I want to check property "validationData" does not exist
diff --git a/openecomp-bdd/features/AbortFunctionality/TestAbort_ForValidHeatFile.feature b/openecomp-bdd/features/AbortFunctionality/TestAbort_ForValidHeatFile.feature
new file mode 100644
index 0000000..3eb0463
--- /dev/null
+++ b/openecomp-bdd/features/AbortFunctionality/TestAbort_ForValidHeatFile.feature
@@ -0,0 +1,30 @@
+# Copyright © 2016-2018 European Support Limited
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+Feature: Abort Flow
+
+  Background: Init
+    Given I want to create a VLM
+
+  Scenario: Test abort functionality for valid heat
+    When I want to create a VSP with onboarding type "NetworkPackage"
+    Then I want to make sure this Item has status "Draft"
+
+    When I want to upload a NetworkPackage for this VSP from path "resources/uploads/BASE_MUX.zip"
+    Then I want to process the NetworkPackage file for this VSP
+
+    When I want to delete for path "/vendor-software-products/{item.id}/versions/{item.versionId}/orchestration-template-candidate"
+    Then I want to get path "/vendor-software-products/{item.id}/versions/{item.versionId}"
+    Then I want to check property "candidateOnboardingOrigin" does not exist
+    Then I want to check property "onboardingOrigin" for value "zip"
\ No newline at end of file
diff --git a/openecomp-bdd/features/AbortFunctionality/TestProperties.feature b/openecomp-bdd/features/AbortFunctionality/TestProperties.feature
new file mode 100644
index 0000000..d268c64
--- /dev/null
+++ b/openecomp-bdd/features/AbortFunctionality/TestProperties.feature
@@ -0,0 +1,33 @@
+# Copyright © 2016-2018 European Support Limited
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+Feature: Abort Flow
+
+  Background: Init
+    Given I want to create a VLM
+
+  Scenario: Create VSP , Upload Network Pacakage and check properties candidateOnboardingOrigin,onboardingOrigin
+    When I want to create a VSP with onboarding type "NetworkPackage"
+    Then I want to make sure this Item has status "Draft"
+
+    When I want to get path "/vendor-software-products/{item.id}/versions/{item.versionId}"
+    Then I want to check property "onboardingOrigin" does not exist
+    Then I want to check property "candidateOnboardingOrigin" does not exist
+
+    When I want to upload a NetworkPackage for this VSP from path "resources/uploads/errorHeat.zip"
+    Then I want to get path "/vendor-software-products/{item.id}/versions/{item.versionId}"
+    Then I want to check property "candidateOnboardingOrigin" exists
+    Then I want to check property "candidateOnboardingOrigin" for value "zip"
+    Then I want to check property "onboardingOrigin" does not exist
+    # Then I want to print the context data
\ No newline at end of file
diff --git a/openecomp-bdd/features/AbortFunctionality/TestRollback.feature b/openecomp-bdd/features/AbortFunctionality/TestRollback.feature
new file mode 100644
index 0000000..50f16e6
--- /dev/null
+++ b/openecomp-bdd/features/AbortFunctionality/TestRollback.feature
@@ -0,0 +1,41 @@
+# Copyright © 2016-2018 European Support Limited
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+Feature: Abort Flow
+
+  Background: Init
+    Given I want to create a VLM
+
+  Scenario: Test rollback. In case abort it should successfully rollback to previously processed service model
+    When I want to create a VSP with onboarding type "NetworkPackage"
+    Then I want to make sure this Item has status "Draft"
+
+    When I want to upload a NetworkPackage for this VSP from path "resources/uploads/BASE_MUX.zip"
+    Then I want to process the NetworkPackage file for this VSP
+
+    When I want to get path "/vendor-software-products/{item.id}/versions/{item.versionId}"
+    Then I want to check property "onboardingOrigin" for value "zip"
+
+    When I want to upload a NetworkPackage for this VSP from path "resources/uploads/errorHeat.zip"
+    Then I want to process the NetworkPackage file for this VSP
+    Then I want to check property "status" for value "Failure"
+
+    When I want to get path "/vendor-software-products/{item.id}/versions/{item.versionId}"
+    Then I want to check property "candidateOnboardingOrigin" for value "zip"
+
+    When I want to delete for path "/vendor-software-products/{item.id}/versions/{item.versionId}/orchestration-template-candidate"
+    # rollback - check whether it rolled back to previous processed file
+    Then I want to get path "/vendor-software-products/{item.id}/versions/{item.versionId}"
+    Then I want to check property "onboardingOrigin" for value "zip"
+    Then I want to check property "candidateOnboardingOrigin" does not exist
diff --git a/openecomp-bdd/features/AbortFunctionality/TestSubmit.feature b/openecomp-bdd/features/AbortFunctionality/TestSubmit.feature
new file mode 100644
index 0000000..f39b95d
--- /dev/null
+++ b/openecomp-bdd/features/AbortFunctionality/TestSubmit.feature
@@ -0,0 +1,35 @@
+# Copyright © 2016-2018 European Support Limited
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+Feature: Abort Flow
+
+  Background: Init
+    Given I want to create a VLM
+
+  Scenario: Test submit if file is just uploaded
+    When I want to create a VSP with onboarding type "NetworkPackage"
+    Then I want to make sure this Item has status "Draft"
+
+    When I want to upload a NetworkPackage for this VSP from path "resources/uploads/BASE_MUX.zip"
+    Then I want the following to fail
+    When I want to submit this VSP
+
+  Scenario: Test submit if invalid file is uploaded and procced for validation
+    When I want to create a VSP with onboarding type "NetworkPackage"
+    Then I want to make sure this Item has status "Draft"
+
+    When I want to upload a NetworkPackage for this VSP from path "resources/uploads/errorHeat.zip"
+    Then I want to process the NetworkPackage file for this VSP
+    Then I want the following to fail
+    When I want to submit this VSP
\ No newline at end of file
diff --git a/openecomp-bdd/stepDefinitions/REST_Steps.js b/openecomp-bdd/stepDefinitions/REST_Steps.js
index 314f868..c384412 100644
--- a/openecomp-bdd/stepDefinitions/REST_Steps.js
+++ b/openecomp-bdd/stepDefinitions/REST_Steps.js
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2016-2017 European Support Limited
+ * Copyright © 2016-2018 European Support Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -45,6 +45,17 @@
 	return util.request(this.context, 'DELETE', path);
 });
 
+/**
+ * @module Rest_Calls
+ * @description makes a DELETE request to the given path and appends the saved property (path is appended after the "onboarding-api/v1.0" prefix)<br>
+ * @exampleFile Example_Rest_Calls.feature
+ * @step I want to delete for path {string} with the value from saved property {string}
+ **/
+When('I want to delete for path {string}', function (string) {
+    let path = getPath(string, this.context);
+    //path += '/' + this.context[string2];
+    return util.request(this.context, 'DELETE', path);
+});
 
 /**
  * @module Rest_Calls
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/OrchestrationTemplateCandidate.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/OrchestrationTemplateCandidate.java
index 4f5e31a..cb3abee 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/OrchestrationTemplateCandidate.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/OrchestrationTemplateCandidate.java
@@ -1,9 +1,6 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
+/*
+ * Copyright © 2016-2018 European Support Limited
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -15,7 +12,6 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- * ============LICENSE_END=========================================================
  */
 
 package org.openecomp.sdcrests.vsp.rest;
@@ -32,6 +28,7 @@
 import javax.validation.Valid;
 import javax.validation.constraints.NotNull;
 import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
 import javax.ws.rs.GET;
 import javax.ws.rs.HeaderParam;
 import javax.ws.rs.POST;
@@ -76,6 +73,14 @@
       @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user)
       throws IOException;
 
+  @DELETE
+  @Path("/")
+  @ApiOperation(value = "Delete orchestration template candidate file and its files data structure")
+  Response abort(
+      @PathParam("vspId") String vspId,
+      @ApiParam(value = "Version Id") @PathParam("versionId") String versionId)
+      throws Exception;
+
   @PUT
   @Path("/process")
   @ApiOperation(value = "process Orchestration Template Candidate",
@@ -106,5 +111,4 @@
       @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
       @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user)
       throws Exception;
-
 }
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/OrchestrationTemplateCandidateImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/OrchestrationTemplateCandidateImpl.java
index e6be1dc..d856cfc 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/OrchestrationTemplateCandidateImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/OrchestrationTemplateCandidateImpl.java
@@ -1,3 +1,19 @@
+/*
+ * Copyright © 2016-2018 European Support Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.openecomp.sdcrests.vsp.rest.services;
 
 import org.apache.commons.beanutils.BeanUtils;
@@ -11,6 +27,8 @@
 import org.openecomp.sdc.common.errors.Messages;
 import org.openecomp.sdc.vendorsoftwareproduct.OrchestrationTemplateCandidateManager;
 import org.openecomp.sdc.vendorsoftwareproduct.OrchestrationTemplateCandidateManagerFactory;
+import org.openecomp.sdc.vendorsoftwareproduct.VendorSoftwareProductManager;
+import org.openecomp.sdc.vendorsoftwareproduct.VspManagerFactory;
 import org.openecomp.sdc.vendorsoftwareproduct.types.OrchestrationTemplateActionResponse;
 import org.openecomp.sdc.vendorsoftwareproduct.types.UploadFileResponse;
 import org.openecomp.sdc.vendorsoftwareproduct.types.ValidationResponse;
@@ -44,6 +62,8 @@
 
   private OrchestrationTemplateCandidateManager candidateManager =
       OrchestrationTemplateCandidateManagerFactory.getInstance().createInterface();
+  private VendorSoftwareProductManager vendorSoftwareProductManager = VspManagerFactory
+      .getInstance().createInterface();
   private ActivityLogManager activityLogManager =
       ActivityLogManagerFactory.getInstance().createInterface();
 
@@ -75,6 +95,12 @@
   }
 
   @Override
+  public Response abort(String vspId, String versionId) throws Exception {
+    candidateManager.abort(vspId, new Version(versionId));
+    return Response.ok().build();
+  }
+
+  @Override
   public Response process(String vspId, String versionId, String user)
       throws InvocationTargetException, IllegalAccessException {
 
@@ -121,6 +147,10 @@
       throws Exception {
     Optional<FilesDataStructure> filesDataStructure =
         candidateManager.getFilesDataStructure(vspId, new Version(versionId));
+    if (!filesDataStructure.isPresent()) {
+      filesDataStructure = vendorSoftwareProductManager.getOrchestrationTemplateStructure(vspId,
+          new Version(versionId));
+    }
 
     FileDataStructureDto fileDataStructureDto =
         filesDataStructure.map(dataStructure -> new MapFilesDataStructureToDto()
@@ -128,4 +158,5 @@
             .orElse(new FileDataStructureDto());
     return Response.ok(fileDataStructureDto).build();
   }
+
 }
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/VendorSoftwareProductsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/VendorSoftwareProductsImpl.java
index 7d1c5e1..09cb094 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/VendorSoftwareProductsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/VendorSoftwareProductsImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2018 European Support Limited
+ * Copyright © 2016-2018 European Support Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -19,7 +19,6 @@
 
 import org.apache.commons.collections4.MapUtils;
 import org.openecomp.core.util.UniqueValueUtil;
-import org.openecomp.core.utilities.orchestration.OnboardingTypesEnum;
 import org.openecomp.sdc.activitylog.ActivityLogManager;
 import org.openecomp.sdc.activitylog.ActivityLogManagerFactory;
 import org.openecomp.sdc.activitylog.dao.type.ActivityLogEntity;
@@ -88,8 +87,6 @@
 import org.springframework.context.annotation.Scope;
 import org.springframework.stereotype.Service;
 
-import javax.inject.Named;
-import javax.ws.rs.core.Response;
 import java.io.File;
 import java.io.IOException;
 import java.util.Collection;
@@ -100,6 +97,8 @@
 import java.util.Objects;
 import java.util.Optional;
 import java.util.function.Predicate;
+import javax.inject.Named;
+import javax.ws.rs.core.Response;
 
 import static javax.ws.rs.core.HttpHeaders.CONTENT_DISPOSITION;
 import static org.openecomp.sdc.itempermissions.notifications.NotificationConstants.PERMISSION_USER;
@@ -112,7 +111,6 @@
 import static org.openecomp.sdc.versioning.VersioningNotificationConstansts.VERSION_ID;
 import static org.openecomp.sdc.versioning.VersioningNotificationConstansts.VERSION_NAME;
 
-
 @Named
 @Service("vendorSoftwareProducts")
 @Scope(value = "prototype")
@@ -591,28 +589,22 @@
   }
 
   private void addNetworkPackageInfo(String vspId, Version version, VspDetailsDto vspDetailsDto) {
-    OrchestrationTemplateEntity orchestrationTemplateInfo =
-        vendorSoftwareProductManager.getOrchestrationTemplateInfo(vspId, version);
-
-    vspDetailsDto.setValidationData(orchestrationTemplateInfo.getValidationDataStructure());
-    vspDetailsDto.setNetworkPackageName(orchestrationTemplateInfo.getFileName());
-    vspDetailsDto.setOnboardingOrigin(orchestrationTemplateInfo.getFileSuffix() == null
-        ? OnboardingTypesEnum.NONE.toString()
-        : orchestrationTemplateInfo.getFileSuffix());
-
     OrchestrationTemplateCandidateData candidateInfo =
         OrchestrationTemplateCandidateManagerFactory.getInstance().createInterface()
             .getInfo(vspId, version);
-
-    //todo - remove after fix missing candidate element
-    if (candidateInfo == null) {
-      candidateInfo = new OrchestrationTemplateCandidateData();
-      candidateInfo.setFileSuffix("zip");
+    if (Objects.nonNull(candidateInfo) && Objects.nonNull(candidateInfo.getFileSuffix())) {
+      vspDetailsDto.setValidationData(candidateInfo.getValidationDataStructure());
+      vspDetailsDto.setNetworkPackageName(candidateInfo.getFileName());
+      vspDetailsDto.setCandidateOnboardingOrigin(candidateInfo.getFileSuffix());
+    } else {
+      OrchestrationTemplateEntity orchestrationTemplateInfo =
+          vendorSoftwareProductManager.getOrchestrationTemplateInfo(vspId, version);
+      if (Objects.nonNull(orchestrationTemplateInfo)) {
+        vspDetailsDto.setValidationData(orchestrationTemplateInfo.getValidationDataStructure());
+        vspDetailsDto.setNetworkPackageName(orchestrationTemplateInfo.getFileName());
+        vspDetailsDto.setOnboardingOrigin(orchestrationTemplateInfo.getFileSuffix());
+      }
     }
-
-    vspDetailsDto.setCandidateOnboardingOrigin(candidateInfo.getFileSuffix() == null
-        ? OnboardingTypesEnum.NONE.toString()
-        : candidateInfo.getFileSuffix());
   }
 
   private boolean userHasPermission(String itemId, String userId) {
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/OrchestrationTemplateCandidateManager.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/OrchestrationTemplateCandidateManager.java
index 84318db..a28e2c8 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/OrchestrationTemplateCandidateManager.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/OrchestrationTemplateCandidateManager.java
@@ -1,9 +1,6 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
+/*
+ * Copyright © 2016-2018 European Support Limited
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -15,7 +12,6 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- * ============LICENSE_END=========================================================
  */
 
 package org.openecomp.sdc.vendorsoftwareproduct;
@@ -46,4 +42,6 @@
   Optional<Pair<String, byte[]>> get(String vspId, Version version) throws IOException;
 
   OrchestrationTemplateCandidateData getInfo(String vspId, Version version);
+
+  void abort(String vspId, Version version);
 }
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/VendorSoftwareProductManager.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/VendorSoftwareProductManager.java
index 2e38122..7528110 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/VendorSoftwareProductManager.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/VendorSoftwareProductManager.java
@@ -1,21 +1,17 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
+/*
+ * Copyright © 2016-2018 European Support Limited
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- * ============LICENSE_END=========================================================
  */
 
 package org.openecomp.sdc.vendorsoftwareproduct;
@@ -27,6 +23,7 @@
 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspDetails;
 import org.openecomp.sdc.vendorsoftwareproduct.types.QuestionnaireResponse;
 import org.openecomp.sdc.vendorsoftwareproduct.types.ValidationResponse;
+import org.openecomp.sdc.vendorsoftwareproduct.types.candidateheat.FilesDataStructure;
 import org.openecomp.sdc.versioning.dao.types.Version;
 
 import java.io.File;
@@ -34,6 +31,7 @@
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
+import java.util.Optional;
 
 public interface VendorSoftwareProductManager {
 
@@ -59,6 +57,7 @@
 
   OrchestrationTemplateEntity getOrchestrationTemplateInfo(String vspId, Version version);
 
+  Optional<FilesDataStructure> getOrchestrationTemplateStructure(String vspId, Version version);
 
   PackageInfo createPackage(String vspId, Version version) throws IOException;
 
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/errors/VendorSoftwareProductInvalidErrorBuilder.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/errors/VendorSoftwareProductInvalidErrorBuilder.java
index ca20d97..c3a2862 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/errors/VendorSoftwareProductInvalidErrorBuilder.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/errors/VendorSoftwareProductInvalidErrorBuilder.java
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2016-2017 European Support Limited
+ * Copyright © 2016-2018 European Support Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -24,8 +24,13 @@
   private static final String VSP_INVALID_MSG =
       "Vendor software product with Id %s and version %s is invalid - does not contain "
           + "service model.";
-  private static final String VSP_INVALID_MISSING_DEPLOYMENT_FLAVOR_MSG = "VSP has to have a " +
-      "minimum of one Deployment Flavor defined for being able to be instantiated.Please add a Deployment Flavor and re-submit the VSP.";
+  private static final String VSP_INVALID_MISSING_DEPLOYMENT_FLAVOR_MSG = "VSP has to have a "
+      + "minimum of one Deployment Flavor defined for being able to be instantiated.Please add a "
+      + "Deployment Flavor and re-submit the VSP.";
+  private static final String CANDIDATE_DATA_NOT_PROCESSED_OR_ABORTED = "Uploaded network package"
+      + " file %s was not processed/aborted.";
+  private static final String INVALID_PROCESSED_CANDIDATE = "Uploaded network package file %s"
+      + " is invalid and need to be aborted";
 
   private VendorSoftwareProductInvalidErrorBuilder() {
 
@@ -60,4 +65,25 @@
     return builder.build();
   }
 
+  public static ErrorCode candidateDataNotProcessedOrAbortedErrorBuilder(String fileName) {
+    ErrorCode.ErrorCodeBuilder builder = getErrorCodeBuilder(VendorSoftwareProductErrorCodes
+        .VSP_INVALID, ErrorCategory.APPLICATION);
+    builder.withMessage(String.format(CANDIDATE_DATA_NOT_PROCESSED_OR_ABORTED, fileName));
+    return builder.build();
+  }
+
+  public static ErrorCode invalidProcessedCandidate(String fileName) {
+    ErrorCode.ErrorCodeBuilder builder = getErrorCodeBuilder(VendorSoftwareProductErrorCodes
+        .VSP_INVALID, ErrorCategory.APPLICATION);
+    builder.withMessage(String.format(INVALID_PROCESSED_CANDIDATE, fileName));
+    return builder.build();
+  }
+
+  public static ErrorCode.ErrorCodeBuilder getErrorCodeBuilder(String errorCode, ErrorCategory
+      errorCategory) {
+    ErrorCode.ErrorCodeBuilder builder = new ErrorCode.ErrorCodeBuilder();
+    builder.withId(errorCode);
+    builder.withCategory(errorCategory);
+    return builder;
+  }
 }
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/OrchestrationTemplateCandidateManagerImpl.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/OrchestrationTemplateCandidateManagerImpl.java
index aa90b5d..97a4a21 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/OrchestrationTemplateCandidateManagerImpl.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/OrchestrationTemplateCandidateManagerImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2016-2017 European Support Limited
+ * Copyright © 2016-2018 European Support Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -63,7 +63,7 @@
 
   public OrchestrationTemplateCandidateManagerImpl(VendorSoftwareProductInfoDao vspInfoDao,
                                                    CandidateService candidateService
-                                             ) {
+  ) {
     this.vspInfoDao = vspInfoDao;
     this.candidateService = candidateService;
   }
@@ -129,8 +129,8 @@
 
     if (!candidateDataEntity.isPresent()) {
       ErrorMessage errorMessage = new ErrorMessage(ErrorLevel.ERROR,
-          getErrorWithParameters(Messages.NO_FILE_WAS_UPLOADED_OR_FILE_NOT_EXIST.getErrorMessage
-              (), ""));
+          getErrorWithParameters(Messages.NO_FILE_WAS_UPLOADED_OR_FILE_NOT_EXIST.getErrorMessage(),
+              ""));
       LOGGER.error(errorMessage.getMessage());
       return Optional.empty();
     }
@@ -157,6 +157,11 @@
     return candidateService.getOrchestrationTemplateCandidateInfo(vspId, version);
   }
 
+  @Override
+  public void abort(String vspId, Version version) {
+    candidateService.deleteOrchestrationTemplateCandidate(vspId, version);
+  }
+
   private Optional<OrchestrationTemplateCandidateData> fetchCandidateDataEntity(
       String vspId, Version version) {
     return Optional
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/VendorSoftwareProductManagerImpl.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/VendorSoftwareProductManagerImpl.java
index 78ce078..cc24873 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/VendorSoftwareProductManagerImpl.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/VendorSoftwareProductManagerImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2016-2017 European Support Limited
+ * Copyright © 2016-2018 European Support Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -44,6 +44,7 @@
 import org.openecomp.sdc.vendorsoftwareproduct.CompositionEntityDataManager;
 import org.openecomp.sdc.vendorsoftwareproduct.CompositionEntityDataManagerFactory;
 import org.openecomp.sdc.vendorsoftwareproduct.ManualVspToscaManager;
+import org.openecomp.sdc.vendorsoftwareproduct.OrchestrationTemplateCandidateManager;
 import org.openecomp.sdc.vendorsoftwareproduct.VendorSoftwareProductConstants;
 import org.openecomp.sdc.vendorsoftwareproduct.VendorSoftwareProductManager;
 import org.openecomp.sdc.vendorsoftwareproduct.dao.ComponentDao;
@@ -63,6 +64,7 @@
 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ImageEntity;
 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.NicEntity;
 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.OnboardingMethod;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.OrchestrationTemplateCandidateData;
 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.OrchestrationTemplateEntity;
 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.PackageInfo;
 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspDetails;
@@ -82,6 +84,7 @@
 import org.openecomp.sdc.vendorsoftwareproduct.types.QuestionnaireResponse;
 import org.openecomp.sdc.vendorsoftwareproduct.types.QuestionnaireValidationResult;
 import org.openecomp.sdc.vendorsoftwareproduct.types.ValidationResponse;
+import org.openecomp.sdc.vendorsoftwareproduct.types.candidateheat.FilesDataStructure;
 import org.openecomp.sdc.vendorsoftwareproduct.types.composition.ComponentComputeAssociation;
 import org.openecomp.sdc.vendorsoftwareproduct.types.composition.CompositionEntityId;
 import org.openecomp.sdc.vendorsoftwareproduct.types.composition.CompositionEntityType;
@@ -114,6 +117,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
+import java.util.Optional;
 import java.util.Set;
 import java.util.zip.ZipInputStream;
 import java.util.zip.ZipOutputStream;
@@ -121,6 +125,7 @@
 public class VendorSoftwareProductManagerImpl implements VendorSoftwareProductManager {
 
   private final OrchestrationTemplateDao orchestrationTemplateDao;
+  private final OrchestrationTemplateCandidateManager orchestrationTemplateCandidateManager;
   private final VendorSoftwareProductInfoDao vspInfoDao;
   private final VendorLicenseFacade vendorLicenseFacade;
   private final ServiceModelDao<ToscaServiceModel, ServiceElement> serviceModelDao;
@@ -137,22 +142,24 @@
   private final ManualVspToscaManager manualVspToscaManager;
 
   public VendorSoftwareProductManagerImpl(
-          OrchestrationTemplateDao orchestrationTemplateDataDao,
-          VendorSoftwareProductInfoDao vspInfoDao,
-          VendorLicenseFacade vendorLicenseFacade,
-          ServiceModelDao<ToscaServiceModel, ServiceElement> serviceModelDao,
-          EnrichedServiceModelDao<ToscaServiceModel, ServiceElement> enrichedServiceModelDao,
-          VendorLicenseArtifactsService licenseArtifactsService,
-          InformationArtifactGenerator informationArtifactGenerator,
-          PackageInfoDao packageInfoDao,
-          DeploymentFlavorDao deploymentFlavorDao,
-          ComponentDao componentDao,
-          ComponentDependencyModelDao componentDependencyModelDao,
-          NicDao nicDao,
-          ComputeDao computeDao,
-          ImageDao imageDao,
-          ManualVspToscaManager manualVspToscaManager) {
+      OrchestrationTemplateDao orchestrationTemplateDataDao,
+      OrchestrationTemplateCandidateManager orchestrationTemplateCandidateManager,
+      VendorSoftwareProductInfoDao vspInfoDao,
+      VendorLicenseFacade vendorLicenseFacade,
+      ServiceModelDao<ToscaServiceModel, ServiceElement> serviceModelDao,
+      EnrichedServiceModelDao<ToscaServiceModel, ServiceElement> enrichedServiceModelDao,
+      VendorLicenseArtifactsService licenseArtifactsService,
+      InformationArtifactGenerator informationArtifactGenerator,
+      PackageInfoDao packageInfoDao,
+      DeploymentFlavorDao deploymentFlavorDao,
+      ComponentDao componentDao,
+      ComponentDependencyModelDao componentDependencyModelDao,
+      NicDao nicDao,
+      ComputeDao computeDao,
+      ImageDao imageDao,
+      ManualVspToscaManager manualVspToscaManager) {
     this.orchestrationTemplateDao = orchestrationTemplateDataDao;
+    this.orchestrationTemplateCandidateManager = orchestrationTemplateCandidateManager;
     this.vspInfoDao = vspInfoDao;
     this.vendorLicenseFacade = vendorLicenseFacade;
     this.serviceModelDao = serviceModelDao;
@@ -170,6 +177,7 @@
 
     registerToVersioning();
   }
+
   private void registerToVersioning() {
     serviceModelDao.registerVersioning(
         VendorSoftwareProductConstants.VENDOR_SOFTWARE_PRODUCT_VERSIONABLE_TYPE);
@@ -177,27 +185,19 @@
         VendorSoftwareProductConstants.VENDOR_SOFTWARE_PRODUCT_VERSIONABLE_TYPE);
   }
 
-
   @Override
   public ValidationResponse validate(String vspId, Version version) throws IOException {
     VspDetails vspDetails = getValidatedVsp(vspId, version);
-    Collection<ComponentDependencyModelEntity> componentDependencies =
-        componentDependencyModelDao.list(new ComponentDependencyModelEntity(vspId, version, null));
-
-    ValidationResponse validationResponse = new ValidationResponse();
-    validationResponse.setQuestionnaireValidationResult(
-        validateQuestionnaire(vspDetails.getId(), vspDetails.getVersion(),
-            vspDetails.getOnboardingMethod()));
-
     List<ErrorCode> vspErrors = new ArrayList<>(validateVspFields(vspDetails));
-    if (validateComponentDependencies(componentDependencies)) {
-      vspErrors
-          .add(ComponentDependencyModelErrorBuilder.getcyclicDependencyComponentErrorBuilder());
-    }
-    if (Objects.nonNull(vspDetails.getOnboardingMethod()) &&
-        OnboardingMethod.Manual.name().equals(vspDetails.getOnboardingMethod())) {
+    ValidationResponse validationResponse = new ValidationResponse();
+    if (Objects.nonNull(vspDetails.getOnboardingMethod())
+        && OnboardingMethod.Manual.name().equals(vspDetails.getOnboardingMethod())) {
       validateManualOnboardingMethod(vspDetails, validationResponse, vspErrors);
     } else {
+      validateOrchestrationTemplateCandidate(validationResponse, vspErrors, vspId, version);
+      if (!validationResponse.isValid()) {
+        return validationResponse;
+      }
       if (vspDetails.getVlmVersion() != null || vspDetails.getLicenseAgreement() != null
           || vspDetails.getFeatureGroups() != null) {
         vspErrors.addAll(validateMandatoryLicenseFields(vspDetails));
@@ -206,20 +206,59 @@
           orchestrationTemplateDao.get(vspId, version);
       ToscaServiceModel serviceModel =
           serviceModelDao.getServiceModel(vspId, vspDetails.getVersion());
-      if (!isOrchestrationTemplateExist(orchestrationTemplate) ||
-          !isServiceModelExist(serviceModel)) {
+      if (!isOrchestrationTemplateExist(orchestrationTemplate)
+          || !isServiceModelExist(serviceModel)) {
         vspErrors.add(VendorSoftwareProductInvalidErrorBuilder
             .vendorSoftwareProductMissingServiceModelErrorBuilder(vspDetails.getId(),
                 vspDetails.getVersion()));
       }
       validationResponse.setUploadDataErrors(validateOrchestrationTemplate(orchestrationTemplate));
     }
+    Collection<ComponentDependencyModelEntity> componentDependencies =
+        componentDependencyModelDao.list(new ComponentDependencyModelEntity(vspId, version, null));
+
+    QuestionnaireValidationResult questionnaireValidationResult = validateQuestionnaire
+        (vspDetails.getId(), vspDetails.getVersion(), vspDetails.getOnboardingMethod());
+
+    if (Objects.nonNull(questionnaireValidationResult)) {
+      if (validationResponse.getQuestionnaireValidationResult() == null || validationResponse
+          .getQuestionnaireValidationResult().getValidationData() == null) {
+        validationResponse.setQuestionnaireValidationResult(questionnaireValidationResult);
+      } else {
+        validationResponse.getQuestionnaireValidationResult().getValidationData().addAll
+            (questionnaireValidationResult.getValidationData());
+      }
+    }
+
+    if (validateComponentDependencies(componentDependencies)) {
+      vspErrors
+          .add(ComponentDependencyModelErrorBuilder.getcyclicDependencyComponentErrorBuilder());
+    }
     validationResponse
         .setVspErrors(vspErrors);
     validationResponse.setLicensingDataErrors(validateLicensingData(vspDetails));
     return validationResponse;
   }
 
+  private void validateOrchestrationTemplateCandidate(ValidationResponse validationResponse,
+                                                      List<ErrorCode> vspErrors, String vspId,
+                                                      Version version) {
+    OrchestrationTemplateCandidateData orchestrationTemplateCandidateData =
+        orchestrationTemplateCandidateManager.getInfo(vspId, version);
+    String validationData = orchestrationTemplateCandidateData.getValidationData();
+    String fileName = orchestrationTemplateCandidateData.getFileName();
+    if (Objects.nonNull(orchestrationTemplateCandidateData.getFileSuffix())) {
+      if (validationData.isEmpty()) {
+        vspErrors.add(VendorSoftwareProductInvalidErrorBuilder
+            .candidateDataNotProcessedOrAbortedErrorBuilder(fileName));
+        validationResponse.setVspErrors(vspErrors);
+      } else {
+        vspErrors.add(VendorSoftwareProductInvalidErrorBuilder.invalidProcessedCandidate(fileName));
+        validationResponse.setVspErrors(vspErrors);
+      }
+    }
+  }
+
   private void validateManualOnboardingMethod(VspDetails vspDetails,
                                               ValidationResponse validationResponse,
                                               List<ErrorCode> vspErrors) {
@@ -236,8 +275,8 @@
     Set<CompositionEntityValidationData> componentValidationResult =
         componentValidation(vspDetails.getId(), vspDetails.getVersion());
     if (!CollectionUtils.isEmpty(componentValidationResult)) {
-      if (validationResponse.getQuestionnaireValidationResult() == null ||
-          validationResponse.getQuestionnaireValidationResult().getValidationData() == null) {
+      if (validationResponse.getQuestionnaireValidationResult() == null
+          || validationResponse.getQuestionnaireValidationResult().getValidationData() == null) {
         validationResponse.setQuestionnaireValidationResult(
             new QuestionnaireValidationResult(componentValidationResult));
       } else {
@@ -588,6 +627,20 @@
   }
 
   @Override
+  public Optional<FilesDataStructure> getOrchestrationTemplateStructure(String vspId,
+                                                                        Version version) {
+    Optional<String> jsonFileDataStructure =
+        orchestrationTemplateDao.getOrchestrationTemplateStructure(vspId, version);
+
+    if (jsonFileDataStructure.isPresent() && JsonUtil.isValidJson(jsonFileDataStructure.get())) {
+      return Optional
+          .of(JsonUtil.json2Object(jsonFileDataStructure.get(), FilesDataStructure.class));
+    } else {
+      return Optional.empty();
+    }
+  }
+
+  @Override
   public PackageInfo createPackage(String vspId, Version version) {
     ToscaServiceModel toscaServiceModel = enrichedServiceModelDao.getServiceModel(vspId, version);
     VspDetails vspDetails = vspInfoDao.get(new VspDetails(vspId, version));
@@ -770,10 +823,10 @@
   }
 
   private boolean isOrchestrationTemplateExist(OrchestrationTemplateEntity orchestrationTemplate) {
-    return orchestrationTemplate != null &&
-        orchestrationTemplate.getContentData() != null &&
-        orchestrationTemplate.getFileSuffix() != null &&
-        orchestrationTemplate.getFileName() != null;
+    return orchestrationTemplate != null
+        && orchestrationTemplate.getContentData() != null
+        && orchestrationTemplate.getFileSuffix() != null
+        && orchestrationTemplate.getFileName() != null;
   }
 
   private boolean isServiceModelExist(ToscaServiceModel serviceModel) {
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/VspManagerFactoryImpl.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/VspManagerFactoryImpl.java
index a2c0aea..4749e7f 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/VspManagerFactoryImpl.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/VspManagerFactoryImpl.java
@@ -1,9 +1,6 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
+/*
+ * Copyright © 2016-2018 European Support Limited
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -15,7 +12,6 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- * ============LICENSE_END=========================================================
  */
 
 package org.openecomp.sdc.vendorsoftwareproduct.impl;
@@ -24,6 +20,7 @@
 import org.openecomp.core.model.dao.ServiceModelDaoFactory;
 import org.openecomp.sdc.vendorlicense.VendorLicenseArtifactServiceFactory;
 import org.openecomp.sdc.vendorlicense.facade.VendorLicenseFacadeFactory;
+import org.openecomp.sdc.vendorsoftwareproduct.OrchestrationTemplateCandidateManagerFactory;
 import org.openecomp.sdc.vendorsoftwareproduct.VendorSoftwareProductManager;
 import org.openecomp.sdc.vendorsoftwareproduct.VspManagerFactory;
 import org.openecomp.sdc.vendorsoftwareproduct.dao.ComponentDaoFactory;
@@ -41,6 +38,7 @@
   private static final VendorSoftwareProductManager INSTANCE =
       new VendorSoftwareProductManagerImpl(
           OrchestrationTemplateDaoFactory.getInstance().createInterface(),
+          OrchestrationTemplateCandidateManagerFactory.getInstance().createInterface(),
           VendorSoftwareProductInfoDaoFactory.getInstance().createInterface(),
           VendorLicenseFacadeFactory.getInstance().createInterface(),
           ServiceModelDaoFactory.getInstance().createInterface(),
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/orchestration/OrchestrationUtil.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/orchestration/OrchestrationUtil.java
index 9031e92..fae8f8b 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/orchestration/OrchestrationUtil.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/orchestration/OrchestrationUtil.java
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2016-2017 European Support Limited
+ * Copyright © 2016-2018 European Support Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -317,6 +317,7 @@
         (String) manifestAsMap.get("name"));
     uploadData.setPackageVersion(Objects.isNull(manifestAsMap.get("version")) ? null :
         (String) manifestAsMap.get("version"));
+    uploadData.setFilesDataStructure(candidateData.getFilesDataStructure());
     orchestrationTemplateDataDao.update(vspDetails.getId(), vspDetails.getVersion(), uploadData);
 
     VspMergeDaoFactory.getInstance().createInterface()
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/orchestration/process/OrchestrationTemplateProcessCsarHandler.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/orchestration/process/OrchestrationTemplateProcessCsarHandler.java
index 1db8875..6365b9e 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/orchestration/process/OrchestrationTemplateProcessCsarHandler.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/orchestration/process/OrchestrationTemplateProcessCsarHandler.java
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2016-2017 European Support Limited
+ * Copyright © 2016-2018 European Support Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -27,6 +27,7 @@
 import org.openecomp.sdc.datatypes.error.ErrorLevel;
 import org.openecomp.sdc.datatypes.error.ErrorMessage;
 import org.openecomp.sdc.heat.datatypes.structure.HeatStructureTree;
+import org.openecomp.sdc.heat.datatypes.structure.ValidationStructureList;
 import org.openecomp.sdc.heat.services.tree.ToscaTreeManager;
 import org.openecomp.sdc.logging.api.Logger;
 import org.openecomp.sdc.logging.api.LoggerFactory;
@@ -97,7 +98,13 @@
                            OrchestrationTemplateActionResponse response) throws IOException {
     response.setFileNames(new ArrayList<>(fileContentHandler.getFileList()));
     Map<String, List<ErrorMessage>> errors = validateCsar(fileContentHandler);
+    toscaTreeManager.createTree();
+
     if (!isValid(errors)) {
+      response.addStructureErrors(errors);
+      toscaTreeManager.addErrors(errors);
+      candidateService.updateValidationData(vspDetails.getId(), vspDetails.getVersion(),
+          new ValidationStructureList(toscaTreeManager.getTree()));
       return;
     }
 
@@ -126,7 +133,8 @@
     orchestrationUtil.saveServiceModel(vspDetails.getId(),
             vspDetails.getVersion(), toscaServiceModel,
         toscaServiceModel);
-
+    candidateService
+        .deleteOrchestrationTemplateCandidate(vspDetails.getId(), vspDetails.getVersion());
   }
 
   private void addFiles(FileContentHandler fileContentHandler) {
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/orchestration/process/OrchestrationTemplateProcessZipHandler.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/orchestration/process/OrchestrationTemplateProcessZipHandler.java
index 9f29d93..f155e45 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/orchestration/process/OrchestrationTemplateProcessZipHandler.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/orchestration/process/OrchestrationTemplateProcessZipHandler.java
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2016-2017 European Support Limited
+ * Copyright © 2016-2018 European Support Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -28,6 +28,7 @@
 import org.openecomp.sdc.datatypes.error.ErrorLevel;
 import org.openecomp.sdc.datatypes.error.ErrorMessage;
 import org.openecomp.sdc.heat.datatypes.structure.HeatStructureTree;
+import org.openecomp.sdc.heat.datatypes.structure.ValidationStructureList;
 import org.openecomp.sdc.logging.api.Logger;
 import org.openecomp.sdc.logging.api.LoggerFactory;
 import org.openecomp.sdc.logging.messages.AuditMessages;
@@ -61,7 +62,6 @@
   private static final Logger LOGGER = LoggerFactory.getLogger(OrchestrationTemplateProcessZipHandler.class);
   private final CandidateService candidateService =
       CandidateServiceFactory.getInstance().createInterface();
-  private static final String VSP_ID = "VSP id";
 
   @Override
   public OrchestrationTemplateActionResponse process(VspDetails vspDetails,
@@ -108,7 +108,12 @@
     }
 
     HeatStructureTree tree = createAndValidateHeatTree(response, fileContentMap);
-
+    Map<String, List<ErrorMessage>> errors = getErrors(response);
+    if (MapUtils.isNotEmpty(errors)) {
+      response.addStructureErrors(errors);
+      candidateService.updateValidationData(vspId, version, new ValidationStructureList(tree));
+      return response;
+    }
     Map<String, String> componentsQuestionnaire = new HashMap<>();
     Map<String, Map<String, String>> componentNicsQuestionnaire = new HashMap<>();
     Map<String, Collection<ComponentMonitoringUploadEntity>> componentMibList = new HashMap<>();
@@ -152,9 +157,18 @@
 
     LOGGER.audit(AuditMessages.AUDIT_MSG + AuditMessages.HEAT_TRANSLATION_COMPLETED + vspId);
     uploadFileResponse.addStructureErrors(uploadErrors);
+    candidateService.deleteOrchestrationTemplateCandidate(vspId, version);
     return response;
   }
 
+  private Map<String, List<ErrorMessage>> getErrors(OrchestrationTemplateActionResponse
+                                                        orchestrationTemplateActionResponse) {
+    Map<String, List<ErrorMessage>> errors =
+        MessageContainerUtil.getMessageByLevel(ErrorLevel.ERROR,
+            orchestrationTemplateActionResponse.getErrors());
+    return MapUtils.isEmpty(errors) ? null : orchestrationTemplateActionResponse.getErrors();
+  }
+
   private HeatStructureTree createAndValidateHeatTree(OrchestrationTemplateActionResponse response,
                                                       FileContentHandler fileContentMap) {
     VendorSoftwareProductUtils.addFileNamesToUploadFileResponse(fileContentMap, response);
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/OrchestrationTemplateCandidateManagerImplTest.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/OrchestrationTemplateCandidateManagerImplTest.java
index 5af3955..e1d58c6 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/OrchestrationTemplateCandidateManagerImplTest.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/OrchestrationTemplateCandidateManagerImplTest.java
@@ -1,3 +1,19 @@
+/*
+ * Copyright © 2016-2018 European Support Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.openecomp.sdc.vendorsoftwareproduct.impl;
 
 import static org.mockito.Matchers.any;
@@ -11,6 +27,7 @@
 import org.mockito.Mockito;
 import org.mockito.MockitoAnnotations;
 import org.openecomp.core.utilities.file.FileUtils;
+import org.openecomp.core.utilities.json.JsonUtil;
 import org.openecomp.core.utilities.orchestration.OnboardingTypesEnum;
 import org.openecomp.sdc.vendorsoftwareproduct.dao.ComponentDao;
 import org.openecomp.sdc.vendorsoftwareproduct.dao.ComponentDependencyModelDao;
@@ -23,6 +40,7 @@
 import org.openecomp.sdc.vendorsoftwareproduct.impl.orchestration.OrchestrationUtil;
 import org.openecomp.sdc.vendorsoftwareproduct.services.filedatastructuremodule.CandidateService;
 import org.openecomp.sdc.vendorsoftwareproduct.types.OrchestrationTemplateActionResponse;
+import org.openecomp.sdc.vendorsoftwareproduct.types.candidateheat.FilesDataStructure;
 import org.openecomp.sdc.vendorsoftwareproduct.types.composition.ComponentData;
 import org.openecomp.sdc.vendorsoftwareproduct.utils.ZipFileUtils;
 import org.openecomp.sdc.versioning.dao.types.Version;
@@ -59,6 +77,8 @@
   private static final String COMPONENT_NAME_3 = "oam_server";
   private static final String COMPONENT_NAME_4 = "ps_server";
 
+  private static final String USER1 = "vspTestUser1";
+
   @Mock
   private VendorSoftwareProductInfoDao vspInfoDaoMock;
   @Mock
@@ -240,6 +260,43 @@
     Assert.assertEquals(componentDependenciesBeforeDelete.size(), 2);
   }
 
+  @Test
+  public void testGetFileDataStructure() {
+    Optional<String> jsonFileDataStructure = Optional.of(new String("{\n" +
+        "  \"modules\": [\n" +
+        "    {\n" +
+        "      \"yaml\": \"hot-mog-0108-bs1271.yml\",\n" +
+        "      \"env\": \"hot-mog-0108-bs1271.env\"\n" +
+        "    }\n" +
+        "  ],\n" +
+        "  \"unassigned\": [],\n" +
+        "  \"artifacts\": [],\n" +
+        "  \"nested\": []\n" +
+        "}"));
+    Optional<FilesDataStructure> filesDataStructureOptional = Optional.of(JsonUtil.json2Object
+        (jsonFileDataStructure.get(), FilesDataStructure.class));
+    doReturn(filesDataStructureOptional).when(candidateServiceMock)
+        .getOrchestrationTemplateCandidateFileDataStructure(VSP_ID, VERSION01);
+    Optional<FilesDataStructure> filesDataStructure = candidateManager.getFilesDataStructure(VSP_ID,
+        VERSION01);
+    assertNotNull(filesDataStructure);
+    assertEquals(filesDataStructureOptional.get().getModules().size(), filesDataStructure.get()
+        .getModules().size());
+    assertEquals(filesDataStructureOptional.get().getModules().get(0).getName(),
+        filesDataStructure.get().getModules().get(0).getName());
+  }
+
+  @Test
+  public void testAbort() {
+
+    Mockito.doNothing().when(candidateServiceMock).deleteOrchestrationTemplateCandidate(VSP_ID,
+        VERSION01);
+    candidateManager.abort(VSP_ID, VERSION01);
+
+    Mockito.verify(candidateServiceMock, Mockito.times(1)).deleteOrchestrationTemplateCandidate
+        (VSP_ID, VERSION01);
+  }
+
   private Map<String, String> getVspInitComponentIdNameInfo() {
     Map<String, String> componentIdNameInfoBeforeProcess = new HashMap<>();
     componentIdNameInfoBeforeProcess.put(COMPONENT_ORIG_ID_1, COMPONENT_NAME_1);
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/VendorSoftwareProductManagerImplTest.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/VendorSoftwareProductManagerImplTest.java
index fd274d0..2e10f13 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/VendorSoftwareProductManagerImplTest.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/VendorSoftwareProductManagerImplTest.java
@@ -1,9 +1,6 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
+/*
+ * Copyright © 2016-2018 European Support Limited
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -15,11 +12,18 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- * ============LICENSE_END=========================================================
  */
 
 package org.openecomp.sdc.vendorsoftwareproduct.impl;
 
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyObject;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.verify;
+
 import org.mockito.ArgumentCaptor;
 import org.mockito.Captor;
 import org.mockito.InjectMocks;
@@ -40,32 +44,31 @@
 import org.openecomp.sdc.common.errors.Messages;
 import org.openecomp.sdc.healing.api.HealingManager;
 import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
-import org.openecomp.sdc.tosca.datatypes.model.CapabilityDefinition;
 import org.openecomp.sdc.vendorlicense.facade.VendorLicenseFacade;
 import org.openecomp.sdc.vendorlicense.licenseartifacts.VendorLicenseArtifactsService;
+import org.openecomp.sdc.vendorsoftwareproduct.CompositionEntityDataManager;
 import org.openecomp.sdc.vendorsoftwareproduct.ManualVspToscaManager;
 import org.openecomp.sdc.vendorsoftwareproduct.MonitoringUploadsManager;
 import org.openecomp.sdc.vendorsoftwareproduct.OrchestrationTemplateCandidateManager;
 import org.openecomp.sdc.vendorsoftwareproduct.VendorSoftwareProductConstants;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.ComponentDependencyModelDao;
 import org.openecomp.sdc.vendorsoftwareproduct.dao.DeploymentFlavorDao;
 import org.openecomp.sdc.vendorsoftwareproduct.dao.OrchestrationTemplateDao;
 import org.openecomp.sdc.vendorsoftwareproduct.dao.PackageInfoDao;
 import org.openecomp.sdc.vendorsoftwareproduct.dao.VendorSoftwareProductInfoDao;
 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.DeploymentFlavorEntity;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.OrchestrationTemplateCandidateData;
 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.OrchestrationTemplateEntity;
 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.PackageInfo;
 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspDetails;
 import org.openecomp.sdc.vendorsoftwareproduct.impl.mock.EnrichmentManagerFactoryImpl;
 import org.openecomp.sdc.vendorsoftwareproduct.informationArtifact.InformationArtifactGenerator;
-import org.openecomp.sdc.vendorsoftwareproduct.CompositionEntityDataManager;
 import org.openecomp.sdc.vendorsoftwareproduct.types.UploadFileResponse;
 import org.openecomp.sdc.vendorsoftwareproduct.types.ValidationResponse;
 import org.openecomp.sdc.vendorsoftwareproduct.types.composition.DeploymentFlavor;
 import org.openecomp.sdc.versioning.VersioningManager;
 import org.openecomp.sdc.versioning.dao.types.Version;
 import org.openecomp.sdc.versioning.dao.types.VersionStatus;
-import org.openecomp.sdc.versioning.errors.EditOnEntityLockedByOtherErrorBuilder;
-import org.openecomp.sdc.versioning.errors.EntityNotExistErrorBuilder;
 import org.openecomp.sdc.versioning.types.VersionInfo;
 import org.openecomp.sdc.versioning.types.VersionableEntityAction;
 import org.testng.Assert;
@@ -84,18 +87,9 @@
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipInputStream;
 
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyObject;
-import static org.mockito.Mockito.doNothing;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.doThrow;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.verify;
-
 
 public class VendorSoftwareProductManagerImplTest {
   private static final String INVALID_VERSION_MSG = "Invalid requested version.";
@@ -142,6 +136,10 @@
   @InjectMocks
   private VendorSoftwareProductManagerImpl vendorSoftwareProductManager;
 
+  @Mock
+  private OrchestrationTemplateCandidateManager orchestrationTemplateCandidateManagerMock;
+  @Mock
+  private ComponentDependencyModelDao componentDependencyModelDao;
   private OrchestrationTemplateCandidateManager candidateManager;
   private MonitoringUploadsManager monitoringUploadsManager;
 
@@ -587,6 +585,59 @@
     assertVSPInWantedLocationInVSPList(id007, 0, USER3);
   }
 */
+  @Test
+  public void testSubmitWithCandidateDataNotProcessed() throws IOException {
+    VspDetails vsp =
+        createVspDetails(VSP_ID, VERSION01, "Vsp1", "Test-vsp", "vendorName", "vlm1Id", "icon",
+            "category", "subCategory", "licenseAgreementId",
+            Collections.singletonList("featureGroupId"));
+    vsp.setOnboardingMethod("NetworkPackage");
+    doReturn(vsp).when(vspInfoDaoMock).get(anyObject());
+
+    OrchestrationTemplateCandidateData orchestrationTemplateCandidateData = new
+        OrchestrationTemplateCandidateData();
+    orchestrationTemplateCandidateData.setFileSuffix("zip");
+    orchestrationTemplateCandidateData.setFilesDataStructure("testdata");
+    orchestrationTemplateCandidateData.setValidationData("");
+    doReturn(orchestrationTemplateCandidateData).when(orchestrationTemplateCandidateManagerMock)
+        .getInfo(VSP_ID, VERSION01);
+    ValidationResponse validationResponse =
+        vendorSoftwareProductManager.validate(VSP_ID, VERSION01);
+    Assert.assertNotNull(validationResponse);
+    Assert.assertFalse(validationResponse.isValid());
+    Assert.assertNotNull(validationResponse.getVspErrors());
+    Assert.assertEquals(validationResponse.getVspErrors().size(), 1);
+
+    verify(versioningManagerMock, never())
+        .submit(VendorSoftwareProductConstants.VENDOR_SOFTWARE_PRODUCT_VERSIONABLE_TYPE, VSP_ID,
+            USER1, null);
+  }
+
+  @Test
+  public void testSubmitWithCandidateProcessedIsInvalid() throws IOException {
+    VspDetails vsp = createVspDetails(VSP_ID, VERSION01, "Vsp1", "Test-VSP", "vendorName",
+        "vl1Id", "icond", "category", "subcategory", "licenseAgreementId", Collections
+            .singletonList("featureGroupId"));
+    vsp.setOnboardingMethod("NetworkPackage");
+    doReturn(vsp).when(vspInfoDaoMock).get(anyObject());
+
+    OrchestrationTemplateCandidateData orchestrationTemplateCandidateData = new
+        OrchestrationTemplateCandidateData();
+    orchestrationTemplateCandidateData.setFileSuffix("zip");
+    orchestrationTemplateCandidateData.setValidationData("Invalid processed data");
+    doReturn(orchestrationTemplateCandidateData).when(orchestrationTemplateCandidateManagerMock)
+        .getInfo(VSP_ID, VERSION01);
+    ValidationResponse validationResponse =
+        vendorSoftwareProductManager.validate(VSP_ID, VERSION01);
+    Assert.assertNotNull(validationResponse);
+    Assert.assertFalse(validationResponse.isValid());
+    Assert.assertNotNull(validationResponse.getVspErrors());
+    Assert.assertEquals(validationResponse.getVspErrors().size(), 1);
+
+    verify(versioningManagerMock, never())
+        .submit(VendorSoftwareProductConstants.VENDOR_SOFTWARE_PRODUCT_VERSIONABLE_TYPE, VSP_ID,
+            USER1, null);
+  }
 
   private void testLegalUpload(String vspId, Version version, InputStream upload, String user) {
     candidateManager.upload(vspId, VERSION01, upload, "zip", "file");
diff --git a/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/model/ElementType.java b/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/model/ElementType.java
index 19d5656..1eb688b 100644
--- a/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/model/ElementType.java
+++ b/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/model/ElementType.java
@@ -1,3 +1,19 @@
+/*
+ * Copyright © 2016-2018 European Support Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.openecomp.sdc.datatypes.model;
 
 public enum ElementType {
@@ -15,8 +31,11 @@
 
   VspModel, NetworkPackage,
   OrchestrationTemplateCandidate, OrchestrationTemplateCandidateContent,
+  OrchestrationTemplateCandidateValidationData,
+  OrchestrationTemplateStructure, OrchestrationTemplate,
+  OrchestrationTemplateValidationData,
   // todo - remove OrchestrationTemplateContent
-  OrchestrationTemplate, OrchestrationTemplateValidationData, OrchestrationTemplateContent,
+  OrchestrationTemplateContent,
   Networks, Network,
   Components, Component, ComponentQuestionnaire, ComponentDependencies, ComponentDependency,
   Nics, Nic, NicQuestionnaire,
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/OrchestrationTemplateCandidateDao.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/OrchestrationTemplateCandidateDao.java
index 3d7c621..9743814 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/OrchestrationTemplateCandidateDao.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/OrchestrationTemplateCandidateDao.java
@@ -1,25 +1,22 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
+/*
+ * Copyright © 2016-2018 European Support Limited
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- * ============LICENSE_END=========================================================
  */
 
 package org.openecomp.sdc.vendorsoftwareproduct.dao;
 
+import org.openecomp.sdc.heat.datatypes.structure.ValidationStructureList;
 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.OrchestrationTemplateCandidateData;
 import org.openecomp.sdc.vendorsoftwareproduct.types.candidateheat.FilesDataStructure;
 import org.openecomp.sdc.versioning.dao.VersionableDao;
@@ -33,10 +30,15 @@
 
   OrchestrationTemplateCandidateData getInfo(String vspId, Version version);
 
+  void delete(String vspId, Version version);
+
   void update(String vspId, Version version, OrchestrationTemplateCandidateData candidateData);
 
   void updateStructure(String vspId, Version version, FilesDataStructure fileDataStructure);
 
   Optional<String> getStructure(String vspId, Version version);
+
+  void updateValidationData(String vspId, Version version, ValidationStructureList
+      validationData);
 }
 
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/OrchestrationTemplateDao.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/OrchestrationTemplateDao.java
index 4d82ed3..ddee436 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/OrchestrationTemplateDao.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/OrchestrationTemplateDao.java
@@ -1,21 +1,17 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
+/*
+ * Copyright © 2016-2018 European Support Limited
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- * ============LICENSE_END=========================================================
  */
 
 package org.openecomp.sdc.vendorsoftwareproduct.dao;
@@ -24,6 +20,8 @@
 import org.openecomp.sdc.versioning.dao.VersionableDao;
 import org.openecomp.sdc.versioning.dao.types.Version;
 
+import java.util.Optional;
+
 public interface OrchestrationTemplateDao extends VersionableDao {
 
   OrchestrationTemplateEntity getInfo(String vspId, Version version);
@@ -31,5 +29,7 @@
   OrchestrationTemplateEntity get(String vspId, Version version);
 
   void update(String vspId, Version version, OrchestrationTemplateEntity uploadData);
+
+  Optional<String> getOrchestrationTemplateStructure(String vspId, Version version);
 }
 
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/OrchestrationTemplateCandidateData.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/OrchestrationTemplateCandidateData.java
index 7b19e86..398d84c 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/OrchestrationTemplateCandidateData.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/OrchestrationTemplateCandidateData.java
@@ -1,5 +1,24 @@
+/*
+ * Copyright © 2016-2018 European Support Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
 
+import org.openecomp.core.utilities.json.JsonUtil;
+import org.openecomp.sdc.heat.datatypes.structure.ValidationStructureList;
+
 import java.nio.ByteBuffer;
 
 public class OrchestrationTemplateCandidateData {
@@ -7,6 +26,7 @@
   private String filesDataStructure;
   private String fileSuffix;
   private String fileName;
+  private String validationData;
 
   public OrchestrationTemplateCandidateData() {
   }
@@ -50,4 +70,22 @@
   public void setFileName(String fileName) {
     this.fileName = fileName;
   }
+
+  public String getValidationData() {
+    return validationData;
+  }
+
+  public void setValidationData(String validationData) {
+    this.validationData = validationData;
+  }
+
+  public ValidationStructureList getValidationDataStructure() {
+    return validationData == null ? null
+        : JsonUtil.json2Object(validationData, ValidationStructureList.class);
+  }
+
+  public void setValidationDataStructure(ValidationStructureList validationData) {
+    this.validationData = validationData == null ? null
+        : JsonUtil.object2Json(validationData);
+  }
 }
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/OrchestrationTemplateEntity.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/OrchestrationTemplateEntity.java
index ef3a4b6..1bbe1b0 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/OrchestrationTemplateEntity.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/OrchestrationTemplateEntity.java
@@ -1,9 +1,6 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
+/*
+ * Copyright © 2016-2018 European Support Limited
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -15,7 +12,6 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- * ============LICENSE_END=========================================================
  */
 
 package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
@@ -38,8 +34,10 @@
   private String packageVersion;
   private String validationData;
   private ByteBuffer contentData;
+  private String filesDataStructure;
 
   public OrchestrationTemplateEntity() {
+    //default constructor implementation is not provided for OrchestrationTemplateEntity
   }
 
   public OrchestrationTemplateEntity(String id, Version version) {
@@ -57,10 +55,12 @@
     return getId();
   }
 
+  @Override
   public String getId() {
     return id;
   }
 
+  @Override
   public void setId(String id) {
     this.id = id;
   }
@@ -132,4 +132,12 @@
   public void setContentData(ByteBuffer contentData) {
     this.contentData = contentData;
   }
+
+  public String getFilesDataStructure() {
+    return filesDataStructure;
+  }
+
+  public void setFilesDataStructure(String filesDataStructure) {
+    this.filesDataStructure = filesDataStructure;
+  }
 }
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/filedatastructuremodule/CandidateService.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/filedatastructuremodule/CandidateService.java
index 08dc908..f3d2916 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/filedatastructuremodule/CandidateService.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/filedatastructuremodule/CandidateService.java
@@ -1,21 +1,17 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
+/*
+ * Copyright © 2016-2018 European Support Limited
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- * ============LICENSE_END=========================================================
  */
 
 package org.openecomp.sdc.vendorsoftwareproduct.services.filedatastructuremodule;
@@ -24,6 +20,7 @@
 import org.openecomp.core.utilities.orchestration.OnboardingTypesEnum;
 import org.openecomp.sdc.datatypes.error.ErrorMessage;
 import org.openecomp.sdc.heat.datatypes.manifest.ManifestContent;
+import org.openecomp.sdc.heat.datatypes.structure.ValidationStructureList;
 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.OrchestrationTemplateCandidateData;
 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspDetails;
 import org.openecomp.sdc.vendorsoftwareproduct.types.CandidateDataEntityTo;
@@ -64,6 +61,8 @@
   OrchestrationTemplateCandidateData getOrchestrationTemplateCandidateInfo(String vspId,
                                                                        Version version);
 
+  void deleteOrchestrationTemplateCandidate(String vspId, Version version);
+
   Optional<ByteArrayInputStream> fetchZipFileByteArrayInputStream(String vspId,
                                                                   OrchestrationTemplateCandidateData candidateDataEntity,
                                                                   String manifest,
@@ -80,4 +79,6 @@
   String createManifest(VspDetails vspDetails, FilesDataStructure structure);
 
   Optional<List<ErrorMessage>> validateFileDataStructure(FilesDataStructure filesDataStructure);
+
+  void updateValidationData(String vspId, Version version, ValidationStructureList validationData);
 }
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/OrchestrationTemplateCandidateDaoZusammenImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/OrchestrationTemplateCandidateDaoZusammenImpl.java
index a0c3fd4..bf592e2 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/OrchestrationTemplateCandidateDaoZusammenImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/OrchestrationTemplateCandidateDaoZusammenImpl.java
@@ -1,3 +1,19 @@
+/*
+ * Copyright © 2016-2018 European Support Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.openecomp.sdc.vendorsoftwareproduct.dao.impl.zusammen;
 
 import com.amdocs.zusammen.adaptor.inbound.api.types.item.Element;
@@ -7,10 +23,10 @@
 import com.amdocs.zusammen.datatypes.item.Action;
 import com.amdocs.zusammen.datatypes.item.ElementContext;
 import com.amdocs.zusammen.utils.fileutils.FileUtils;
-import org.apache.commons.io.IOUtils;
 import org.openecomp.core.utilities.json.JsonUtil;
 import org.openecomp.core.zusammen.api.ZusammenAdaptor;
 import org.openecomp.sdc.datatypes.model.ElementType;
+import org.openecomp.sdc.heat.datatypes.structure.ValidationStructureList;
 import org.openecomp.sdc.logging.api.Logger;
 import org.openecomp.sdc.logging.api.LoggerFactory;
 import org.openecomp.sdc.vendorsoftwareproduct.dao.OrchestrationTemplateCandidateDao;
@@ -19,10 +35,8 @@
 import org.openecomp.sdc.versioning.dao.types.Version;
 
 import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
 import java.nio.ByteBuffer;
-import java.util.Arrays;
+import java.util.Collection;
 import java.util.Optional;
 
 import static org.openecomp.core.zusammen.api.ZusammenUtil.buildStructuralElement;
@@ -36,6 +50,8 @@
 
   private ZusammenAdaptor zusammenAdaptor;
 
+  private static final String EMPTY_DATA = "{}";
+
   public OrchestrationTemplateCandidateDaoZusammenImpl(ZusammenAdaptor zusammenAdaptor) {
     this.zusammenAdaptor = zusammenAdaptor;
   }
@@ -56,25 +72,38 @@
         zusammenAdaptor.getElementByName(context, elementContext, null,
             ElementType.OrchestrationTemplateCandidate.name());
     if (candidateElement.isPresent()) {
-      if (hasEmptyData(candidateElement.get().getData())) {
+      if (VspZusammenUtil.hasEmptyData(candidateElement.get().getData())) {
         return null;
       }
       OrchestrationTemplateCandidateData candidateData = new OrchestrationTemplateCandidateData();
       candidateData.setFilesDataStructure(
           new String(FileUtils.toByteArray(candidateElement.get().getData())));
 
-      Optional<Element> candidateContentElement = zusammenAdaptor
-          .getElementByName(context, elementContext, candidateElement.get().getElementId(),
-              ElementType.OrchestrationTemplateCandidateContent.name());
-
-      if (candidateContentElement.isPresent()) {
-        candidateData.setContentData(
-            ByteBuffer.wrap(FileUtils.toByteArray(candidateContentElement.get().getData())));
-        candidateData.setFileSuffix(candidateContentElement.get().getInfo()
-            .getProperty(InfoPropertyName.FILE_SUFFIX.getVal()));
-        candidateData.setFileName(candidateContentElement.get().getInfo()
-            .getProperty(InfoPropertyName.FILE_NAME.getVal()));
+      Collection<Element> subElements = candidateElement.get().getSubElements();
+      if (subElements.isEmpty()) {
+        return candidateData;
       }
+
+      for (Element element : subElements) {
+        Optional<Element> subElement = zusammenAdaptor.getElement(context,
+            elementContext, element.getElementId().toString());
+
+        if (subElement.get().getInfo().getName()
+            .equals(ElementType.OrchestrationTemplateCandidateContent
+                .name())) {
+          candidateData.setContentData(
+              ByteBuffer.wrap(FileUtils.toByteArray(subElement.get().getData())));
+          candidateData.setFileSuffix(subElement.get().getInfo()
+              .getProperty(InfoPropertyName.FILE_SUFFIX.getVal()));
+          candidateData.setFileName(subElement.get().getInfo()
+              .getProperty(InfoPropertyName.FILE_NAME.getVal()));
+        } else if (subElement.get().getInfo().getName()
+            .equals(ElementType.OrchestrationTemplateCandidateValidationData.name())) {
+          candidateData.setValidationData(new String(FileUtils.toByteArray(subElement
+              .get().getData())));
+        }
+      }
+
       logger
           .info("Finished getting orchestration template for VendorSoftwareProduct id -> " + vspId);
       return candidateData;
@@ -91,22 +120,36 @@
     SessionContext context = createSessionContext();
     ElementContext elementContext = new ElementContext(vspId, version.getId());
 
+    OrchestrationTemplateCandidateData candidateData = new OrchestrationTemplateCandidateData();
+
     Optional<ElementInfo> candidateElement =
         zusammenAdaptor.getElementInfoByName(context, elementContext, null,
             ElementType.OrchestrationTemplateCandidate.name());
+
     if (candidateElement.isPresent()) {
-      OrchestrationTemplateCandidateData candidateData = new OrchestrationTemplateCandidateData();
-
-      Optional<Element> candidateContentElement = zusammenAdaptor
-          .getElementByName(context, elementContext, candidateElement.get().getId(),
-              ElementType.OrchestrationTemplateCandidateContent.name());
-
-      if (candidateContentElement.isPresent()) {
-        candidateData.setFileSuffix(candidateContentElement.get().getInfo()
-            .getProperty(InfoPropertyName.FILE_SUFFIX.getVal()));
-        candidateData.setFileName(candidateContentElement.get().getInfo()
-            .getProperty(InfoPropertyName.FILE_NAME.getVal()));
+      Collection<ElementInfo> subElements = candidateElement.get().getSubElements();
+      if (subElements.isEmpty()) {
+        return candidateData;
       }
+
+      for (ElementInfo elementInfo : subElements) {
+        Optional<Element> subElement = zusammenAdaptor.getElement(context,
+            elementContext, elementInfo.getId().toString());
+
+        if (subElement.get().getInfo().getName().equals(ElementType
+            .OrchestrationTemplateCandidateContent.name())) {
+
+          candidateData.setFileSuffix(subElement.get().getInfo()
+              .getProperty(InfoPropertyName.FILE_SUFFIX.getVal()));
+          candidateData.setFileName(subElement.get().getInfo()
+              .getProperty(InfoPropertyName.FILE_NAME.getVal()));
+        } else if (subElement.get().getInfo().getName().equals(ElementType
+            .OrchestrationTemplateCandidateValidationData.name())) {
+          candidateData.setValidationData(new String(FileUtils.toByteArray(subElement.get()
+              .getData())));
+        }
+      }
+
       logger.info(
           "Finished getting orchestration template info for VendorSoftwareProduct id -> " + vspId);
       return candidateData;
@@ -118,6 +161,30 @@
   }
 
   @Override
+  public void delete(String vspId, Version version) {
+    ByteArrayInputStream emptyData = new ByteArrayInputStream(EMPTY_DATA.getBytes());
+
+    ZusammenElement candidateContentElement =
+        buildStructuralElement(ElementType.OrchestrationTemplateCandidateContent, Action.UPDATE);
+    candidateContentElement.setData(emptyData);
+
+    ZusammenElement validationData = buildStructuralElement(ElementType
+        .OrchestrationTemplateCandidateValidationData, Action.UPDATE);
+    validationData.setData(emptyData);
+
+    ZusammenElement candidateElement =
+        buildStructuralElement(ElementType.OrchestrationTemplateCandidate, Action.UPDATE);
+    candidateElement.setData(emptyData);
+    candidateElement.addSubElement(candidateContentElement);
+    candidateElement.addSubElement(validationData);
+
+    SessionContext context = createSessionContext();
+    ElementContext elementContext = new ElementContext(vspId, version.getId());
+    zusammenAdaptor.saveElement(context, elementContext, candidateElement,
+        "Delete Orchestration Template Candidate Elements's content");
+  }
+
+  @Override
   public void update(String vspId, Version version,
                      OrchestrationTemplateCandidateData candidateData) {
     logger.info("Uploading candidate data entity for VendorSoftwareProduct id -> " + vspId);
@@ -135,8 +202,15 @@
         .addProperty(InfoPropertyName.FILE_SUFFIX.getVal(), candidateData.getFileSuffix());
     candidateContentElement.getInfo()
         .addProperty(InfoPropertyName.FILE_NAME.getVal(), candidateData.getFileName());
-    candidateElement.addSubElement(candidateContentElement);
 
+    ZusammenElement validationData = buildStructuralElement(ElementType
+        .OrchestrationTemplateCandidateValidationData, Action.UPDATE);
+    if (candidateData.getValidationData() != null) {
+      validationData
+          .setData(new ByteArrayInputStream(candidateData.getValidationData().getBytes()));
+    }
+    candidateElement.addSubElement(candidateContentElement);
+    candidateElement.addSubElement(validationData);
     SessionContext context = createSessionContext();
     ElementContext elementContext = new ElementContext(vspId, version.getId());
     zusammenAdaptor.saveElement(context, elementContext, candidateElement,
@@ -145,6 +219,28 @@
         .info("Finished uploading candidate data entity for VendorSoftwareProduct id -> " + vspId);
   }
 
+  @Override
+  public void updateValidationData(String vspId, Version version, ValidationStructureList
+      validationData) {
+    logger.info("Updating validation data of  orchestration template candidate for VSP id -> "
+        + vspId);
+
+    ZusammenElement validationDataElement = buildStructuralElement(ElementType
+        .OrchestrationTemplateCandidateValidationData, Action.UPDATE);
+    validationDataElement.setData(validationData == null ? new ByteArrayInputStream(EMPTY_DATA
+        .getBytes()) : new ByteArrayInputStream(JsonUtil.object2Json(validationData).getBytes()));
+
+    ZusammenElement candidateElement =
+        buildStructuralElement(ElementType.OrchestrationTemplateCandidate, Action.IGNORE);
+    candidateElement.addSubElement(validationDataElement);
+
+    SessionContext context = createSessionContext();
+    ElementContext elementContext = new ElementContext(vspId, version.getId());
+    zusammenAdaptor.saveElement(context, elementContext, candidateElement,
+        "Update Orchestration Template Candidate validation data");
+    logger.info("Finished updating validation data of  orchestration template candidate for VSP "
+        + "id -> " + vspId);
+  }
 
   @Override
   public void updateStructure(String vspId, Version version, FilesDataStructure fileDataStructure) {
@@ -166,40 +262,24 @@
 
   @Override
   public Optional<String> getStructure(String vspId, Version version) {
-    logger
-        .info("Getting orchestration template structure for VendorSoftwareProduct id -> " + vspId);
+    logger.info("Getting orchestration template candidate structure for VendorSoftwareProduct id "
+        + "-> " + vspId);
 
     SessionContext context = createSessionContext();
     ElementContext elementContext = new ElementContext(vspId, version.getId());
 
-    logger.info(
-        "Finished getting orchestration template structure for VendorSoftwareProduct id -> " +
-            vspId);
     Optional<Element> element = zusammenAdaptor.getElementByName(context, elementContext, null,
         ElementType.OrchestrationTemplateCandidate.name());
-    if (element.isPresent()) {
-      if (hasEmptyData(element.get().getData())) {
-        return Optional.empty();
-      }
-      return Optional.of(new String(FileUtils.toByteArray(element.get().getData())));
-    } else {
-      return Optional.empty();
-    }
-  }
 
-  private boolean hasEmptyData(InputStream elementData) {
-    String emptyData = "{}";
-    byte[] byteElementData;
-    try {
-      byteElementData = IOUtils.toByteArray(elementData);
-    } catch (IOException ex) {
-      ex.printStackTrace();
-      return false;
+    if (element.isPresent() && !VspZusammenUtil.isEmpty(element.get().getData())) {
+      return Optional.of(new String(FileUtils.toByteArray(element.get().getData())));
     }
-    if (Arrays.equals(emptyData.getBytes(), byteElementData)) {
-      return true;
-    }
-    return false;
+
+    logger.info(
+        "Finished getting orchestration template candidate structure for VendorSoftwareProduct "
+            + "id -> " + vspId);
+
+    return Optional.empty();
   }
 
   public enum InfoPropertyName {
@@ -209,7 +289,7 @@
     private String val;
 
     InfoPropertyName(String val){
-      this.val=val;
+      this.val = val;
     }
 
     public String getVal() {
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/OrchestrationTemplateDaoZusammenImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/OrchestrationTemplateDaoZusammenImpl.java
index d5e09ac..3b3cdfe 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/OrchestrationTemplateDaoZusammenImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/OrchestrationTemplateDaoZusammenImpl.java
@@ -1,3 +1,19 @@
+/*
+ * Copyright © 2016-2018 European Support Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.openecomp.sdc.vendorsoftwareproduct.dao.impl.zusammen;
 
 import com.amdocs.zusammen.adaptor.inbound.api.types.item.Element;
@@ -7,18 +23,16 @@
 import com.amdocs.zusammen.datatypes.item.Action;
 import com.amdocs.zusammen.datatypes.item.ElementContext;
 import com.amdocs.zusammen.utils.fileutils.FileUtils;
-import org.apache.commons.io.IOUtils;
 import org.openecomp.core.zusammen.api.ZusammenAdaptor;
 import org.openecomp.sdc.datatypes.model.ElementType;
+import org.openecomp.sdc.logging.api.Logger;
+import org.openecomp.sdc.logging.api.LoggerFactory;
 import org.openecomp.sdc.vendorsoftwareproduct.dao.OrchestrationTemplateDao;
 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.OrchestrationTemplateEntity;
 import org.openecomp.sdc.versioning.dao.types.Version;
 
 import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
 import java.nio.ByteBuffer;
-import java.util.Arrays;
 import java.util.Optional;
 
 import static org.openecomp.core.zusammen.api.ZusammenUtil.buildStructuralElement;
@@ -26,6 +40,8 @@
 
 public class OrchestrationTemplateDaoZusammenImpl implements OrchestrationTemplateDao {
 
+  private static final Logger LOGGER = LoggerFactory.getLogger
+      (OrchestrationTemplateDaoZusammenImpl.class);
   private ZusammenAdaptor zusammenAdaptor;
 
   public OrchestrationTemplateDaoZusammenImpl(ZusammenAdaptor zusammenAdaptor) {
@@ -67,7 +83,7 @@
         .setFileSuffix(element.get().getInfo().getProperty(InfoPropertyName.FILE_SUFFIX.getVal()));
     orchestrationTemplate
         .setFileName(element.get().getInfo().getProperty(InfoPropertyName.FILE_NAME.getVal()));
-    if (!hasEmptyData(element.get().getData())) {
+    if (!VspZusammenUtil.hasEmptyData(element.get().getData())) {
       orchestrationTemplate
           .setValidationData(new String(FileUtils.toByteArray(element.get().getData())));
     }
@@ -94,7 +110,7 @@
       return orchestrationTemplate;
     }
 
-    if (!hasEmptyData(orchestrationTemplateElement.get().getData())) {
+    if (!VspZusammenUtil.hasEmptyData(orchestrationTemplateElement.get().getData())) {
       orchestrationTemplate.setContentData(
           ByteBuffer.wrap(FileUtils.toByteArray(orchestrationTemplateElement.get().getData())));
     }
@@ -108,7 +124,7 @@
           .getProperty(InfoPropertyName.FILE_SUFFIX.getVal()));
       orchestrationTemplate.setFileName(validationDataElement.get().getInfo()
           .getProperty(InfoPropertyName.FILE_NAME.getVal()));
-      if (!hasEmptyData(validationDataElement.get().getData())) {
+      if (!VspZusammenUtil.hasEmptyData(validationDataElement.get().getData())) {
         orchestrationTemplate.setValidationData(
             new String(FileUtils.toByteArray(validationDataElement.get().getData())));
       }
@@ -130,32 +146,55 @@
         .addProperty(InfoPropertyName.FILE_SUFFIX.getVal(), orchestrationTemplate.getFileSuffix());
     validationData.getInfo()
         .addProperty(InfoPropertyName.FILE_NAME.getVal(), orchestrationTemplate.getFileName());
-
+    ZusammenElement orchestrationTemplateStructure = buildStructuralElement(ElementType
+        .OrchestrationTemplateStructure, Action.UPDATE);
+    orchestrationTemplateStructure
+        .setData(new ByteArrayInputStream(orchestrationTemplate.getFilesDataStructure()
+            .getBytes()));
     ZusammenElement orchestrationTemplateElement =
         buildStructuralElement(ElementType.OrchestrationTemplate, Action.UPDATE);
     orchestrationTemplateElement
         .setData(new ByteArrayInputStream(orchestrationTemplate.getContentData().array()));
     orchestrationTemplateElement.addSubElement(validationData);
-
+    orchestrationTemplateElement.addSubElement(orchestrationTemplateStructure);
     ZusammenElement vspModel = buildStructuralElement(ElementType.VspModel, Action.IGNORE);
     vspModel.addSubElement(orchestrationTemplateElement);
 
     zusammenAdaptor.saveElement(context, elementContext, vspModel, "Update Orchestration Template");
   }
 
-  private boolean hasEmptyData(InputStream elementData) {
-    String emptyData = "{}";
-    byte[] byteElementData;
-    try {
-      byteElementData = IOUtils.toByteArray(elementData);
-    } catch (IOException ex) {
-      ex.printStackTrace();
-      return false;
+  @Override
+  public Optional<String> getOrchestrationTemplateStructure(String vspId, Version version) {
+    LOGGER.info("Getting orchestration template structure for VendorSoftwareProduct id" +
+        " " + "-> " + vspId);
+
+    SessionContext context = createSessionContext();
+    ElementContext elementContext = new ElementContext(vspId, version.getId());
+
+    Optional<ElementInfo> vspModel = zusammenAdaptor.getElementInfoByName(context, elementContext,
+        null, ElementType.VspModel.name());
+    if (!vspModel.isPresent()) {
+      return Optional.empty();
     }
-    if (Arrays.equals(emptyData.getBytes(), byteElementData)) {
-      return true;
+    Optional<Element> orchestrationTemplateElement = zusammenAdaptor.getElementByName(context,
+        elementContext, vspModel.get().getId(), ElementType.OrchestrationTemplate.name());
+    if (!orchestrationTemplateElement.isPresent()) {
+      return Optional.empty();
     }
-    return false;
+
+    Optional<Element> orchestrationTemplateStructureElement = zusammenAdaptor
+        .getElementByName(context, elementContext,
+            orchestrationTemplateElement.get().getElementId(),
+            ElementType.OrchestrationTemplateStructure.name());
+    if (orchestrationTemplateStructureElement.isPresent() &&
+        !VspZusammenUtil.isEmpty(orchestrationTemplateStructureElement.get().getData())) {
+      return Optional.of(new String(
+          FileUtils.toByteArray(orchestrationTemplateStructureElement.get().getData())));
+    }
+    LOGGER.info("Finished getting orchestration template structure for VendorSoftwareProduct " +
+        "id -> " + vspId);
+
+    return Optional.empty();
   }
 
   private enum InfoPropertyName {
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/VendorSoftwareProductInfoDaoZusammenImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/VendorSoftwareProductInfoDaoZusammenImpl.java
index c6909d8..8d9a8ee 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/VendorSoftwareProductInfoDaoZusammenImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/VendorSoftwareProductInfoDaoZusammenImpl.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright © 2016-2018 European Support Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.openecomp.sdc.vendorsoftwareproduct.dao.impl.zusammen;
 
 import com.amdocs.zusammen.adaptor.inbound.api.types.item.ZusammenElement;
@@ -84,12 +99,13 @@
     ZusammenElement candidateContentElement =
         buildStructuralElement(ElementType.OrchestrationTemplateCandidateContent, Action.CREATE);
     candidateContentElement.setData(emptyData);
-
+    ZusammenElement validationData = buildStructuralElement(ElementType
+        .OrchestrationTemplateCandidateValidationData, Action.CREATE);
     ZusammenElement candidateElement =
         buildStructuralElement(ElementType.OrchestrationTemplateCandidate, Action.CREATE);
     candidateElement.setData(emptyData);
     candidateElement.addSubElement(candidateContentElement);
-
+    candidateElement.addSubElement(validationData);
     zusammenAdaptor.saveElement(context, elementContext, candidateElement,
         "Create Orchestration Template Candidate Elements");
   }
@@ -119,10 +135,15 @@
         buildStructuralElement(ElementType.OrchestrationTemplateValidationData, Action.CREATE);
     validationData.setData(emptyData);
 
+    ZusammenElement orchestrationTemplateStructure = buildStructuralElement(ElementType
+        .OrchestrationTemplateStructure, Action.CREATE);
+    validationData.setData(emptyData);
+
     ZusammenElement orchestrationTemplate =
         buildStructuralElement(ElementType.OrchestrationTemplate, Action.CREATE);
     orchestrationTemplate.setData(emptyData);
     orchestrationTemplate.addSubElement(validationData);
+    orchestrationTemplate.addSubElement(orchestrationTemplateStructure);
 
     return orchestrationTemplate;
   }
@@ -199,7 +220,7 @@
   public boolean isManual(String vspId, Version version) {
     final VspDetails vspDetails = get(new VspDetails(vspId, version));
     if (vspDetails != null && "Manual".equals(vspDetails.getOnboardingMethod())) {
-        return true;
+      return true;
     }
     return false;
   }
@@ -248,6 +269,7 @@
     ON_BOARDING_METHOD("onboardingMethod");
 
     private String value;
+
     InfoPropertyName(String value){
       this.value=value;
     }
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/VspZusammenUtil.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/VspZusammenUtil.java
index b3acaf5..09fd948 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/VspZusammenUtil.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/VspZusammenUtil.java
@@ -1,7 +1,12 @@
 package org.openecomp.sdc.vendorsoftwareproduct.dao.impl.zusammen;
 
 import com.amdocs.zusammen.adaptor.inbound.api.types.item.ZusammenElement;
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang.ArrayUtils;
 
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Arrays;
 import java.util.Objects;
 
 class VspZusammenUtil {
@@ -24,4 +29,31 @@
 
     return head;
   }
+
+  static boolean isEmpty(InputStream elementData) {
+    byte[] byteElementData;
+    if (Objects.isNull(elementData)) {
+      return true;
+    }
+    try {
+      byteElementData = IOUtils.toByteArray(elementData);
+    } catch (IOException e) {
+      return false;
+    }
+    return ArrayUtils.isEmpty(byteElementData);
+  }
+
+  static boolean hasEmptyData(InputStream elementData) {
+    String EMPTY_DATA = "{}";
+    byte[] byteElementData;
+    try {
+      byteElementData = IOUtils.toByteArray(elementData);
+    } catch (IOException ex) {
+      return false;
+    }
+    if (Arrays.equals(EMPTY_DATA.getBytes(), byteElementData)) {
+      return true;
+    }
+    return false;
+  }
 }
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/impl/filedatastructuremodule/CandidateServiceImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/impl/filedatastructuremodule/CandidateServiceImpl.java
index 78723ae..18910e3 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/impl/filedatastructuremodule/CandidateServiceImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/impl/filedatastructuremodule/CandidateServiceImpl.java
@@ -1,21 +1,17 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
+/*
+ * Copyright © 2016-2018 European Support Limited
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- * ============LICENSE_END=========================================================
  */
 
 package org.openecomp.sdc.vendorsoftwareproduct.services.impl.filedatastructuremodule;
@@ -35,6 +31,7 @@
 import org.openecomp.sdc.heat.datatypes.manifest.ManifestContent;
 import org.openecomp.sdc.heat.datatypes.structure.Artifact;
 import org.openecomp.sdc.heat.datatypes.structure.HeatStructureTree;
+import org.openecomp.sdc.heat.datatypes.structure.ValidationStructureList;
 import org.openecomp.sdc.vendorsoftwareproduct.dao.OrchestrationTemplateCandidateDao;
 import org.openecomp.sdc.vendorsoftwareproduct.dao.OrchestrationTemplateCandidateDaoFactory;
 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.OrchestrationTemplateCandidateData;
@@ -136,12 +133,11 @@
         analyzedZipHeatFiles);
     handleOtherResources(tree, usedEnvFiles, structure);
     FilesDataStructure fileDataStructureFromManifest =
-        createFileDataStructureFromManifest(zipContentMap.getFileContent
-            (SdcCommon.MANIFEST_NAME));
+        createFileDataStructureFromManifest(zipContentMap.getFileContent(SdcCommon.MANIFEST_NAME));
     List<String> structureArtifacts = structure.getArtifacts();
     structureArtifacts.addAll(fileDataStructureFromManifest.getArtifacts().stream().filter
         (artifact -> isNotStrctureArtifact(structureArtifacts, artifact))
-        .collect((Collectors.toList())));
+        .collect(Collectors.toList()));
     handleArtifactsFromTree(tree, structure);
 
     return JsonUtil.object2Json(structure);
@@ -167,9 +163,9 @@
           zipContentMap, analyzedZipHeatFiles);
       Set<String> filesDataStructureFiles = getFlatFileNames(filesDataStructure);
       filesDataStructure.getUnassigned().addAll(zipFileList.stream()
-          .filter(fileName -> (!filesDataStructureFiles.contains(fileName) &&
-              !filesDataStructure.getNested().contains(fileName) &&
-              !fileName.equals(SdcCommon.MANIFEST_NAME)))
+          .filter(fileName -> (!filesDataStructureFiles.contains(fileName)
+              && !filesDataStructure.getNested().contains(fileName)
+              && !fileName.equals(SdcCommon.MANIFEST_NAME)))
           .collect(Collectors.toList()));
       dataStructureJson = JsonUtil.object2Json(filesDataStructure);
     } else {
@@ -290,8 +286,7 @@
     for (FileData fileData : data) {
       if (fileData.getType().equals(FileData.Type.HEAT_ENV)) {
         module.setEnv(fileData.getFile());
-      } else if (fileData.getType().equals(FileData.Type.HEAT_VOL))// must be volume
-      {
+      } else if (fileData.getType().equals(FileData.Type.HEAT_VOL)) { // must be volume
         module.setVol(fileData.getFile());
         if (!CollectionUtils.isEmpty(fileData.getData())) {
           FileData volEnv = fileData.getData().get(0);
@@ -432,6 +427,17 @@
     return candidateServiceValidator.validateFileDataStructure(filesDataStructure);
   }
 
+  @Override
+  public void deleteOrchestrationTemplateCandidate(String vspId, Version versionId) {
+    orchestrationTemplateCandidateDao.delete(vspId, versionId);
+  }
+
+  @Override
+  public void updateValidationData(String vspId, Version version, ValidationStructureList
+      validationData) {
+    orchestrationTemplateCandidateDao.updateValidationData(vspId, version, validationData);
+  }
+
   private void writeManifest(String manifest,
                              OnboardingTypesEnum type,
                              ZipOutputStream zos) throws IOException {
