+ IArtifactInfo artifactInfo, String distributionId, String serviceVersion)
+ throws ProcessToscaArtifactsException, InvalidArchiveException {
+ // Get translated artifacts from Babel Service
+ invokeBabelService(modelArtifacts, catalogArtifacts, payload, artifactInfo, distributionId, serviceVersion);
+
+ // Get VNF Catalog artifacts directly from CSAR
+ List<Artifact> csarCatalogArtifacts = getVnfCatalogExtractor().extract(payload, artifactInfo.getArtifactName());
+
+ // Throw an error if VNF Catalog data is present in the Babel payload and directly in the CSAR
+ if (!catalogArtifacts.isEmpty() && !csarCatalogArtifacts.isEmpty()) {
+ logger.error(ModelLoaderMsgs.DUPLICATE_VNFC_DATA_ERROR, artifactInfo.getArtifactName());
+ throw new InvalidArchiveException("CSAR: " + artifactInfo.getArtifactName()
+ + " contains VNF Catalog data in the format of both TOSCA and XML files. Only one format can be used for each CSAR file.");
+ } else if (!csarCatalogArtifacts.isEmpty()) {
+ catalogArtifacts.addAll(csarCatalogArtifacts);
+ }
+ }
+
+ public void invokeBabelService(List<Artifact> modelArtifacts, List<Artifact> catalogArtifacts, byte[] payload,