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/PresetMSOResumeRequest.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/PresetMSOResumeRequest.java')
-rw-r--r-- | vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOResumeRequest.java | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOResumeRequest.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOResumeRequest.java new file mode 100644 index 000000000..ca13f6ad7 --- /dev/null +++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOResumeRequest.java @@ -0,0 +1,48 @@ +package org.onap.simulator.presetGenerator.presets.mso; + +import org.onap.simulator.presetGenerator.presets.BasePresets.BaseMSOPreset; +import org.springframework.http.HttpMethod; + +import java.util.Map; + +public class PresetMSOResumeRequest extends BaseMSOPreset { + + private final String originalRequestId; + private final String requestId; + private final String instanceId; + private final String userId; + + public PresetMSOResumeRequest(String originalRequestId, String requestId, String instanceId, String userId) { + this.originalRequestId = originalRequestId; + this.requestId = requestId; + this.instanceId = instanceId; + this.userId = userId; + } + + @Override + public HttpMethod getReqMethod() { + return HttpMethod.POST; + } + + @Override + public String getReqPath() { + return super.getRootPath() + "/orchestrationRequests/v./" + originalRequestId + "/resume"; + } + + @Override + public int getResponseCode() { + return 202; + } + + @Override + public Object getResponseBody() { + return "{\"requestReferences\":{\"instanceId\":\"" + instanceId + "\",\"requestId\":\"" + requestId + "\"}}"; + } + + @Override + public Map<String, String> getRequestHeaders() { + Map<String, String> map = super.getRequestHeaders(); + map.put("X-RequestorID", userId); + return map; + } +} |