diff options
author | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2018-10-16 16:46:17 -0400 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2018-10-17 10:02:42 -0400 |
commit | e761fa50f80b2d6888f510f67cab1d6e740fd28e (patch) | |
tree | 16bbf0ee87ad7234a0da6c1cc483cf96858f6f2a /bpmn/MSOCommonBPMN/src | |
parent | dae0218b5134920ddbbc76be657aebcb3314e1bd (diff) |
Bug fixes October 16
Treat the VfModule returned from PrepareUpdateAAIVfModule call as an
AAI object
collection create, connect instanceGroup to cloudRegion
Fix a typo in the name of the method for getting a variable
testing mapping of instance group role
test NetworkInstanceGroup role to be SUB-INTERFACE
use enum value with hyphen for subtype
Some updates based on feedback to java codes
updated client to use optional instead of passing null
added case where client sends null due to mapping issue
added generic response object and pinc returns response
build relationship now correctly removes wrapper
Ensure that no null object gets referenced while checking if VNF is
empty.
Change-Id: I6177877518475c1f2e8e4e9dbd2ad1e2f3e10d18
Issue-ID: SO-1144
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN/src')
-rw-r--r-- | bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/DeleteAAIVfModule.groovy | 2 | ||||
-rw-r--r-- | bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/baseclient/BaseClient.java | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/DeleteAAIVfModule.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/DeleteAAIVfModule.groovy index 178b4d1695..6da1f6d6ff 100644 --- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/DeleteAAIVfModule.groovy +++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/DeleteAAIVfModule.groovy @@ -132,7 +132,7 @@ public class DeleteAAIVfModule extends AbstractServiceTaskProcessor{ def responseData = "" try { String vnfId = execution.getVariable("DAAIVfMod_vnfId") - String vfModuleId = execution.setVariable("DAAIVfMod_vfModuleId") + String vfModuleId = execution.getVariable("DAAIVfMod_vfModuleId") String resourceVersion = execution.getVariable("DAAIVfMod_vfModRsrcVer") AaiUtil aaiUriUtil = new AaiUtil(this) diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/baseclient/BaseClient.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/baseclient/BaseClient.java index 78f3e96978..af93c1bfc0 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/baseclient/BaseClient.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/baseclient/BaseClient.java @@ -20,11 +20,15 @@ package org.onap.so.bpmn.common.baseclient; +import java.util.ArrayList; +import java.util.List; + import org.onap.so.logging.jaxrs.filter.SpringClientFilter; import org.springframework.core.ParameterizedTypeReference; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; +import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.http.client.BufferingClientHttpRequestFactory; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; @@ -40,6 +44,17 @@ public class BaseClient<I,O> { public HttpHeaders getHttpHeader() { return httpHeader; } + + public HttpHeaders setDefaultHttpHeaders(String auth) { + httpHeader = new HttpHeaders(); + httpHeader.set("Authorization", auth); + httpHeader.setContentType(MediaType.APPLICATION_JSON); + List<MediaType> acceptMediaTypes = new ArrayList<MediaType>(); + acceptMediaTypes.add(MediaType.APPLICATION_JSON); + acceptMediaTypes.add(MediaType.TEXT_PLAIN); + httpHeader.setAccept(acceptMediaTypes); + return httpHeader; + } public void setHttpHeader(HttpHeaders httpHeader) { this.httpHeader = httpHeader; |