diff options
author | Serge Simard <serge@agilitae.com> | 2020-05-24 17:14:08 -0400 |
---|---|---|
committer | KAPIL SINGAL <ks220y@att.com> | 2020-05-28 12:20:35 +0000 |
commit | 68eba656d2452a554ec90f6e49a37b17448f6b84 (patch) | |
tree | f82c86df030f096f1a3e5c5aa9e1a67259b4fd81 /ms/blueprintsprocessor/modules/inbounds | |
parent | 7dc2dead4c31886e18c7a43eff25e8f81766b638 (diff) |
REST endpoint for fetching templates resolution results does not expose occurence parameter
Issue-ID: CCSDK-2384
Change-Id: I8a6abfea32c7aacade1e9b3140eeed22fa58b4a9
Signed-off-by: Serge Simard <serge@agilitae.com>
(cherry picked from commit abee5037695a03ea80c2595269e613fc8756f8c0)
Diffstat (limited to 'ms/blueprintsprocessor/modules/inbounds')
-rw-r--r-- | ms/blueprintsprocessor/modules/inbounds/resource-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/TemplateController.kt | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ms/blueprintsprocessor/modules/inbounds/resource-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/TemplateController.kt b/ms/blueprintsprocessor/modules/inbounds/resource-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/TemplateController.kt index 80000d5fc..bd52bfee6 100644 --- a/ms/blueprintsprocessor/modules/inbounds/resource-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/TemplateController.kt +++ b/ms/blueprintsprocessor/modules/inbounds/resource-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/TemplateController.kt @@ -94,7 +94,9 @@ open class TemplateController(private val templateResolutionService: TemplateRes defaultValue = MediaType.TEXT_PLAIN_VALUE, required = true ) - @RequestParam(value = "format", required = false, defaultValue = MediaType.TEXT_PLAIN_VALUE) format: String + @RequestParam(value = "format", required = false, defaultValue = MediaType.TEXT_PLAIN_VALUE) format: String, + @ApiParam(value = "Occurrence of the template resolution (1-n).", required = false) + @RequestParam(value = "occurrence", required = false, defaultValue = "1") occurrence: Int = 1 ): ResponseEntity<String> = runBlocking { @@ -108,7 +110,8 @@ open class TemplateController(private val templateResolutionService: TemplateRes bpName, bpVersion, artifactName, - resolutionKey + resolutionKey, + occurrence ) } else if (resourceType.isNotEmpty() && resourceId.isNotEmpty()) { result = @@ -117,7 +120,8 @@ open class TemplateController(private val templateResolutionService: TemplateRes bpVersion, artifactName, resourceId, - resourceType + resourceType, + occurrence ) } else { throw httpProcessorException(ErrorCatalogCodes.REQUEST_NOT_FOUND, ResourceApiDomains.RESOURCE_API, |