aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOInfrastructureBPMN/src
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2017-11-09 17:13:47 -0500
committerJim Hahn <jrh3@att.com>2017-11-09 17:17:40 -0500
commit6d038c291eeefe7ef6688ca05d108d85631297d8 (patch)
treec81240c72bfdbba49bfa01b13b86d48c74cc49fb /bpmn/MSOInfrastructureBPMN/src
parent6f0a1ef3e4b8891c670c289cfc13219031d25341 (diff)
Added authentication info to DoDeleteVnfAndModules
Modified code to use AaiUtil.executeAAIGetCall() to make the the call to AAI, thus shortening the code while gaining the benefits of the common module (e.g., setting authentication info). Change-Id: Ic0e671c0301c78b14a2234efec3cc7064162d4ad Issue-Id: SO-326 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'bpmn/MSOInfrastructureBPMN/src')
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy13
1 files changed, 2 insertions, 11 deletions
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy
index 8c158db1da..3f7ffbf28c 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy
@@ -230,19 +230,10 @@ class DoDeleteVnfAndModules extends AbstractServiceTaskProcessor {
utils.logAudit("AAI endPoint: " + endPoint)
try {
- RESTConfig config = new RESTConfig(endPoint);
- def responseData = ''
- def aaiRequestId = UUID.randomUUID().toString()
- RESTClient client = new RESTClient(config).
- addHeader('X-TransactionId', aaiRequestId).
- addHeader('X-FromAppId', 'MSO').
- addHeader('Content-Type', 'application/xml').
- addHeader('Accept','application/xml');
- logDebug('sending GET to AAI endpoint \'' + endPoint + '\'', isDebugLogEnabled)
- APIResponse response = client.httpGet()
utils.logAudit("createVfModule - invoking httpGet() to AAI")
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, endPoint)
- responseData = response.getResponseBodyAsString()
+ def responseData = response.getResponseBodyAsString()
if (responseData != null) {
logDebug("Received generic VNF data: " + responseData, isDebugLogEnabled)