diff options
3 files changed, 18 insertions, 5 deletions
diff --git a/catalog-be/src/main/docker/backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb b/catalog-be/src/main/docker/backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb index aa4c8c4f6a..b0cb7ddec5 100644 --- a/catalog-be/src/main/docker/backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb +++ b/catalog-be/src/main/docker/backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb @@ -613,6 +613,17 @@ artifacts: acceptedTypes: - csar - zip + - type: ASD_PACKAGE + categories: + - DEPLOYMENT + componentTypes: + - RESOURCE + resourceTypes: + - VF + - PNF + acceptedTypes: + - csar + - zip - type: HEAT_ENV categories: - DEPLOYMENT diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/api/ArtifactTypeEnum.java b/common-app-api/src/main/java/org/openecomp/sdc/common/api/ArtifactTypeEnum.java index 6be6c7f048..6cb17e8116 100644 --- a/common-app-api/src/main/java/org/openecomp/sdc/common/api/ArtifactTypeEnum.java +++ b/common-app-api/src/main/java/org/openecomp/sdc/common/api/ArtifactTypeEnum.java @@ -58,6 +58,7 @@ public enum ArtifactTypeEnum { DCAE_TOSCA("DCAE_TOSCA"), DG_XML("DG_XML"), ETSI_PACKAGE("ETSI_PACKAGE"), + ASD_PACKAGE("ASD_PACKAGE"), GUIDE("GUIDE"), HEAT_ARTIFACT("HEAT_ARTIFACT"), HEAT_ENV("HEAT_ENV"), 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()); } } |