aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src
diff options
context:
space:
mode:
Diffstat (limited to 'vid-app-common/src')
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/controller/AsyncInstantiationController.java15
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/controller/InstantiationTemplatesController.java11
2 files changed, 14 insertions, 12 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/AsyncInstantiationController.java b/vid-app-common/src/main/java/org/onap/vid/controller/AsyncInstantiationController.java
index 3260656ff..6c8a37262 100644
--- a/vid-app-common/src/main/java/org/onap/vid/controller/AsyncInstantiationController.java
+++ b/vid-app-common/src/main/java/org/onap/vid/controller/AsyncInstantiationController.java
@@ -76,20 +76,11 @@ public class AsyncInstantiationController extends VidRestrictedBaseController {
this.auditService = auditService;
}
- /**
- * Gets the new services status.
- * @param request the request
- * @return the services list
- */
@RequestMapping(method = RequestMethod.GET)
- public List<ServiceInfo> getServicesInfo(HttpServletRequest request,
- @RequestParam(value = "serviceModelId", required = false) UUID serviceModelId) {
- if (serviceModelId == null) {
- return asyncInstantiationBL.getAllServicesInfo();
- } else {
- return asyncInstantiationRepository.listInstantiatedServicesByServiceModelId(serviceModelId);
- }
+ public List<ServiceInfo> getServicesInfo(HttpServletRequest request) {
+ return asyncInstantiationBL.getAllServicesInfo();
}
+
@RequestMapping(value = "bulk", method = RequestMethod.POST)
public MsoResponseWrapper2<List<String>> createBulkOfServices(@RequestBody ServiceInstantiation request, HttpServletRequest httpServletRequest) {
//Push to DB according the model
diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/InstantiationTemplatesController.java b/vid-app-common/src/main/java/org/onap/vid/controller/InstantiationTemplatesController.java
index 8aae3d805..ff9add2b6 100644
--- a/vid-app-common/src/main/java/org/onap/vid/controller/InstantiationTemplatesController.java
+++ b/vid-app-common/src/main/java/org/onap/vid/controller/InstantiationTemplatesController.java
@@ -21,9 +21,11 @@
package org.onap.vid.controller;
+import java.util.List;
import java.util.UUID;
import javax.servlet.http.HttpServletRequest;
import org.onap.vid.dal.AsyncInstantiationRepository;
+import org.onap.vid.model.ServiceInfo;
import org.onap.vid.model.serviceInstantiation.ServiceInstantiation;
import org.onap.vid.services.AsyncInstantiationBusinessLogic;
import org.onap.vid.services.InstantiationTemplatesService;
@@ -31,6 +33,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
@@ -53,6 +57,13 @@ public class InstantiationTemplatesController extends VidRestrictedBaseControlle
this.asyncInstantiationRepository = asyncInstantiationRepository;
}
+
+ @GetMapping
+ public List<ServiceInfo> getTemplatesInfo(HttpServletRequest request,
+ @RequestParam(value = "serviceModelId") UUID serviceModelId) {
+ return asyncInstantiationRepository.listInstantiatedServicesByServiceModelId(serviceModelId);
+ }
+
@GetMapping("templateTopology/{jobId}")
public ServiceInstantiation getTemplateTopology(HttpServletRequest request, @PathVariable(value="jobId") UUID jobId) {
return instantiationTemplates.getJobRequestAsTemplate(jobId);