diff options
Diffstat (limited to 'vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/aaf')
2 files changed, 57 insertions, 0 deletions
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/aaf/AAFGetBasicAuthPreset.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/aaf/AAFGetBasicAuthPreset.java new file mode 100644 index 000000000..f7900d14b --- /dev/null +++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/aaf/AAFGetBasicAuthPreset.java @@ -0,0 +1,31 @@ +package org.onap.simulator.presetGenerator.presets.aaf; + +import com.google.common.collect.ImmutableMap; +import org.onap.simulator.presetGenerator.presets.BasePresets.BasePreset; +import org.springframework.http.HttpMethod; + +import java.util.Map; + +public class AAFGetBasicAuthPreset extends BasePreset { + public static final String VALID_AUTH_VALUE = "bTEyMzRAYXR0LmNvbTphYWFh"; + + @Override + public HttpMethod getReqMethod() { + return HttpMethod.GET; + } + + @Override + public String getReqPath() { + return "/authn/basicAuth"; + } + + @Override + protected String getRootPath() { + return ""; + } + + @Override + public Map<String, String> getRequestHeaders() { + return ImmutableMap.of("Authorization", "Basic " + VALID_AUTH_VALUE); + } +} diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/aaf/AAFGetUrlServicePreset.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/aaf/AAFGetUrlServicePreset.java new file mode 100644 index 000000000..b3376e61a --- /dev/null +++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/aaf/AAFGetUrlServicePreset.java @@ -0,0 +1,26 @@ +package org.onap.simulator.presetGenerator.presets.aaf; + +import org.onap.simulator.presetGenerator.presets.BasePresets.BasePreset; +import org.springframework.http.HttpMethod; + +public class AAFGetUrlServicePreset extends BasePreset { + @Override + public HttpMethod getReqMethod() { + return HttpMethod.GET; + } + + @Override + public String getReqPath() { + return "/locate/com.att.aaf.service:2.0"; + } + + @Override + protected String getRootPath() { + return ""; + } + + @Override + public Object getResponseBody() { + return "{\"endpoint\":[{\"name\":\"com.att.aaf.service\",\"major\": 2,\"minor\": 0,\"patch\": 19,\"pkg\": 21,\"latitude\": 38.627346,\"longitude\": -90.19377,\"protocol\": \"http\",\"subprotocol\": [],\"hostname\": \"127.0.0.1\",\"port\": 1080}]}"; + } +} |