Certifying mechanism changing structure of csar
[sdc.git] / catalog-be / src / main / java / org / openecomp / sdc / be / components / impl / ArtifactsBusinessLogic.java
index d50ae54..06b4a34 100644 (file)
@@ -377,7 +377,7 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic {
                 return new ByResponseFormatComponentException(error);
             });
         } else {
-            return toscaExportUtils.exportComponent(parent).left().map(toscaRepresentation -> {
+            return toscaExportUtils.exportComponent(parent, checkIfSkipImports(parent.getModel())).left().map(toscaRepresentation -> {
                 log.debug("Tosca yaml exported for component {} ", parent.getUniqueId());
                 return toscaRepresentation.getMainYaml();
             }).right().map(toscaError -> {
@@ -387,6 +387,11 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic {
         }
     }
 
+    private boolean checkIfSkipImports(final String model) {
+        return null != model && !model.equalsIgnoreCase("ETSI SOL001 v2.5.1")
+            && !model.equalsIgnoreCase("AUTOMATION COMPOSITION");
+    }
+
     private Either<ArtifactDefinition, Operation> doAction(String componentId, ComponentTypeEnum componentType, ArtifactOperationInfo operation,
                                                            String artifactId, ArtifactDefinition artifactInfo, String origMd5, String originData,
                                                            String interfaceName, String operationName, AuditingActionEnum auditingAction, User user,