aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/java/org/onap/vid/mso/rest
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-app-common/src/main/java/org/onap/vid/mso/rest
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-app-common/src/main/java/org/onap/vid/mso/rest')
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/mso/rest/MockedWorkflowsRestClient.java33
1 files changed, 33 insertions, 0 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/rest/MockedWorkflowsRestClient.java b/vid-app-common/src/main/java/org/onap/vid/mso/rest/MockedWorkflowsRestClient.java
new file mode 100644
index 000000000..313710ebd
--- /dev/null
+++ b/vid-app-common/src/main/java/org/onap/vid/mso/rest/MockedWorkflowsRestClient.java
@@ -0,0 +1,33 @@
+package org.onap.vid.mso.rest;
+
+import java.util.Collections;
+import org.jetbrains.annotations.NotNull;
+import org.onap.vid.client.SyncRestClient;
+import org.onap.vid.model.SOWorkflows;
+import org.onap.vid.mso.MsoResponseWrapper2;
+
+public class MockedWorkflowsRestClient {
+
+ private SyncRestClient syncRestClient;
+ private String baseUrl;
+
+ public MockedWorkflowsRestClient(SyncRestClient syncRestClient, String baseUrl) {
+ this.syncRestClient = syncRestClient;
+ this.baseUrl = baseUrl;
+ }
+
+ public MsoResponseWrapper2<SOWorkflows> getWorkflows(String vnfName) {
+ // Temporary skip vnfName and call mocked service
+ return new MsoResponseWrapper2<>(syncRestClient
+ .get(getWorkflowsUrl(),
+ Collections.emptyMap(),
+ Collections.emptyMap(),
+ SOWorkflows.class));
+ }
+
+ @NotNull
+ private String getWorkflowsUrl() {
+ return baseUrl + "so/workflows";
+ }
+
+}