From a92741c73951498d10644635da2335391ac56e02 Mon Sep 17 00:00:00 2001 From: Ittay Stern Date: Thu, 26 Sep 2019 07:50:07 +0300 Subject: Verify partner-name header sent to AAI, SO Issue-ID: VID-253 Change-Id: I80c710db1eb3f48c52b7ecebb234e75a503bf65d Signed-off-by: Ittay Stern --- .../presets/BasePresets/BaseMSOPreset.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'vid-automation/src/main') diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BaseMSOPreset.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BaseMSOPreset.java index 8ad111849..2bc664591 100644 --- a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BaseMSOPreset.java +++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BaseMSOPreset.java @@ -1,12 +1,10 @@ package org.onap.simulator.presetGenerator.presets.BasePresets; -import vid.automation.test.infra.Features; +import static org.apache.commons.lang3.StringUtils.isNotEmpty; import java.util.Map; +import vid.automation.test.infra.Features; -/** - * Created by itzikliderman on 27/12/2017. - */ public abstract class BaseMSOPreset extends BasePreset { public static final String DEFAULT_CLOUD_OWNER = "irma-aic"; @@ -31,14 +29,14 @@ public abstract class BaseMSOPreset extends BasePreset { protected String addCloudOwnerIfNeeded() { return Features.FLAG_1810_CR_ADD_CLOUD_OWNER_TO_MSO_REQUEST.isActive() ? - "\"cloudOwner\": \""+cloudOwner+"\"," : ""; + "\"cloudOwner\": \"" + cloudOwner + "\"," : ""; } protected String addPlatformIfNeeded(String platform) { - return platform != "" ? - " \"platform\": {" + - " \"platformName\": \""+platform+"\"," + - "}," : ""; + return isNotEmpty(platform) ? + " \"platform\": {" + + " \"platformName\": \"" + platform + "\"," + + "}," : ""; } @Override @@ -49,7 +47,7 @@ public abstract class BaseMSOPreset extends BasePreset { @Override public Map getRequestHeaders() { Map map = super.getRequestHeaders(); - map.put("X-ONAP-PartnerName", "VID"); + map.put("X-ONAP-PartnerName", "VID.VID"); return map; } } -- cgit 1.2.3-korg