aboutsummaryrefslogtreecommitdiffstats
path: root/vid-ext-services-simulator/src
diff options
context:
space:
mode:
authorgolabek <tomasz.golabek@nokia.com>2019-02-11 16:36:49 +0100
committergolabek <tomasz.golabek@nokia.com>2019-02-18 13:49:42 +0100
commite3f8c6d9b3ff4b9c9b82c795a791ea9b5a014c98 (patch)
tree24c174cedd41a9c9d5c5e7b780fbde6aa9e47f5e /vid-ext-services-simulator/src
parent4b8ae0089f38ab06ba319ef439fffb59008e08e5 (diff)
Introduced mocked SO workflows in VID FE
Mocked SO workflows joined with list of workflows from VIDs DB. (Contains: Mocked BE service to return workflow list) Change-Id: I10336238cfeb8819e0a2b3e88cd86c338cab86fa Issue-ID: VID-399 Signed-off-by: Tomasz Golabek <tomasz.golabek@nokia.com>
Diffstat (limited to 'vid-ext-services-simulator/src')
-rw-r--r--vid-ext-services-simulator/src/main/java/org/onap/simulator/controller/SimulatorController.java6
-rw-r--r--vid-ext-services-simulator/src/main/resources/preset_registration/changeManagement/workflows.json23
2 files changed, 23 insertions, 6 deletions
diff --git a/vid-ext-services-simulator/src/main/java/org/onap/simulator/controller/SimulatorController.java b/vid-ext-services-simulator/src/main/java/org/onap/simulator/controller/SimulatorController.java
index b67c98ee9..3c193cdb9 100644
--- a/vid-ext-services-simulator/src/main/java/org/onap/simulator/controller/SimulatorController.java
+++ b/vid-ext-services-simulator/src/main/java/org/onap/simulator/controller/SimulatorController.java
@@ -6,8 +6,6 @@ import org.mockserver.integration.ClientAndServer;
import org.mockserver.matchers.Times;
import org.mockserver.model.HttpRequest;
import org.mockserver.model.HttpResponse;
-import static org.mockserver.model.HttpRequest.request;
-import static org.mockserver.model.HttpResponse.response;
import org.mockserver.model.JsonBody;
import org.onap.simulator.errorHandling.VidSimulatorException;
@@ -35,8 +33,6 @@ import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.*;
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
import java.util.stream.Collectors;
import static org.mockserver.integration.ClientAndServer.startClientAndServer;
@@ -54,7 +50,6 @@ public class SimulatorController {
private Boolean enablePresetRegistration;
private volatile boolean isInitialized = false;
-
Logger logger = LoggerFactory.getLogger(SimulatorController.class);
@PostConstruct
@@ -181,7 +176,6 @@ public class SimulatorController {
}
}
-
@RequestMapping(value = {"/**"})
public String redirectToMockServer(HttpServletRequest request, HttpServletResponse response) {
//Currently, the easiest logic is redirecting
diff --git a/vid-ext-services-simulator/src/main/resources/preset_registration/changeManagement/workflows.json b/vid-ext-services-simulator/src/main/resources/preset_registration/changeManagement/workflows.json
new file mode 100644
index 000000000..f79651be4
--- /dev/null
+++ b/vid-ext-services-simulator/src/main/resources/preset_registration/changeManagement/workflows.json
@@ -0,0 +1,23 @@
+{
+ "simulatorRequest": {
+ "method": "GET",
+ "path": "/so/workflows"
+ } ,
+ "simulatorResponse": {
+ "responseCode": 200,
+ "body": {
+ "workflows":
+ [{
+ "id": 1,
+ "name": "workflow 1"
+ },{
+ "id": 2,
+ "name": "workflow 2"
+ },{
+ "id": 3,
+ "name": "workflow 3"
+ }
+ ]
+ }
+ }
+} \ No newline at end of file