From 94ad509756f17e79c278e3cc2f87440009125cd1 Mon Sep 17 00:00:00 2001 From: gummar Date: Tue, 18 Feb 2020 18:54:44 +0000 Subject: Merge SW Upgrade Blueprint into PNF_AAI and create one UAT BP for PNF UAT: Add support to multiple responses for a single request Set property IN_UAT=1 during UAT execution so blueprints can tune their settings to values more suitable for testing (like timeouts) Add 'times' field to specify expected number of invocations Add UAT blueprint script for PNF SW Upgrade UC Add current thread check for Hazelcast distributed lock Resolve URI before returning Issue-ID: CCSDK-2091 Change-Id: Id256bad043488f88f1b60015ebf9ade4be607fa2 Signed-off-by: gummar --- .../functions/restconf/executor/RestconfExecutorExtensions.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 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 fc6d5a910..408eaf45b 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 @@ -45,12 +45,12 @@ suspend fun AbstractScriptComponentFunction.restconfMountDevice( headers: Map = mutableMapOf("Content-Type" to "application/xml") ) { - val mountUrl = "restconf/config/network-topology:network-topology/topology/topology-netconf/node/$deviceId" + val mountUrl = "/restconf/config/network-topology:network-topology/topology/topology-netconf/node/$deviceId" log.info("sending mount request, url: $mountUrl") webClientService.exchangeResource("PUT", mountUrl, payload as String, headers) /** Check device has mounted */ - val mountCheckUrl = "restconf/operational/network-topology:network-topology/topology/topology-netconf/node/$deviceId" + val mountCheckUrl = "/restconf/operational/network-topology:network-topology/topology/topology-netconf/node/$deviceId" val expectedResult = """"netconf-node-topology:connection-status":"connected"""" val mountCheckExecutionBlock: suspend (Int) -> String = { tryCount: Int -> @@ -80,7 +80,7 @@ suspend fun AbstractScriptComponentFunction.restconfApplyDeviceConfig( ): 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/" + + val applyConfigUrl = "/restconf/config/network-topology:network-topology/topology/topology-netconf/node/" + "$deviceId/$configletResourcePath" return webClientService.exchangeResource("PATCH", applyConfigUrl, configletToApply as String, additionalHeaders) } @@ -92,7 +92,7 @@ suspend fun AbstractScriptComponentFunction.restconfDeviceConfig( ): BlueprintWebClientService.WebClientResponse { - val configPathUrl = "restconf/config/network-topology:network-topology/topology/topology-netconf/node/" + + val configPathUrl = "/restconf/config/network-topology:network-topology/topology/topology-netconf/node/" + "$deviceId/$configletResourcePath" log.debug("sending GET request, url: $configPathUrl") return webClientService.exchangeResource("GET", configPathUrl, "") @@ -106,7 +106,7 @@ suspend fun AbstractScriptComponentFunction.restconfUnMountDevice( deviceId: String, payload: String ) { - val unMountUrl = "restconf/config/network-topology:network-topology/topology/topology-netconf/node/$deviceId" + val unMountUrl = "/restconf/config/network-topology:network-topology/topology/topology-netconf/node/$deviceId" log.info("sending unMount request, url: $unMountUrl") webClientService.exchangeResource("DELETE", unMountUrl, "") } -- cgit 1.2.3-korg