diff options
author | Dan Timoney <dtimoney@att.com> | 2019-11-18 14:29:21 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-11-18 14:29:21 +0000 |
commit | 1dd0c293d8a076d0c2cabced73572f15790e8736 (patch) | |
tree | 74d648171a1808a70aad32f3b066f0d936be1f82 /ms/blueprintsprocessor/functions/resource-resolution | |
parent | 835914bd584e771e47a5c8824848e8ba0ca06aec (diff) | |
parent | 6f7a427e53f4e129d84198f4c94036b4fe6b3898 (diff) |
Merge "CCSDK-1603:Changes in 'Config via netconf' BP to pull data from AAI"
Diffstat (limited to 'ms/blueprintsprocessor/functions/resource-resolution')
2 files changed, 5 insertions, 1 deletions
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceSourceProperties.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceSourceProperties.kt index 604d4d40b..2a0e7a443 100644 --- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceSourceProperties.kt +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceSourceProperties.kt @@ -63,6 +63,8 @@ open class RestResourceSource : ResourceSourceProperties() { var inputKeyMapping: MutableMap<String, String>? = null @get:JsonProperty("output-key-mapping") var outputKeyMapping: MutableMap<String, String>? = null + @get:JsonProperty("headers") + var headers: Map<String, String> = emptyMap() @get:JsonProperty("key-dependencies") lateinit var keyDependencies: MutableList<String> } diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessor.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessor.kt index 2b9239f4c..e9aa2749a 100644 --- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessor.kt +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessor.kt @@ -83,10 +83,12 @@ open class RestResourceResolutionProcessor(private val blueprintRestLibPropertyS logger.info("RestResource ($dSource) dictionary information: " + "URL:($urlPath), input-key-mapping:($inputKeyMapping), output-key-mapping:(${sourceProperties.outputKeyMapping})") + val requestHeaders = sourceProperties.headers + logger.info("$dSource dictionary information : ($urlPath), ($inputKeyMapping), (${sourceProperties.outputKeyMapping})") // Get the Rest Client Service val restClientService = blueprintWebClientService(resourceAssignment, sourceProperties) - val response = restClientService.exchangeResource(verb, urlPath, payload) + val response = restClientService.exchangeResource(verb, urlPath, payload, requestHeaders.toMap()) val responseStatusCode = response.status val responseBody = response.body val outputKeyMapping = sourceProperties.outputKeyMapping |