summaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-be/src/main/java')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/tosca/InterfacesOperationsConverter.java16
1 files changed, 13 insertions, 3 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/InterfacesOperationsConverter.java b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/InterfacesOperationsConverter.java
index cce0ad19a3..f4624b1649 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/InterfacesOperationsConverter.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/InterfacesOperationsConverter.java
@@ -321,6 +321,10 @@ public class InterfacesOperationsConverter {
if (isArtifactPresent(operationDataDefinition)) {
final String operationArtifactPath =
OperationArtifactUtil.createOperationArtifactPath(component, componentInstance, operationDataDefinition, isAssociatedComponent);
+ final ToscaInterfaceOperationImplementation toscaInterfaceOperationImplementation = new ToscaInterfaceOperationImplementation();
+ if (implementation.getTimeout() != null && implementation.getTimeout() > 0) {
+ toscaInterfaceOperationImplementation.setTimeout(implementation.getTimeout());
+ }
if (implementation.getArtifactType() != null) {
final ToscaArtifactDefinition toscaArtifactDefinition = new ToscaArtifactDefinition();
toscaArtifactDefinition.setFile(operationArtifactPath);
@@ -331,12 +335,18 @@ public class InterfacesOperationsConverter {
if (MapUtils.isNotEmpty(propertiesMap)) {
toscaArtifactDefinition.setProperties(propertiesMap);
}
- final ToscaInterfaceOperationImplementation toscaInterfaceOperationImplementation = new ToscaInterfaceOperationImplementation();
toscaInterfaceOperationImplementation.setPrimary(toscaArtifactDefinition);
toscaOperation.setImplementation(toscaInterfaceOperationImplementation);
} else {
- toscaOperation.setImplementation(
- StringUtils.isBlank(operationArtifactPath) || "null".equals(operationArtifactPath) ? null : operationArtifactPath);
+ if (toscaInterfaceOperationImplementation.getTimeout() != null) {
+ final ToscaArtifactDefinition toscaArtifactDefinition = new ToscaArtifactDefinition();
+ toscaArtifactDefinition.setFile(StringUtils.isBlank(operationArtifactPath) || "null".equals(operationArtifactPath) ? null : operationArtifactPath);
+ toscaInterfaceOperationImplementation.setPrimary(toscaArtifactDefinition);
+ toscaOperation.setImplementation(toscaInterfaceOperationImplementation);
+ } else {
+ toscaOperation.setImplementation(
+ StringUtils.isBlank(operationArtifactPath) || "null".equals(operationArtifactPath) ? null : operationArtifactPath);
+ }
}
}
}