diff options
author | waqas.ikram <waqas.ikram@ericsson.com> | 2018-08-23 13:26:09 +0100 |
---|---|---|
committer | Seshu Kumar M <seshu.kumar.m@huawei.com> | 2018-09-08 04:42:09 +0000 |
commit | 3e9ee0977d0c8643f81e720bbf23e5a40864a0d8 (patch) | |
tree | c020d47d525165c0db3ff3c4376e30b772efb1c3 /adapters/mso-requests-db-adapter/src/main | |
parent | 1fa4f35a1525cdb36513cd43c171240699077f3b (diff) |
Adding rest service for so monitoring
Change-Id: I9dac918998901d54b3cbc5477cc9c057c3019cb3
Issue-ID: SO-724
Signed-off-by: waqas.ikram <waqas.ikram@ericsson.com>
Diffstat (limited to 'adapters/mso-requests-db-adapter/src/main')
-rw-r--r-- | adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/InfraActiveRequestsRepositoryCustomController.java | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/InfraActiveRequestsRepositoryCustomController.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/InfraActiveRequestsRepositoryCustomController.java index 34bf9cb0f5..a476f890cc 100644 --- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/InfraActiveRequestsRepositoryCustomController.java +++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/InfraActiveRequestsRepositoryCustomController.java @@ -20,19 +20,19 @@ package org.onap.so.adapters.requestsdb; +import java.util.List; +import java.util.Map; + import org.onap.so.db.request.beans.InfraActiveRequests; import org.onap.so.db.request.data.controller.InstanceNameDuplicateCheckRequest; import org.onap.so.db.request.data.repository.InfraActiveRequestsRepository; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; - - -import java.util.List; -import java.util.Map; +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 public class InfraActiveRequestsRepositoryCustomController { @@ -59,4 +59,11 @@ public class InfraActiveRequestsRepositoryCustomController { public InfraActiveRequests checkInstanceNameDuplicate(@RequestBody InstanceNameDuplicateCheckRequest instanceNameDuplicateCheckRequest) { return infraActiveRequestsRepository.checkInstanceNameDuplicate(instanceNameDuplicateCheckRequest.getInstanceIdMap(), instanceNameDuplicateCheckRequest.getInstanceName(), instanceNameDuplicateCheckRequest.getRequestScope()); } + + @RequestMapping(method = RequestMethod.POST, value = "/infraActiveRequests/v1/getInfraActiveRequests") + public List<InfraActiveRequests> getInfraActiveRequests(@RequestBody Map<String, String[]> filters, + @RequestParam("from") long startTime, @RequestParam("to") long endTime, + @RequestParam(value = "maxResult", required = false) Integer maxResult) { + return infraActiveRequestsRepository.getInfraActiveRequests(filters, startTime, endTime, maxResult); + } } |