From 406908c43e35f4ff3f8334d00452048c71d93955 Mon Sep 17 00:00:00 2001 From: "Bonkur, Venkat (vb8416)" Date: Mon, 13 May 2019 03:00:16 -0400 Subject: Add SO native workflows to result list Added native workflows to result list Issue-ID: SO-1852 Signed-off-by: Bonkur, Venkat (vb8416) Change-Id: Ifeb2adf4ea78b191bcf46a1e7367bc0939d53b83 --- .../org/onap/so/apihandlerinfra/WorkflowSpecificationsHandler.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap') diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandler.java index 890b54758e..e8171ac834 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandler.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandler.java @@ -73,6 +73,7 @@ public class WorkflowSpecificationsHandler { private static Logger logger = LoggerFactory.getLogger(WorkflowSpecificationsHandler.class); private static final String ARTIFACT_TYPE_WORKFLOW = "workflow"; + private static final String NATIVE_WORKFLOW = "native"; @Path("/{version:[vV]1}/workflows") @GET @@ -88,6 +89,12 @@ public class WorkflowSpecificationsHandler { mapper1.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); List workflows = catalogDbClient.findWorkflowByModelUUID(vnfModelVersionId); + + List nativeWorkflows = catalogDbClient.findWorkflowBySource(NATIVE_WORKFLOW); + if (nativeWorkflows != null && nativeWorkflows.size() != 0) { + workflows.addAll(nativeWorkflows); + } + WorkflowSpecifications workflowSpecifications = mapWorkflowsToWorkflowSpecifications(workflows); String jsonResponse = null; -- cgit 1.2.3-korg