diff options
author | 2018-10-17 15:10:48 +0530 | |
---|---|---|
committer | 2018-10-21 07:25:04 +0000 | |
commit | 5cc93c4c9e4750a4630afa6f4509438ca4925f51 (patch) | |
tree | cdd1c6b89b3a2e39a52be6e391e03fb5723c773a /catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java | |
parent | c4e49e8e97cff5a051415448650d80ecd3207c10 (diff) |
Bugfix - VF workflow artifacts in service csar
1. Added implementation for packing VF workflow
artifacts to service csar
2. Updated the paths of workflow artifacts in
VF csar as agreed
3. Updated the implementation to pack the artifact
only once based on the artifact name
Change-Id: I7ab22153e5a4877e6b727e0eb28831ac4e60894f
Issue-ID: SDC-1845
Signed-off-by: ojasdubey <ojas.dubey@amdocs.com>
Diffstat (limited to 'catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java')
-rw-r--r-- | catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java index 41b29e3517..69c4cec42b 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java @@ -151,7 +151,8 @@ public class ToscaExportHandler { return Either.left(toscaRepresentation); } - public Either<ToscaRepresentation, ToscaError> exportComponentInterface(Component component) { + public Either<ToscaRepresentation, ToscaError> exportComponentInterface(Component component, + boolean isAssociatedResourceComponent) { if (null == DEFAULT_IMPORTS) { log.debug(FAILED_TO_GET_DEFAULT_IMPORTS_CONFIGURATION); return Either.right(ToscaError.GENERAL_ERROR); @@ -160,8 +161,8 @@ public class ToscaExportHandler { ToscaTemplate toscaTemplate = new ToscaTemplate(TOSCA_VERSION); toscaTemplate.setImports(new ArrayList<>(DEFAULT_IMPORTS)); Map<String, ToscaNodeType> nodeTypes = new HashMap<>(); - Either<ToscaTemplate, ToscaError> toscaTemplateRes = convertInterfaceNodeType(new HashMap<>(), component, toscaTemplate, - nodeTypes); + Either<ToscaTemplate, ToscaError> toscaTemplateRes = convertInterfaceNodeType(new HashMap<>(), component, + toscaTemplate, nodeTypes, isAssociatedResourceComponent); if (toscaTemplateRes.isRight()) { return Either.right(toscaTemplateRes.right().value()); } @@ -546,8 +547,10 @@ public class ToscaExportHandler { return convertReqCapAndTypeName(componentsCache, component, toscaNode, nodeTypes, toscaNodeType, dataTypes); } - private Either<ToscaTemplate, ToscaError> convertInterfaceNodeType(Map<String, Component> componentsCache, Component component, ToscaTemplate toscaNode, - Map<String, ToscaNodeType> nodeTypes) { + private Either<ToscaTemplate, ToscaError> convertInterfaceNodeType(Map<String, Component> componentsCache, + Component component, ToscaTemplate toscaNode, + Map<String, ToscaNodeType> nodeTypes, + boolean isAssociatedResourceComponent) { log.debug("start convert node type for {}", component.getUniqueId()); ToscaNodeType toscaNodeType = createNodeType(component); toscaNode.setInterface_types(addInterfaceTypeElement(component)); @@ -561,7 +564,7 @@ public class ToscaExportHandler { List<InputDefinition> inputDef = component.getInputs(); Map<String, ToscaProperty> inputs = new HashMap<>(); - addInterfaceDefinitionElement(component, toscaNodeType); + addInterfaceDefinitionElement(component, toscaNodeType, isAssociatedResourceComponent); if (inputDef != null) { inputDef.forEach(i -> { ToscaProperty property = propertyConvertor.convertProperty(dataTypes, i, false); |