diff options
author | Chuanyu Chen <chenchuanyu@huawei.com> | 2020-05-25 01:56:21 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-05-25 01:56:21 +0000 |
commit | 4269f0af38eb83c21128f84371a5b323a1a6b124 (patch) | |
tree | a07057c9853e6c049e550a60b2a26e47106d6aef | |
parent | 58eec96f412a7977ca09c973d2a81f046148c8dd (diff) | |
parent | 5c4907c42f0d6709265528a9a1e5e0ab593127d0 (diff) |
Merge "Update DeleteSliceService auth" into frankfurt
-rw-r--r-- | bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCommunicationService.groovy | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCommunicationService.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCommunicationService.groovy index b121083954..df034e6c8d 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCommunicationService.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCommunicationService.groovy @@ -199,7 +199,7 @@ class DeleteCommunicationService extends AbstractServiceTaskProcessor { * 再次调用deleteE2EServiceInstance接口,然后获取到operationid, */ void sendRequest2NSMFWF(DelegateExecution execution) { - LOGGER.trace("begin preRequestSend2NSMF") + LOGGER.debug("begin preRequestSend2NSMF") try { //url:/onap/so/infra/e2eServiceInstances/v3/{serviceInstanceId}" def NSMF_endpoint = UrnPropertiesReader.getVariable("mso.infra.endpoint.url", execution) @@ -213,9 +213,13 @@ class DeleteCommunicationService extends AbstractServiceTaskProcessor { """ requestBody.replaceAll("\\s+", "") - String basicAuthValue = UrnPropertiesReader.getVariable("mso.infra.endpoint.auth", execution) + String msoKey = UrnPropertiesReader.getVariable("mso.msoKey", execution) + String basicAuth = UrnPropertiesReader.getVariable("mso.infra.endpoint.auth", execution) + String basicAuthValue = utils.encrypt(basicAuth, msoKey) + String encodeString = utils.getBasicAuth(basicAuthValue, msoKey) + HttpClient httpClient = getHttpClientFactory().newJsonClient(new URL(url), ONAPComponents.SO) - httpClient.addAdditionalHeader("Authorization", basicAuthValue) + httpClient.addAdditionalHeader("Authorization", encodeString) httpClient.addAdditionalHeader("Accept", "application/json") Response httpResponse = httpClient.delete(requestBody) handleNSSMFWFResponse(httpResponse, execution) @@ -228,7 +232,7 @@ class DeleteCommunicationService extends AbstractServiceTaskProcessor { exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) } - LOGGER.trace("exit preRequestSend2NSMF") + LOGGER.debug("exit preRequestSend2NSMF") } /** |