From 0094e13ddec035faf7f80943783943003f12889a Mon Sep 17 00:00:00 2001 From: Oleg Mitsura Date: Thu, 19 May 2022 11:05:13 -0400 Subject: CCSDK-3671 add workflows list for grpc Issue-ID: CCSDK-3671 1. added grpc 'getWorkflows' for BlueprintManagement 2. during CBA upload, the workflows get cached to BLUEPRINT_MODEL.workflows 3. reworked HTTP endpoint to use above "/workflows/blueprint-name/{name}/version/{version}" 4. If CDS is upgraded, with existing CBAs present, fallback by parsing the CBA instead of DB lookup Signed-off-by: Oleg Mitsura Change-Id: I68bebfe23c0b16ea288512f1087bfe1ceef57686 --- .../db/BlueprintProcessorCatalogServiceImplTest.kt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'ms/blueprintsprocessor/modules/commons/db-lib/src/test') diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImplTest.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImplTest.kt index b7b1f78cf..5f1d09578 100644 --- a/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImplTest.kt +++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImplTest.kt @@ -102,10 +102,11 @@ class BlueprintProcessorCatalogServiceImplTest { runBlocking { val file = normalizedFile("./target/blueprints/generated-cba.zip") assertTrue(file.exists(), "couldnt get file ${file.absolutePath}") - val metadata = bluePrintRuntimeService.bluePrintContext().metadata!! + val ctx = bluePrintRuntimeService.bluePrintContext() + val metadata = ctx.metadata!! metadata[BluePrintConstants.PROPERTY_BLUEPRINT_PROCESS_ID] = blueprintId - blueprintsProcessorCatalogService.save(metadata, file) + blueprintsProcessorCatalogService.save(metadata, file, ctx.workflows()!!) } } @@ -114,10 +115,12 @@ class BlueprintProcessorCatalogServiceImplTest { runBlocking { val file = normalizedFile("./target/blueprints/generated-cba.zip") assertTrue(file.exists(), "couldnt get file ${file.absolutePath}") - val metadata = bluePrintRuntimeService.bluePrintContext().metadata!! + + val ctx = bluePrintRuntimeService.bluePrintContext() + val metadata = ctx.metadata!! metadata[BluePrintConstants.PROPERTY_BLUEPRINT_PROCESS_ID] = blueprintId - blueprintsProcessorCatalogService.save(metadata, file) + blueprintsProcessorCatalogService.save(metadata, file, ctx.workflows()!!) blueprintsProcessorCatalogService.get("baseconfiguration", "1.0.0", true) } -- cgit 1.2.3-korg