summaryrefslogtreecommitdiffstats
path: root/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager
diff options
context:
space:
mode:
authorKrupaNagabhushan <krupa.nagabhushan@est.tech>2022-05-16 16:05:35 +0100
committerMichael Morris <michael.morris@est.tech>2022-05-18 10:40:40 +0000
commitb804b97e06e50e134633a9c3be58f3fb7228756a (patch)
tree8875b59c961a2b4719e90d002d29a27f1959c567 /openecomp-be/backend/openecomp-sdc-vendor-software-product-manager
parentf9498e6ee979e33fcd42b3d54551b19e4ab84a8f (diff)
Onboarded ASD csar included in VF csar
Issue-ID: SDC-4003 Signed-off-by: KrupaNagabhushan <krupa.nagabhushan@est.tech> Change-Id: Ia85f36c8efca2c3a10ce92347fea5cc97dbd972b
Diffstat (limited to 'openecomp-be/backend/openecomp-sdc-vendor-software-product-manager')
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/orchestration/process/OrchestrationTemplateProcessCsarHandler.java11
1 files changed, 6 insertions, 5 deletions
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 817d212fc7..846612e4d0 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
@@ -60,7 +60,8 @@ import java.util.Optional;
public class OrchestrationTemplateProcessCsarHandler implements OrchestrationTemplateProcessHandler {
private static final Logger LOGGER = LoggerFactory.getLogger(OrchestrationTemplateProcessCsarHandler.class);
- private static final String SDC_ONBOARDED_PACKAGE_DIR = "Deployment/" + ArtifactTypeEnum.ETSI_PACKAGE.getType() + "/";
+ private static final String SDC_ONBOARDED_PACKAGE_DIR_ETSI = "Deployment/" + ArtifactTypeEnum.ETSI_PACKAGE.getType() + "/";
+ private static final String SDC_ONBOARDED_PACKAGE_DIR_ASD = "Deployment/" + ArtifactTypeEnum.ASD_PACKAGE.getType() + "/";
private static final String EXT_SEPARATOR = ".";
private final CandidateService candidateService = CandidateServiceFactory.getInstance().createInterface();
private final ToscaTreeManager toscaTreeManager = new ToscaTreeManager();
@@ -152,11 +153,11 @@ public class OrchestrationTemplateProcessCsarHandler implements OrchestrationTem
private void addOriginalOnboardedPackage(final FileContentHandler fileContentHandler, final OrchestrationTemplateCandidateData candidateData) {
if (OnboardingTypesEnum.CSAR.getType().equalsIgnoreCase(candidateData.getFileSuffix())) {
- fileContentHandler
- .addFile(SDC_ONBOARDED_PACKAGE_DIR + candidateData.getOriginalFileName() + EXT_SEPARATOR + candidateData.getOriginalFileSuffix(),
- candidateData.getOriginalFileContentData().array());
+ final String dirPrefix = asdPackageHelper.isAsdPackage(fileContentHandler) ? SDC_ONBOARDED_PACKAGE_DIR_ASD : SDC_ONBOARDED_PACKAGE_DIR_ETSI;
+ fileContentHandler.addFile(dirPrefix + candidateData.getOriginalFileName() + EXT_SEPARATOR + candidateData.getOriginalFileSuffix(),
+ candidateData.getOriginalFileContentData().array());
} else {
- fileContentHandler.addFile(SDC_ONBOARDED_PACKAGE_DIR + candidateData.getFileName() + EXT_SEPARATOR + candidateData.getFileSuffix(),
+ fileContentHandler.addFile(SDC_ONBOARDED_PACKAGE_DIR_ETSI + candidateData.getFileName() + EXT_SEPARATOR + candidateData.getFileSuffix(),
candidateData.getContentData().array());
}
}