diff options
author | 2018-07-10 14:20:54 +0300 | |
---|---|---|
committer | 2018-07-10 14:20:54 +0300 | |
commit | c72d565bb58226b20625b2bce5f0019046bee649 (patch) | |
tree | 8658e49595705b02e47ddc14afa20d6bb7123547 /vid-app-common/src/main/java/org/onap/vid/controllers/ProbeController.java | |
parent | ef8a6b47847012fd59ea20da21d8d3d7c4a301ed (diff) |
Merge 1806 code of vid-common
Change-Id: I75d52abed4a24dfe3827d79edc4a2938726aa87a
Issue-ID: VID-208
Signed-off-by: Sonsino, Ofir (os0695) <os0695@intl.att.com>
Diffstat (limited to 'vid-app-common/src/main/java/org/onap/vid/controllers/ProbeController.java')
-rw-r--r-- | vid-app-common/src/main/java/org/onap/vid/controllers/ProbeController.java | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/controllers/ProbeController.java b/vid-app-common/src/main/java/org/onap/vid/controllers/ProbeController.java new file mode 100644 index 00000000..a2145de3 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/controllers/ProbeController.java @@ -0,0 +1,27 @@ +package org.onap.vid.controllers; + +import org.onap.vid.aai.AaiClient; +import org.onap.vid.model.probes.ExternalComponentStatus; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import java.util.ArrayList; +import java.util.List; + +@RestController +@RequestMapping("probe") +public class ProbeController extends RestrictedBaseController { + @Autowired + private AaiClient aaiClient; + + @RequestMapping(method= RequestMethod.GET) + public List<ExternalComponentStatus> getProbe(){ + List<ExternalComponentStatus> componentStatuses = new ArrayList<>(); + componentStatuses.add(aaiClient.probeAaiGetAllSubscribers()); + return componentStatuses; + } + +} |