diff options
author | Prudence Au <prudence.au@amdocs.com> | 2021-05-12 13:23:29 -0400 |
---|---|---|
committer | Prudence Au <prudence.au@amdocs.com> | 2021-05-13 19:47:11 -0400 |
commit | 4cfbc764a37018f98d849654e2d5b94155ec85b6 (patch) | |
tree | 6dc305c4002ed8478f194813c9abb471da1a8658 /ms/blueprintsprocessor/functions/resource-resolution/src | |
parent | 13598d2a6134e417d9fdf2d199aa83ba86fa0218 (diff) |
Add MS SQL driver in CDS blueprints and
DB resolution fails on an empty dataset with required template mapping.
Issue-ID: CCSDK-3293
Issue-ID: CCSDK-3294
Signed-off-by: Prudence Au <prudence.au@amdocs.com>
Change-Id: I9f302d12e7359b62180fcdfddbd8ae2c993a8324
Diffstat (limited to 'ms/blueprintsprocessor/functions/resource-resolution/src')
-rw-r--r-- | ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceAssignmentProcessor.kt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceAssignmentProcessor.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceAssignmentProcessor.kt index db5307f17..114b5b889 100644 --- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceAssignmentProcessor.kt +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceAssignmentProcessor.kt @@ -112,11 +112,11 @@ open class DatabaseResourceAssignmentProcessor( val jdbcTemplate = blueprintDBLibService(sourceProperties, dSource) val rows = jdbcTemplate.query(sql, populateNamedParameter(inputKeyMapping)) - if (rows.isNullOrEmpty()) { - logger.warn("Failed to get $dSource result for dictionary name ($dName) the query ($sql)") - } else { - populateResource(resourceAssignment, sourceProperties, rows) + if (rows.isEmpty()) { + logger.warn("Emptyset from dictionary-source($dSource) for dictionary name ($dName) the query ($sql).") } + logger.debug("Query returned ${rows.size} values") + populateResource(resourceAssignment, sourceProperties, rows) } private fun blueprintDBLibService(sourceProperties: DatabaseResourceSource, selector: String): BlueprintDBLibGenericService { |