summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimamSidero <imam.hussain@est.tech>2023-08-01 15:51:23 +0100
committerJEFF VAN DAM <jeff.van.dam@est.tech>2023-08-28 10:15:56 +0000
commite8ea5ff2f9498ff0309d16b4628c29c2b8d345d0 (patch)
tree0db8a8c02314f100ed67a00fceda2cc8693214b0
parent455de07d796e9a1a24b32241e25fb4c1ec09d1cc (diff)
Provide import support for timeout field in interface operation implementation
Support for timeout field is provided in interface operation implementation Issue-ID: SDC-4588 Signed-off-by: Imam hussain <imam.hussain@est.tech> Change-Id: Ia71f272c2760e1cb446a8b7e226a2bb4b193147d
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/csar/YamlTemplateParsingHandler.java7
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InterfaceDefinitionHandler.java7
2 files changed, 14 insertions, 0 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/csar/YamlTemplateParsingHandler.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/csar/YamlTemplateParsingHandler.java
index 2ec342ec24..3b0d19f03c 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/csar/YamlTemplateParsingHandler.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/csar/YamlTemplateParsingHandler.java
@@ -1393,6 +1393,13 @@ public class YamlTemplateParsingHandler {
artifactDataDefinition.setArtifactName(generateArtifactName(primary.toString()));
}
}
+
+ if (operationDefinitionMap.get(IMPLEMENTATION.getElementName()) instanceof Map &&
+ ((Map) operationDefinitionMap.get(IMPLEMENTATION.getElementName())).containsKey("timeout")) {
+ final Object timeOut = ((Map) operationDefinitionMap.get(IMPLEMENTATION.getElementName())).get("timeout");
+ artifactDataDefinition.setTimeout((Integer)timeOut);
+ }
+
if (operationDefinitionMap.get(IMPLEMENTATION.getElementName()) instanceof String) {
final String implementation = (String) operationDefinitionMap.get(IMPLEMENTATION.getElementName());
artifactDataDefinition.setArtifactName(generateArtifactName(implementation));
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InterfaceDefinitionHandler.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InterfaceDefinitionHandler.java
index 04fe9f54b6..4e535eb41b 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InterfaceDefinitionHandler.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InterfaceDefinitionHandler.java
@@ -276,6 +276,13 @@ public class InterfaceDefinitionHandler {
});
}
}
+
+ if (operationDefinitionMap.get(IMPLEMENTATION.getElementName()) instanceof Map &&
+ ((Map) operationDefinitionMap.get(IMPLEMENTATION.getElementName())).containsKey("timeout")) {
+ final Object timeOut = ((Map) operationDefinitionMap.get(IMPLEMENTATION.getElementName())).get("timeout");
+ artifactDataDefinition.setTimeout((Integer)timeOut);
+ }
+
if (operationDefinitionMap.get(IMPLEMENTATION.getElementName()) instanceof String) {
final String implementation = (String) operationDefinitionMap.get(IMPLEMENTATION.getElementName());
artifactDataDefinition.setArtifactName(generateArtifactName(implementation));