diff options
author | Ittay Stern <ittay.stern@att.com> | 2019-09-26 07:50:07 +0300 |
---|---|---|
committer | Ittay Stern <ittay.stern@att.com> | 2019-10-02 12:38:31 +0300 |
commit | a92741c73951498d10644635da2335391ac56e02 (patch) | |
tree | 1553e9e9cf7288165c960544f508817c90db2968 /vid-automation/src/main/java | |
parent | 32208b52da320c4013b577b55dde8f41bebaa240 (diff) |
Verify partner-name header sent to AAI, SO
Issue-ID: VID-253
Change-Id: I80c710db1eb3f48c52b7ecebb234e75a503bf65d
Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-automation/src/main/java')
-rw-r--r-- | vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BaseMSOPreset.java | 18 |
1 files changed, 8 insertions, 10 deletions
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<String, String> getRequestHeaders() { Map<String, String> map = super.getRequestHeaders(); - map.put("X-ONAP-PartnerName", "VID"); + map.put("X-ONAP-PartnerName", "VID.VID"); return map; } } |