From 9e3c594bc3cf74ab5748c14bcde81dec7f062fa0 Mon Sep 17 00:00:00 2001 From: dfarrelly Date: Fri, 14 Feb 2020 14:46:06 +0000 Subject: Update restconf executor to return response *Update restconfApplyDeviceConfig function to return request response *Modify pnf_config_aai CBA to test new functionality Issue-ID: CCSDK-2097 Change-Id: Id6109d8c3a8fa4e2ba1b102c4d2697ae6a03f8e2 Signed-off-by: dfarrelly --- .../functions/restconf/executor/RestconfExecutorExtensions.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'ms/blueprintsprocessor/functions') diff --git a/ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restconf/executor/RestconfExecutorExtensions.kt b/ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restconf/executor/RestconfExecutorExtensions.kt index 906bef9a4..fc6d5a910 100644 --- a/ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restconf/executor/RestconfExecutorExtensions.kt +++ b/ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restconf/executor/RestconfExecutorExtensions.kt @@ -69,6 +69,7 @@ suspend fun AbstractScriptComponentFunction.restconfMountDevice( /** * Generic Configure function + * @return The WebClientResponse from the request */ suspend fun AbstractScriptComponentFunction.restconfApplyDeviceConfig( webClientService: BlueprintWebClientService, @@ -76,14 +77,12 @@ suspend fun AbstractScriptComponentFunction.restconfApplyDeviceConfig( configletResourcePath: String, configletToApply: Any, additionalHeaders: Map = mutableMapOf("Content-Type" to "application/yang.patch+xml") -) { - +): BlueprintWebClientService.WebClientResponse { log.debug("headers: $additionalHeaders") log.info("configuring device: $deviceId, Configlet: $configletToApply") val applyConfigUrl = "restconf/config/network-topology:network-topology/topology/topology-netconf/node/" + "$deviceId/$configletResourcePath" - val result: Any = webClientService.exchangeResource("PATCH", applyConfigUrl, configletToApply as String, additionalHeaders) - log.info("Configuration application result: $result") + return webClientService.exchangeResource("PATCH", applyConfigUrl, configletToApply as String, additionalHeaders) } suspend fun AbstractScriptComponentFunction.restconfDeviceConfig( -- cgit 1.2.3-korg