diff options
author | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2019-03-01 12:48:00 -0500 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2019-03-01 12:48:14 -0500 |
commit | 09940a4aacf2fb32eddc85dd49f5a17dedff9de0 (patch) | |
tree | ca2a09e6cf184da0131b2fa3cc53decf94c69f13 /adapters/mso-openstack-adapters | |
parent | 244d353aeda3662d57c6629eb95ee4791b7c07f1 (diff) |
vnf spin up gr api vnf s base module fails
map object representations of json back to json strings
marshal all objects to json strings before sending
all input params converted to Map<String, Object>
Updated userParams map from HashMap<String, String> to Map<String,
Object> as HashMap<String, String> userParams was causing VNF spin up
to fail. Input json in Userparams was not accepted as a valid json
format. Updated other files that were affected by this change.
Change-Id: I0c00fc00c4c11b54ace4df7be8d5bfc80d41d130
Issue-ID: SO-1582
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'adapters/mso-openstack-adapters')
13 files changed, 84 insertions, 84 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapter.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapter.java index 7c49c9f948..c54b067a78 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapter.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapter.java @@ -50,7 +50,7 @@ public interface MsoVnfAdapter @WebParam(name="vnfName") @XmlElement(required=true) String vnfName, @WebParam(name="requestType") @XmlElement(required=false) String requestType, @WebParam(name="volumeGroupHeatStackId") @XmlElement(required=false) String volumeGroupHeatStackId, - @WebParam(name="inputs") Map<String,String> inputs, + @WebParam(name="inputs") Map<String,Object> inputs, @WebParam(name="failIfExists") Boolean failIfExists, @WebParam(name="backout") Boolean backout, @WebParam(name="enableBridge") Boolean enableBridge, @@ -68,7 +68,7 @@ public interface MsoVnfAdapter @WebParam(name="vnfName") @XmlElement(required=true) String vnfName, @WebParam(name="requestType") @XmlElement(required=false) String requestType, @WebParam(name="volumeGroupHeatStackId") @XmlElement(required=false) String volumeGroupHeatStackId, - @WebParam(name="inputs") Map<String,String> inputs, + @WebParam(name="inputs") Map<String,Object> inputs, @WebParam(name="request") MsoRequest msoRequest, @WebParam(name="outputs", mode=Mode.OUT) Holder<Map<String,String>> outputs, @WebParam(name="rollback", mode=Mode.OUT) Holder<VnfRollback> rollback ) @@ -109,7 +109,7 @@ public interface MsoVnfAdapter @WebParam(name="volumeGroupHeatStackId") @XmlElement(required=false) String volumeGroupHeatStackId, @WebParam(name="baseVfHeatStackId") @XmlElement(required=false) String baseVfHeatStackId, @WebParam(name = "modelCustomizationUuid") @XmlElement(required = false) String modelCustomizationUuid, - @WebParam(name="inputs") Map<String,String> inputs, + @WebParam(name="inputs") Map<String,Object> inputs, @WebParam(name="failIfExists") Boolean failIfExists, @WebParam(name="backout") Boolean backout, @WebParam(name="enableBridge") Boolean enableBridge, @@ -138,7 +138,7 @@ public interface MsoVnfAdapter @WebParam(name="baseVfHeatStackId") @XmlElement(required=false) String baseVfHeatStackId, @WebParam(name="vfModuleStackId") @XmlElement(required=false) String vfModuleStackId, @WebParam(name = "modelCustomizationUuid") @XmlElement(required = false) String modelCustomizationUuid, - @WebParam(name="inputs") Map<String,String> inputs, + @WebParam(name="inputs") Map<String,Object> inputs, @WebParam(name="request") MsoRequest msoRequest, @WebParam(name="outputs", mode=Mode.OUT) Holder<Map<String,String>> outputs, @WebParam(name="rollback", mode=Mode.OUT) Holder<VnfRollback> rollback ) diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsync.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsync.java index b67a412c3e..6f61f0292c 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsync.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsync.java @@ -53,7 +53,7 @@ public interface MsoVnfAdapterAsync @WebParam(name="vnfName") @XmlElement(required=true) String vnfName, @WebParam(name="requestType") @XmlElement(required=false) String requestType, @WebParam(name="volumeGroupHeatStackId") @XmlElement(required=false) String volumeGroupHeatStackId, - @WebParam(name="inputs") Map<String,String> inputs, + @WebParam(name="inputs") Map<String,Object> inputs, @WebParam(name="failIfExists") Boolean failIfExists, @WebParam(name="backout") Boolean backout, @WebParam(name="enableBridge") Boolean enableBridge, @@ -70,7 +70,7 @@ public interface MsoVnfAdapterAsync @WebParam(name="vnfName") @XmlElement(required=true) String vnfName, @WebParam(name="requestType") @XmlElement(required=false) String requestType, @WebParam(name="volumeGroupHeatStackId") @XmlElement(required=false) String volumeGroupHeatStackId, - @WebParam(name="inputs") Map<String,String> inputs, + @WebParam(name="inputs") Map<String,Object> inputs, @WebParam(name="messageId") @XmlElement(required=true) String messageId, @WebParam(name="request") MsoRequest msoRequest, @WebParam(name="notificationUrl") @XmlElement(required=true) String notificationUrl ); diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java index 6340f76388..2c9d3776a7 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java @@ -125,7 +125,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync { String vnfName, String requestType, String volumeGroupHeatStackId, - Map <String, String> inputs, + Map <String, Object> inputs, Boolean failIfExists, Boolean backout, Boolean enableBridge, @@ -214,7 +214,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync { String vnfName, String requestType, String volumeGroupHeatStackId, - Map <String, String> inputs, + Map <String, Object> inputs, String messageId, MsoRequest msoRequest, String notificationUrl) { diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java index 94434cd781..96160760fd 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java @@ -180,7 +180,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { String vnfName, String requestType, String volumeGroupHeatStackId, - Map <String, String> inputs, + Map <String, Object> inputs, Boolean failIfExists, Boolean backout, Boolean enableBridge, @@ -265,7 +265,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { String vnfName, String requestType, String volumeGroupHeatStackId, - Map <String, String> inputs, + Map <String, Object> inputs, MsoRequest msoRequest, Holder <Map <String, String>> outputs, Holder <VnfRollback> rollback) throws VnfException { @@ -474,7 +474,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { return stringOutputs; } - private Map <String, Object> copyStringInputs (Map <String, String> stringInputs) { + private Map <String, Object> copyStringInputs (Map <String, Object> stringInputs) { return new HashMap <> (stringInputs); } @@ -579,7 +579,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { String volumeGroupHeatStackId, String baseVfHeatStackId, String modelCustomizationUuid, - Map <String, String> inputs, + Map <String, Object> inputs, Boolean failIfExists, Boolean backout, Boolean enableBridge, @@ -1343,7 +1343,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { String baseVfHeatStackId, String vfModuleStackId, String modelCustomizationUuid, - Map <String, String> inputs, + Map <String, Object> inputs, MsoRequest msoRequest, Holder <Map <String, String>> outputs, Holder <VnfRollback> rollback) throws VnfException { @@ -1794,8 +1794,8 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { hasJson = true; String jsonString = null; try { - jsonString = inputs.get(parm.getParamName()); - jsonNode = new ObjectMapper().readTree(jsonString); + jsonString = JSON_MAPPER.writeValueAsString(inputs.get(parm.getParamName())); + jsonNode = JSON_MAPPER.readTree(jsonString); } catch (JsonParseException jpe) { //TODO - what to do here? //for now - send the error to debug, but just leave it as a String @@ -1816,8 +1816,8 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { hasJson = true; String jsonString = null; try { - jsonString = inputs.get(parm.getParamAlias()); - jsonNode = new ObjectMapper().readTree(jsonString); + jsonString = (String)inputs.get(parm.getParamAlias()); + jsonNode = JSON_MAPPER.readTree(jsonString); } catch (JsonParseException jpe) { //TODO - what to do here? //for now - send the error to debug, but just leave it as a String @@ -1847,7 +1847,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { // They've submitted using an alias name. Remove that from inputs, and add back using real name. String realParamName = parm.getParamName (); String alias = parm.getParamAlias (); - String value = inputs.get (alias); + Object value = inputs.get (alias); LOGGER.debug ("*Found an Alias: paramName=" + realParamName + ",alias=" + alias @@ -1911,9 +1911,9 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { Map<String, Object> inputsTwo = null; if (hasJson && jsonParams.size() > 0) { inputsTwo = new HashMap<>(); - for (Map.Entry<String, String> entry : inputs.entrySet()) { + for (Map.Entry<String, Object> entry : inputs.entrySet()) { String keyParamName = entry.getKey(); - String value = entry.getValue(); + Object value = entry.getValue(); if (jsonParams.containsKey(keyParamName)) { inputsTwo.put(keyParamName, jsonParams.get(keyParamName)); } else { @@ -2085,7 +2085,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { */ private boolean valetCreateRequest(String cloudSiteId, String tenantId, Map<String, Object> heatFilesObjects, Map<String, Object> nestedTemplatesChecked, String vfModuleName, boolean backout, HeatTemplate heatTemplate, String newEnvironmentString, Map<String, Object> goldenInputs, - MsoRequest msoRequest, Map<String, String> inputs, boolean failRequestOnValetFailure, Holder<Map<String, Object>> valetModifiedParamsHolder) throws VnfException { + MsoRequest msoRequest, Map<String, Object> inputs, boolean failRequestOnValetFailure, Holder<Map<String, Object>> valetModifiedParamsHolder) throws VnfException { boolean valetSucceeded = false; String valetErrorMessage = "more detail not available"; try { @@ -2095,8 +2095,8 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { HeatRequest heatRequest = new HeatRequest(vfModuleName, backout, heatTemplate.getTimeoutMinutes(), heatTemplate.getTemplateBody(), newEnvironmentString, files, goldenInputs); GenericValetResponse<ValetCreateResponse> createReq = this.vci.callValetCreateRequest(msoRequest.getRequestId(), - cloudSiteId, tenantId, msoRequest.getServiceInstanceId(), inputs.get("vnf_id"), - inputs.get("vnf_name"), inputs.get("vf_module_id"), inputs.get("vf_module_name"), keystoneUrl, + cloudSiteId, tenantId, msoRequest.getServiceInstanceId(), (String)inputs.get("vnf_id"), + (String)inputs.get("vnf_name"), (String)inputs.get("vf_module_id"), (String)inputs.get("vf_module_name"), keystoneUrl, heatRequest); ValetCreateResponse vcr = createReq.getReturnObject(); if (vcr != null && createReq.getStatusCode() == 200) { @@ -2145,7 +2145,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { private boolean valetUpdateRequest(String cloudSiteId, String tenantId, Map<String, Object> heatFilesObjects, Map<String, Object> nestedTemplatesChecked, String vfModuleName, boolean backout, HeatTemplate heatTemplate, String newEnvironmentString, - Map<String, Object> goldenInputs, MsoRequest msoRequest, Map<String, String> inputs, + Map<String, Object> goldenInputs, MsoRequest msoRequest, Map<String, Object> inputs, boolean failRequestOnValetFailure, Holder<Map<String, Object>> valetModifiedParamsHolder) throws VnfException { boolean valetSucceeded = false; @@ -2158,8 +2158,8 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { heatTemplate.getTemplateBody(), newEnvironmentString, files, goldenInputs); // vnf name is not sent to MSO on update requests - so we will set it to the vf module name for now GenericValetResponse<ValetUpdateResponse> updateReq = this.vci.callValetUpdateRequest(msoRequest.getRequestId(), - cloudSiteId, tenantId, msoRequest.getServiceInstanceId(), inputs.get("vnf_id"), - vfModuleName, inputs.get("vf_module_id"), vfModuleName, keystoneUrl, + cloudSiteId, tenantId, msoRequest.getServiceInstanceId(), (String)inputs.get("vnf_id"), + vfModuleName, (String)inputs.get("vf_module_id"), vfModuleName, keystoneUrl, heatRequest); ValetUpdateResponse vur = updateReq.getReturnObject(); if (vur != null && updateReq.getStatusCode() == 200) { diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java index 00e72373dd..f34a79491e 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java @@ -132,7 +132,7 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter { String vnfName, String requestType, String volumeGroupHeatStackId, - Map <String, String> inputs, + Map <String, Object> inputs, Boolean failIfExists, Boolean backout, Boolean enableBridge, @@ -160,7 +160,7 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter { String vnfName, String requestType, String volumeGroupHeatStackId, - Map <String, String> inputs, + Map <String, Object> inputs, MsoRequest msoRequest, Holder <Map <String, String>> outputs, Holder <VnfRollback> rollback) @@ -428,7 +428,7 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter { return; } - private void sendMapToDebug(Map<String, String> inputs) { + private void sendMapToDebug(Map<String, Object> inputs) { int i = 0; StringBuilder sb = new StringBuilder("inputs:"); if (inputs == null) { @@ -567,7 +567,7 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter { String volumeGroupId, String baseVfModuleId, String modelCustomizationUuid, - Map <String, String> inputs, + Map <String, Object> inputs, Boolean failIfExists, Boolean backout, Boolean enableBridge, @@ -605,7 +605,7 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter { if (inputs == null) { // Create an empty set of inputs - inputs = new HashMap<String,String>(); + inputs = new HashMap<>(); LOGGER.debug("inputs == null - setting to empty"); } else { this.sendMapToDebug(inputs); @@ -1212,7 +1212,7 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter { String baseVfHeatStackId, String vfModuleStackId, String modelCustomizationUuid, - Map <String, String> inputs, + Map <String, Object> inputs, MsoRequest msoRequest, Holder <Map <String, String>> outputs, Holder <VnfRollback> rollback) throws VnfException diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java index 09ee0cde04..13212be74a 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java @@ -155,7 +155,7 @@ public class MsoVnfPluginAdapterImpl implements MsoVnfAdapter { String vnfName, String requestType, String volumeGroupHeatStackId, - Map <String, String> inputs, + Map <String, Object> inputs, Boolean failIfExists, Boolean backout, Boolean enableBridge, @@ -183,7 +183,7 @@ public class MsoVnfPluginAdapterImpl implements MsoVnfAdapter { String vnfName, String requestType, String volumeGroupHeatStackId, - Map <String, String> inputs, + Map <String, Object> inputs, MsoRequest msoRequest, Holder <Map <String, String>> outputs, Holder <VnfRollback> rollback) @@ -379,14 +379,14 @@ public class MsoVnfPluginAdapterImpl implements MsoVnfAdapter { * Normalize an input value to an Object, based on the target parameter type. * If the type is not recognized, it will just be returned unchanged (as a string). */ - private Object convertInputValue (String inputValue, HeatTemplateParam templateParam) + private Object convertInputValue (Object inputValue, HeatTemplateParam templateParam) { String type = templateParam.getParamType(); LOGGER.debug("Parameter: " + templateParam.getParamName() + " is of type " + type); if (type.equalsIgnoreCase("number")) { try { - return Integer.valueOf(inputValue); + return Integer.valueOf(inputValue.toString()); } catch (Exception e) { LOGGER.debug("Unable to convert " + inputValue + " to an integer!" , e); @@ -394,7 +394,7 @@ public class MsoVnfPluginAdapterImpl implements MsoVnfAdapter { } } else if (type.equalsIgnoreCase("json")) { try { - JsonNode jsonNode = new ObjectMapper().readTree(inputValue); + JsonNode jsonNode = JSON_MAPPER.readTree(JSON_MAPPER.writeValueAsString(inputValue)); return jsonNode; } catch (Exception e) { @@ -402,7 +402,7 @@ public class MsoVnfPluginAdapterImpl implements MsoVnfAdapter { return null; } } else if (type.equalsIgnoreCase("boolean")) { - return new Boolean(inputValue); + return new Boolean(inputValue.toString()); } // Nothing else matched. Return the original string @@ -471,7 +471,7 @@ public class MsoVnfPluginAdapterImpl implements MsoVnfAdapter { return; } - private void sendMapToDebug(Map<String, String> inputs) { + private void sendMapToDebug(Map<String, Object> inputs) { int i = 0; StringBuilder sb = new StringBuilder("inputs:"); if (inputs == null) { @@ -608,7 +608,7 @@ public class MsoVnfPluginAdapterImpl implements MsoVnfAdapter { String volumeGroupId, String baseVfModuleId, String modelCustomizationUuid, - Map <String, String> inputs, + Map <String, Object> inputs, Boolean failIfExists, Boolean backout, Boolean enableBridge, @@ -1212,7 +1212,7 @@ public class MsoVnfPluginAdapterImpl implements MsoVnfAdapter { String baseVfHeatStackId, String vfModuleStackId, String modelCustomizationUuid, - Map <String, String> inputs, + Map <String, Object> inputs, MsoRequest msoRequest, Holder <Map <String, String>> outputs, Holder <VnfRollback> rollback) throws VnfException diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImplTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImplTest.java index 4f1c2c8707..3ebaea9c2c 100644 --- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImplTest.java +++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImplTest.java @@ -76,7 +76,7 @@ public class MsoVnfAdapterAsyncImplTest extends BaseRestTestUtils { String vnfName = "DEV-VF-1802-it3-pwt3-v6-vSAMP10a-addon2-Replace-1001/stackId"; String notificationUrl = "http://localhost:"+wireMockPort+"/notify/adapterNotify/updateVnfNotificationRequest"; instance.createVnfA("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", vnfName, "VFMOD", - "volumeGroupHeatStackId|1", new HashMap<String, String>(), Boolean.FALSE, Boolean.TRUE, Boolean.FALSE, "messageId", + "volumeGroupHeatStackId|1", new HashMap<String, Object>(), Boolean.FALSE, Boolean.TRUE, Boolean.FALSE, "messageId", msoRequest, notificationUrl); verify(1,postRequestedFor(urlEqualTo("/notify/adapterNotify/updateVnfNotificationRequest"))); @@ -86,7 +86,7 @@ public class MsoVnfAdapterAsyncImplTest extends BaseRestTestUtils { public void createVNFTest_Exception() throws Exception { String notificationUrl = "http://localhost:"+wireMockPort+"/notify/adapterNotify/updateVnfNotificationRequest"; instance.createVnfA("mdt1", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "vSAMP12", "VFMOD", - "volumeGroupHeatStackId|1", new HashMap<String, String>(), Boolean.FALSE, Boolean.TRUE, Boolean.FALSE, "messageId", + "volumeGroupHeatStackId|1", new HashMap<String, Object>(), Boolean.FALSE, Boolean.TRUE, Boolean.FALSE, "messageId", null, notificationUrl); verify(1,postRequestedFor(urlEqualTo("/notify/adapterNotify/updateVnfNotificationRequest"))); @@ -99,7 +99,7 @@ public class MsoVnfAdapterAsyncImplTest extends BaseRestTestUtils { msoRequest.setRequestId("12345"); msoRequest.setServiceInstanceId("12345"); - Map<String, String> map = new HashMap<>(); + Map<String, Object> map = new HashMap<>(); map.put("key1", "value1"); stubFor(post(urlPathEqualTo("/notify/adapterNotify/updateVnfNotificationRequest")).withRequestBody (containing("messageId")) @@ -116,7 +116,7 @@ public class MsoVnfAdapterAsyncImplTest extends BaseRestTestUtils { msoRequest.setRequestId("12345"); msoRequest.setServiceInstanceId("12345"); - Map<String, String> map = new HashMap<>(); + Map<String, Object> map = new HashMap<>(); map.put("key1", "value1"); stubFor(post(urlPathEqualTo("/notify/adapterNotify/updateVnfNotificationRequest")).withRequestBody (containing("messageId")) diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfAdapterImplTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfAdapterImplTest.java index 849c0811b0..be3b54e23f 100644 --- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfAdapterImplTest.java +++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfAdapterImplTest.java @@ -104,7 +104,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils { MsoRequest msoRequest = getMsoRequest(); - Map<String, String> map = new HashMap<>(); + Map<String, Object> map = new HashMap<>(); map.put("key1", "value1"); instance.createVfModule("MTN13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD", "volumeGroupHeatStackId|1", "baseVfHeatStackId", "88a6ca3ee0394ade9403f075db23167e", map, @@ -124,7 +124,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils { MsoRequest msoRequest = getMsoRequest(); - Map<String, String> map = new HashMap<>(); + Map<String, Object> map = new HashMap<>(); map.put("key1", "value1"); instance.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD", "volumeGroupHeatStackId|1", "baseVfHeatStackId", "88a6ca3ee0394ade9403f075db23167e", map, @@ -144,7 +144,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils { MsoRequest msoRequest = getMsoRequest(); - Map<String, String> map = new HashMap<>(); + Map<String, Object> map = new HashMap<>(); map.put("key1", "value1"); instance.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD", "volumeGroupHeatStackId|1", "baseVfHeatStackId", "88a6ca3ee0394ade9403f075db23167e", map, @@ -164,7 +164,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils { MsoRequest msoRequest = getMsoRequest(); - Map<String, String> map = new HashMap<>(); + Map<String, Object> map = new HashMap<>(); map.put("key1", "value1"); instance.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD", "volumeGroupHeatStackId|1", "baseVfHeatStackId", "88a6ca3ee0394ade9403f075db23167e", map, @@ -181,7 +181,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils { MsoRequest msoRequest = getMsoRequest(); - Map<String, String> map = new HashMap<>(); + Map<String, Object> map = new HashMap<>(); map.put("key1", "value1"); instance.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD", "volumeGroupHeatStackId|1", "baseVfHeatStackId", "88a6ca3ee0394ade9403f075db23167e", map, @@ -195,7 +195,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils { expectedException.expect(VnfException.class); MsoRequest msoRequest = getMsoRequest(); - Map<String, String> map = new HashMap<>(); + Map<String, Object> map = new HashMap<>(); map.put("key1", "value1"); instance.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD", "volumeGroupHeatStackId|1", "baseVfHeatStackId", "88a6ca3ee0394ade9403f075db23167e", map, @@ -211,7 +211,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils { MsoRequest msoRequest = getMsoRequest(); - Map<String, String> map = new HashMap<>(); + Map<String, Object> map = new HashMap<>(); map.put("key1", "value1"); instance.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD", "volumeGroupHeatStackId", "baseVfHeatStackId", "88a6ca3ee0394ade9403f075db23167e", map, @@ -230,7 +230,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils { MsoRequest msoRequest = getMsoRequest(); - Map<String, String> map = new HashMap<>(); + Map<String, Object> map = new HashMap<>(); map.put("key1", "value1"); instance.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD", "volumeGroupHeatStackId", "baseVfHeatStackId", "88a6ca3ee0394ade9403f075db23167e", map, @@ -250,7 +250,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils { MsoRequest msoRequest = getMsoRequest(); - Map<String, String> map = new HashMap<>(); + Map<String, Object> map = new HashMap<>(); map.put("key1", "value1"); instance.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD", "volumeGroupHeatStackId", "baseVfHeatStackId", "88a6ca3ee0394ade9403f075db23167e", map, @@ -268,7 +268,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils { MsoRequest msoRequest = getMsoRequest(); - Map<String, String> map = new HashMap<>(); + Map<String, Object> map = new HashMap<>(); map.put("key1", "value1"); instance.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD", "volumeGroupHeatStackId", "baseVfHeatStackId", "88a6ca3ee0394ade9403f075db23167e", map, @@ -300,7 +300,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils { MsoRequest msoRequest = getMsoRequest(); - Map<String, String> map = new HashMap<>(); + Map<String, Object> map = new HashMap<>(); map.put("key1", "value1"); instance.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD", "volumeGroupHeatStackId", "baseVfHeatStackId", "88a6ca3ee0394ade9403f075db23167e", map, @@ -337,7 +337,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils { MsoRequest msoRequest = getMsoRequest(); - Map<String, String> map = new HashMap<>(); + Map<String, Object> map = new HashMap<>(); map.put("key1", "value1"); instance.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "XVFMOD", "volumeGroupHeatStackId", "baseVfHeatStackId", null, map, @@ -355,7 +355,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils { MsoRequest msoRequest = getMsoRequest(); - Map<String, String> map = new HashMap<>(); + Map<String, Object> map = new HashMap<>(); map.put("key1", "value1"); instance.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD", "volumeGroupHeatStackId", "baseVfHeatStackId", "88a6ca3ee0394ade9403f075db23167e", map, @@ -375,7 +375,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils { expectedException.expect(VnfException.class); MsoRequest msoRequest = getMsoRequest(); - Map<String, String> map = new HashMap<>(); + Map<String, Object> map = new HashMap<>(); map.put("key1", "value1"); instance.updateVfModule("mdt1", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "vSAMP12", "VFMOD", "volumeGroupHeatStackId|1", "baseVfHeatStackId", "vfModuleStackId", @@ -388,7 +388,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils { expectedException.expect(VnfNotFound.class); MsoRequest msoRequest = getMsoRequest(); mockOpenStackResponseAccess(wireMockPort); - Map<String, String> map = new HashMap<>(); + Map<String, Object> map = new HashMap<>(); map.put("key1", "value1"); instance.updateVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", vnfName, "VFMOD", "volumeGroupHeatStackId", "baseVfHeatStackId", "vfModuleStackId", @@ -405,7 +405,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils { stubFor(get(urlPathEqualTo("/mockPublicUrl/stacks/volumeGroupHeatStackId")) .willReturn(aResponse().withHeader("Content-Type", "application/json") .withStatus(HttpStatus.SC_INTERNAL_SERVER_ERROR))); - Map<String, String> map = new HashMap<>(); + Map<String, Object> map = new HashMap<>(); map.put("key1", "value1"); instance.updateVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", vnfName, "VFMOD", "volumeGroupHeatStackId", "baseVfHeatStackId", "vfModuleStackId", @@ -422,7 +422,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils { stubFor(get(urlPathEqualTo("/mockPublicUrl/stacks/volumeGroupHeatStackId")) .willReturn(aResponse().withHeader("Content-Type", "application/json") .withStatus(HttpStatus.SC_NOT_FOUND))); - Map<String, String> map = new HashMap<>(); + Map<String, Object> map = new HashMap<>(); map.put("key1", "value1"); instance.updateVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", vnfName, "VFMOD", "volumeGroupHeatStackId", "baseVfHeatStackId", "vfModuleStackId", @@ -438,7 +438,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils { mockOpenStackGetStackVfModule_200(); mockOpenstackGetWithResponse("/mockPublicUrl/stacks/volumeGroupHeatStackId",HttpStatus.SC_OK,"OpenstackResponse_Stack_Created_VfModule.json"); mockOpenstackGetWithResponse("/mockPublicUrl/stacks/baseVfHeatStackId",HttpStatus.SC_INTERNAL_SERVER_ERROR,"OpenstackResponse_Stack_Created_VfModule.json"); - Map<String, String> map = new HashMap<>(); + Map<String, Object> map = new HashMap<>(); map.put("key1", "value1"); instance.updateVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", vnfName, "VFMOD", "volumeGroupHeatStackId", "baseVfHeatStackId", "vfModuleStackId", @@ -454,7 +454,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils { mockOpenStackGetStackVfModule_200(); mockOpenstackGetWithResponse("/mockPublicUrl/stacks/volumeGroupHeatStackId",HttpStatus.SC_OK,"OpenstackResponse_Stack_Created_VfModule.json"); mockOpenstackGetWithResponse("/mockPublicUrl/stacks/baseVfHeatStackId",HttpStatus.SC_NOT_FOUND,"OpenstackResponse_Stack_Created_VfModule.json"); - Map<String, String> map = new HashMap<>(); + Map<String, Object> map = new HashMap<>(); map.put("key1", "value1"); instance.updateVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", vnfName, "VFMOD", "volumeGroupHeatStackId", "baseVfHeatStackId", "vfModuleStackId", @@ -470,7 +470,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils { mockOpenStackGetStackVfModule_200(); mockOpenstackGetWithResponse("/mockPublicUrl/stacks/volumeGroupHeatStackId",HttpStatus.SC_OK,"OpenstackResponse_Stack_Created_VfModule.json"); mockOpenstackGetWithResponse("/mockPublicUrl/stacks/baseVfHeatStackId",HttpStatus.SC_OK,"OpenstackResponse_Stack_Created_VfModule.json"); - Map<String, String> map = new HashMap<>(); + Map<String, Object> map = new HashMap<>(); map.put("key1", "value1"); instance.updateVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", vnfName, "VFMOD", "volumeGroupHeatStackId", "baseVfHeatStackId", "vfModuleStackId", @@ -489,7 +489,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils { VfModuleCustomization vfModuleCustomization = getVfModuleCustomization(); vfModuleCustomization.getVfModule().getModuleHeatTemplate().setParameters(new HashSet<>()); - Map<String, String> map = new HashMap<>(); + Map<String, Object> map = new HashMap<>(); map.put("key1", "value1"); instance.updateVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", vnfName, "VFMOD", "volumeGroupHeatStackId", "baseVfHeatStackId", "vfModuleStackId", @@ -509,7 +509,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils { VfModuleCustomization vfModuleCustomization = getVfModuleCustomization(); vfModuleCustomization.getVfModule().getModuleHeatTemplate().setParameters(new HashSet<>()); - Map<String, String> map = new HashMap<>(); + Map<String, Object> map = new HashMap<>(); map.put("key1", "value1"); instance.updateVfModule("MTN13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", vnfName, "VFMOD", "volumeGroupHeatStackId", "baseVfHeatStackId", "vfModuleStackId", diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImplTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImplTest.java index addc12a5d3..44843900fc 100644 --- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImplTest.java +++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImplTest.java @@ -265,7 +265,7 @@ public class MsoVnfCloudifyAdapterImplTest extends BaseRestTestUtils { msoRequest.setRequestId("12345"); msoRequest.setServiceInstanceId("12345"); - Map<String, String> map = new HashMap<>(); + Map<String, Object> map = new HashMap<>(); map.put("key1", "value1"); try { instance.createVnf("mdt1", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "vSAMP12", "VFMOD", @@ -282,7 +282,7 @@ public class MsoVnfCloudifyAdapterImplTest extends BaseRestTestUtils { msoRequest.setRequestId("12345"); msoRequest.setServiceInstanceId("12345"); - Map<String, String> map = new HashMap<>(); + Map<String, Object> map = new HashMap<>(); map.put("key1", "value1"); try { diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfMulticloudAdapterImplTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfMulticloudAdapterImplTest.java index 1fd3ffc90a..75cea9eafc 100644 --- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfMulticloudAdapterImplTest.java +++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfMulticloudAdapterImplTest.java @@ -66,7 +66,7 @@ public class MsoVnfMulticloudAdapterImplTest extends BaseRestTestUtils{ @Test public void createVfModule() throws Exception { //expectedException.expect(VnfException.class); - Map<String, String> stackInputs = new HashMap<>(); + Map<String, Object> stackInputs = new HashMap<>(); stackInputs.put("oof_directives", "{}"); stackInputs.put("sdnc_directives", "{}"); stackInputs.put("generic_vnf_id", "genVNFID"); diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImplTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImplTest.java index a422680d00..0cd3d1a61d 100644 --- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImplTest.java +++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImplTest.java @@ -56,7 +56,7 @@ public class MsoVnfPluginAdapterImplTest extends BaseRestTestUtils { public void createVfModule_ModelCustUuidIsNull() throws Exception { expectedException.expect(VnfException.class); MsoRequest msoRequest = getMsoRequest(); - Map<String, String> map = new HashMap<>(); + Map<String, Object> map = new HashMap<>(); map.put("key1", "value1"); msoVnfPluginAdapter.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD", "volumeGroupHeatStackId|1", "baseVfHeatStackId", null, map, @@ -68,7 +68,7 @@ public class MsoVnfPluginAdapterImplTest extends BaseRestTestUtils { public void createVfModule_ModelCustUuidIsNotFound() throws Exception { expectedException.expect(VnfException.class); MsoRequest msoRequest = getMsoRequest(); - Map<String, String> map = new HashMap<>(); + Map<String, Object> map = new HashMap<>(); map.put("key1", "value1"); msoVnfPluginAdapter.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD", "volumeGroupHeatStackId|1", "baseVfHeatStackId", "88a6ca3ee0394ade9403f075db23167e", map, @@ -80,7 +80,7 @@ public class MsoVnfPluginAdapterImplTest extends BaseRestTestUtils { public void createVfModule_VduException() throws Exception { expectedException.expect(VnfException.class); MsoRequest msoRequest = getMsoRequest(); - Map<String, String> map = new HashMap<>(); + Map<String, Object> map = new HashMap<>(); map.put("key1", "value1"); msoVnfPluginAdapter.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD", "volumeGroupHeatStackId|1", "baseVfHeatStackId", "9b339a61-69ca-465f-86b8-1c72c582b8e8", map, @@ -94,7 +94,7 @@ public class MsoVnfPluginAdapterImplTest extends BaseRestTestUtils { mockOpenStackGetStackVfModule_200(); MsoRequest msoRequest = getMsoRequest(); - Map<String, String> map = new HashMap<>(); + Map<String, Object> map = new HashMap<>(); map.put("key1", "value1"); msoVnfPluginAdapter.createVfModule("MTN13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD", null, "baseVfHeatStackId", "9b339a61-69ca-465f-86b8-1c72c582b8e8", map, @@ -107,7 +107,7 @@ public class MsoVnfPluginAdapterImplTest extends BaseRestTestUtils { expectedException.expect(VnfException.class); mockOpenStackResponseAccess(wireMockPort); MsoRequest msoRequest = getMsoRequest(); - Map<String, String> map = new HashMap<>(); + Map<String, Object> map = new HashMap<>(); map.put("key1", "value1"); msoVnfPluginAdapter.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD", "volumeGroupHeatStackId|1", "baseVfHeatStackId", "9b339a61-69ca-465f-86b8-1c72c582b8e8", map, @@ -125,7 +125,7 @@ public class MsoVnfPluginAdapterImplTest extends BaseRestTestUtils { .withBodyFile("OpenstackResponse_Stack_Created_VfModule.json") .withStatus(HttpStatus.SC_OK))); MsoRequest msoRequest = getMsoRequest(); - Map<String, String> map = new HashMap<>(); + Map<String, Object> map = new HashMap<>(); map.put("key1", "value1"); msoVnfPluginAdapter.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD", "volumeGroupHeatStackId", "baseVfHeatStackId", "9b339a61-69ca-465f-86b8-1c72c582b8e8", map, diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/VnfAdapterRestTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/VnfAdapterRestTest.java index c502620920..343b6245e6 100644 --- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/VnfAdapterRestTest.java +++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/VnfAdapterRestTest.java @@ -169,7 +169,7 @@ public class VnfAdapterRestTest extends BaseRestTestUtils { MsoRequest msoReq = new MsoRequest(); boolean failIfExists = true; Boolean enableBridge = null; - Map<String, String> vfModuleParams = new HashMap<String, String>(); + Map<String, Object> vfModuleParams = new HashMap<>(); vfModuleParams.put("vf_module_id", VF_MODULE_ID); @@ -236,7 +236,7 @@ public class VnfAdapterRestTest extends BaseRestTestUtils { MsoRequest msoReq = new MsoRequest(); boolean failIfExists = true; boolean enableBridge = false; - Map<String, String> vfModuleParams = new HashMap<String, String>(); + Map<String, Object> vfModuleParams = new HashMap<>(); vfModuleParams.put("vf_module_id", VF_MODULE_ID); vfModuleParams.put("vnf_id", AAI_VNF_ID); @@ -385,7 +385,7 @@ public class VnfAdapterRestTest extends BaseRestTestUtils { msoRequest.setRequestId(MSO_REQUEST_ID); msoRequest.setServiceInstanceId(MSO_SERVICE_INSTANCE_ID); - Map<String, String> vfModuleParams = new HashMap<String, String>(); + Map<String, Object> vfModuleParams = new HashMap<>(); vfModuleParams.put("exn_direct_net_fqdn", EXN_DIRECT_NET_FQDN); vfModuleParams.put("exn_hsl_net_fqdn", EXN_HSL_NET_FQDN); @@ -511,7 +511,7 @@ public class VnfAdapterRestTest extends BaseRestTestUtils { MsoRequest msoReq = new MsoRequest(); boolean failIfExists = true; boolean enableBridge = false; - Map<String, String> vfModuleParams = new HashMap<String, String>(); + Map<String, Object> vfModuleParams = new HashMap<>(); vfModuleParams.put("vf_module_id", VF_MODULE_ID); vfModuleParams.put("vnf_id", AAI_VNF_ID); diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/VolumeGroupAdapterCommon.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/VolumeGroupAdapterCommon.java index 68982799f1..d0d06aed6c 100644 --- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/VolumeGroupAdapterCommon.java +++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/VolumeGroupAdapterCommon.java @@ -56,7 +56,7 @@ public class VolumeGroupAdapterCommon extends BaseRestTestUtils { request.setModelCustomizationUuid(MODEL_CUSTOMIZATION_UUID); request.setSkipAAI(true); request.setVolumeGroupStackId(VOUME_GROUP_NAME); - Map<String, String> volumeGroupParams = getVolumeGroupParamsMap(); + Map<String, Object> volumeGroupParams = getVolumeGroupParamsMap(); request.setVolumeGroupParams(volumeGroupParams); MsoRequest msoReq = getMsoRequest(); request.setMsoRequest(msoReq); @@ -104,7 +104,7 @@ public class VolumeGroupAdapterCommon extends BaseRestTestUtils { request.setFailIfExists(true); request.setEnableBridge(false); request.setSuppressBackout(true); - Map<String, String> volumeGroupParams = getVolumeGroupParamsMap(); + Map<String, Object> volumeGroupParams = getVolumeGroupParamsMap(); request.setVolumeGroupParams(volumeGroupParams); MsoRequest msoReq = getMsoRequest(); request.setMsoRequest(msoReq); @@ -112,8 +112,8 @@ public class VolumeGroupAdapterCommon extends BaseRestTestUtils { return request; } - private Map<String, String> getVolumeGroupParamsMap() { - Map<String, String> volumeGroupParams = new HashMap<>(); + private Map<String, Object> getVolumeGroupParamsMap() { + Map<String, Object> volumeGroupParams = new HashMap<>(); volumeGroupParams.put("fsb_volume_type_0","volume_type"); volumeGroupParams.put("fsb_volume_image_name_1","vol_img_1"); volumeGroupParams.put("fsb_volume_image_name_0","vol_img_0"); |