diff options
author | 2019-07-08 15:46:44 +0300 | |
---|---|---|
committer | 2019-07-08 18:50:38 +0300 | |
commit | f4dff328c0386c8901b5841943b11f0c13b3169f (patch) | |
tree | 4e64c3ee540410b2593c1ebecd0dddd3a4780592 /vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOOrchestrationRequestGet.java | |
parent | f792671ae247a931f34d902e9276202b5016ef9a (diff) |
Merge from ecomp 718fd196 - Integration Tests
Issue-ID: VID-378
Change-Id: Icc0bdb9ef37b1d429d47c2070f76d1ee63ad7489
Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOOrchestrationRequestGet.java')
-rw-r--r-- | vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOOrchestrationRequestGet.java | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOOrchestrationRequestGet.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOOrchestrationRequestGet.java index 381ac856b..602e32df4 100644 --- a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOOrchestrationRequestGet.java +++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOOrchestrationRequestGet.java @@ -1,16 +1,23 @@ package org.onap.simulator.presetGenerator.presets.mso; +import com.google.common.collect.ImmutableMap; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.onap.simulator.presetGenerator.presets.BasePresets.BaseMSOPreset; import org.springframework.http.HttpMethod; +import vid.automation.test.infra.Features; import java.time.Instant; import java.time.ZoneOffset; import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; import java.time.temporal.ChronoUnit; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +import static java.util.Collections.singletonList; /** * Created by itzikliderman on 13/12/2017. @@ -26,6 +33,7 @@ public class PresetMSOOrchestrationRequestGet extends BaseMSOPreset { private String statusMessage; private String requestState; private int startedHoursAgo = 1; + private boolean isDetailed = true; public PresetMSOOrchestrationRequestGet() { @@ -38,6 +46,16 @@ public class PresetMSOOrchestrationRequestGet extends BaseMSOPreset { this.requestId = DEFAULT_REQUEST_ID; } + /** + * @param requestState + * @param isDetailed - is expect to query param format=detail. Angular1 flows dont' expect it + */ + public PresetMSOOrchestrationRequestGet(String requestState, boolean isDetailed) { + this.requestState = requestState; + this.requestId = DEFAULT_REQUEST_ID; + this.isDetailed = isDetailed; + } + public PresetMSOOrchestrationRequestGet(String requestState, String overrideRequestId) { this.requestState = requestState; this.requestId = overrideRequestId; @@ -49,6 +67,16 @@ public class PresetMSOOrchestrationRequestGet extends BaseMSOPreset { this.statusMessage = statusMessage; } + /** + * @param isDetailed - is expect to query param format=detail. Angular1 flows dont' expect it + */ + public PresetMSOOrchestrationRequestGet(String requestState, String overrideRequestId, String statusMessage, boolean isDetailed) { + this.requestState = requestState; + this.requestId = overrideRequestId; + this.statusMessage = statusMessage; + this.isDetailed = isDetailed; + } + public PresetMSOOrchestrationRequestGet(String requestState, String overrideRequestId, String statusMessage, int startedHoursAgo) { this.requestState = requestState; this.requestId = overrideRequestId; @@ -72,6 +100,13 @@ public class PresetMSOOrchestrationRequestGet extends BaseMSOPreset { } @Override + public Map<String, List> getQueryParams() { + return (isDetailed && Features.FLAG_1908_RESUME_MACRO_SERVICE.isActive()) ? + ImmutableMap.of("format", singletonList("detail")) : + Collections.emptyMap(); + } + + @Override public Object getResponseBody() { String body = "{" + " \"request\": {" + |