diff options
author | k.kedron <k.kedron@partner.samsung.com> | 2021-09-16 17:08:30 +0200 |
---|---|---|
committer | Krystian Kedron <k.kedron@partner.samsung.com> | 2021-09-20 10:55:29 +0000 |
commit | f1563a03cabc572d1cd15260befdaa8808048fbf (patch) | |
tree | 11e08a9141b82b444957bff6dfdae6358daf3ed9 /src/main/java/org/onap/a1pesimulator/controller/RanEventConfigureController.java | |
parent | 5cdf20e8b9a1a3fef125b760591b934dfeeb2787 (diff) |
Add support for reportingMethod
In GlobalVesConfiguration
Also update eventStructure endpoint
Issue-ID: INT-1945
Signed-off-by: Krystian Kedron <k.kedron@partner.samsung.com>
Change-Id: I49add658f9a70bcff3292e35ae76a68ce3ba5b77
Diffstat (limited to 'src/main/java/org/onap/a1pesimulator/controller/RanEventConfigureController.java')
-rw-r--r-- | src/main/java/org/onap/a1pesimulator/controller/RanEventConfigureController.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/org/onap/a1pesimulator/controller/RanEventConfigureController.java b/src/main/java/org/onap/a1pesimulator/controller/RanEventConfigureController.java index 5efe07a..5b5037c 100644 --- a/src/main/java/org/onap/a1pesimulator/controller/RanEventConfigureController.java +++ b/src/main/java/org/onap/a1pesimulator/controller/RanEventConfigureController.java @@ -23,7 +23,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController -@RequestMapping({"${restapi.version}/ran/eventConfig"}) +@RequestMapping({"${restapi.version}/ran/globalPMConfig"}) public class RanEventConfigureController { private final RanVesBrokerService ranVesBrokerService; @@ -33,16 +33,17 @@ public class RanEventConfigureController { } @GetMapping - public ResponseEntity<GlobalVesConfiguration> getEventConfig() { + public ResponseEntity<GlobalVesConfiguration> getGlobalPMConfig() { GlobalVesConfiguration config = new GlobalVesConfiguration(ranVesBrokerService.getGlobalVesInterval(), - ranVesBrokerService.getGlobalPmVesStructure()); + ranVesBrokerService.getGlobalPmVesStructure(), ranVesBrokerService.getGlobalReportingMethod()); return ResponseEntity.ok(config); } @PostMapping - public ResponseEntity<Void> setEventConfig(final @RequestBody GlobalVesConfiguration config) { + public ResponseEntity<Void> setGlobalPMConfig(final @RequestBody GlobalVesConfiguration config) { ranVesBrokerService.setGlobalPmVesStructure(config.getEvent()); ranVesBrokerService.setGlobalVesInterval(config.getInterval()); + ranVesBrokerService.setGlobalReportingMethod(config.getReportingMethod()); return ResponseEntity.ok().build(); } } |