From e8ea5ff2f9498ff0309d16b4628c29c2b8d345d0 Mon Sep 17 00:00:00 2001 From: imamSidero Date: Tue, 1 Aug 2023 15:51:23 +0100 Subject: 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 Change-Id: Ia71f272c2760e1cb446a8b7e226a2bb4b193147d --- .../sdc/be/components/csar/YamlTemplateParsingHandler.java | 7 +++++++ .../sdc/be/components/impl/InterfaceDefinitionHandler.java | 7 +++++++ 2 files changed, 14 insertions(+) (limited to 'catalog-be/src') 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)); -- cgit 1.2.3-korg