diff options
author | zm330 <zhangminyj@chinamobile.com> | 2020-05-23 12:11:08 +0800 |
---|---|---|
committer | zm330 <zhangminyj@chinamobile.com> | 2020-05-23 12:11:21 +0800 |
commit | 1be844e494300c9c2eae7becbaf0aa9136d9278c (patch) | |
tree | 9be30aead3e229db082c14c21a4cc45e9b52c9e9 /bpmn/so-bpmn-infrastructure-common | |
parent | 2109b159bb28fc8eff6613b227fe7e5d5d8ae915 (diff) |
Update DeleteSliceService auth
Issue-ID: SO-2942
Signed-off-by: zm330 <zhangminyj@chinamobile.com>
Change-Id: I93015340d57e9feeba0d212bef7978a3a33d1026
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-common')
-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 84da1e4ec9..26936bfd71 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") } /** |