Enforce resolutionKey or resourceId/resourceType 00/90700/10
authorAlexis de Talhouët <adetalhouet89@gmail.com>
Sat, 29 Jun 2019 04:28:40 +0000 (00:28 -0400)
committerAlexis de Talhouët <adetalhouet89@gmail.com>
Thu, 4 Jul 2019 19:53:42 +0000 (15:53 -0400)
commit5f0a5dde67bc0e7c99bd8f9e9b7c447e69ce62fa
tree0eb10b1fc86efa62c70114495b599d3701107bb1
parentc48ca03872b11a54cf898c93d4a62ef220f3c55f
Enforce resolutionKey or resourceId/resourceType

There are three existing ways to perform the resolution:

    either we don't store the results at all, whether for resource or template
    either we store using the resolution key. The combination of blueprintName,
       blueprintVersion, artifactName and resolutionKey has to be unique. If it
       is re-used, it is considered as a new attempt for that specific resolution
       request, and process will only try to resolve resources not marked at SUCCESS
       in the database.
    either we store using the resourceId and resourceType. As previous point, the
       combination of blueprintName, blueprintVersion, artifactName and resolutionKey
       has to be unique. If it is re-used, it is considered as a new attempt for that
       specific resolution request, and process will only try to resolve resources not
       marked at SUCCESS in the database.

TBD: add uni tests

Issue-ID: CCSDK-1423
Change-Id: I6b7198453cf0002edfa7a0c9ea3179555211b5dc
Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
17 files changed:
components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/node_types.json
ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorTest.kt
ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponent.kt
ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt
ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolution.kt
ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionDBService.kt
ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionRepository.kt
ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolution.kt
ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolutionRepository.kt
ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolutionService.kt
ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImpl.kt
ms/blueprintsprocessor/modules/inbounds/resource-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/ResolutionException.kt [moved from ms/blueprintsprocessor/modules/inbounds/resource-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/ResourceException.kt with 90% similarity]
ms/blueprintsprocessor/modules/inbounds/resource-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/ResourceController.kt
ms/blueprintsprocessor/modules/inbounds/resource-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/ResourceExceptionHandler.kt
ms/blueprintsprocessor/modules/inbounds/resource-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/TemplateController.kt
ms/blueprintsprocessor/modules/inbounds/resource-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resolutionresults/api/ResourceControllerTest.kt
ms/blueprintsprocessor/modules/inbounds/resource-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/TemplateControllerTest.kt