From 1f32a2c10bdd5a39fd93221406b8ac5aaaef88f6 Mon Sep 17 00:00:00 2001 From: "Muthuramalingam, Brinda Santh" Date: Thu, 21 Mar 2019 15:56:38 -0400 Subject: Add workflow output resolution Change-Id: I3d5bb339fd07257e86ada85e4a30040183808848 Issue-ID: CCSDK-1175 Signed-off-by: Muthuramalingam, Brinda Santh --- .../core/service/BluePrintRuntimeServiceTest.kt | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'ms/controllerblueprints/modules/blueprint-core/src/test') diff --git a/ms/controllerblueprints/modules/blueprint-core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt b/ms/controllerblueprints/modules/blueprint-core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt index c0bfd0f5f..dc56b5207 100644 --- a/ms/controllerblueprints/modules/blueprint-core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt +++ b/ms/controllerblueprints/modules/blueprint-core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt @@ -1,6 +1,6 @@ /* * Copyright © 2017-2018 AT&T Intellectual Property. - * Modifications Copyright © 2018 IBM. + * Modifications Copyright © 2018-2019 IBM. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -153,6 +153,20 @@ class BluePrintRuntimeServiceTest { assertNotNull(resolvedJsonNode, "Failed to populate dsl property values") } + @Test + fun `test Resolve Workflow Outputs`() { + log.info("************************ resolvePropertyAssignments **********************") + val bluePrintRuntimeService = getBluePrintRuntimeService() + + val assignmentParams = "{\"ipAddress\": \"127.0.0.1\", \"hostName\": \"vnf-host\"}" + + bluePrintRuntimeService.setNodeTemplateAttributeValue("resource-assignment", "assignment-params", + JacksonUtils.jsonNode(assignmentParams)) + + val resolvedJsonNode = bluePrintRuntimeService.resolveWorkflowOutputs("resource-assignment") + assertNotNull(resolvedJsonNode, "Failed to populate workflow output property values") + } + private fun getBluePrintRuntimeService(): BluePrintRuntimeService> { val blueprintBasePath: String = ("./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration") val blueprintRuntime = BluePrintMetadataUtils.getBluePrintRuntime("1234", blueprintBasePath) -- cgit 1.2.3-korg