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 | |
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')
-rw-r--r-- | src/main/java/org/onap/a1pesimulator/controller/RanCellController.java | 6 | ||||
-rw-r--r-- | src/main/java/org/onap/a1pesimulator/controller/RanEventConfigureController.java | 9 |
2 files changed, 8 insertions, 7 deletions
diff --git a/src/main/java/org/onap/a1pesimulator/controller/RanCellController.java b/src/main/java/org/onap/a1pesimulator/controller/RanCellController.java index f79cb64..10dfe2b 100644 --- a/src/main/java/org/onap/a1pesimulator/controller/RanCellController.java +++ b/src/main/java/org/onap/a1pesimulator/controller/RanCellController.java @@ -126,13 +126,13 @@ public class RanCellController { return ResponseEntity.accepted().build(); } - @GetMapping(value = "/{identifier}/eventStructure") - public ResponseEntity<VesEvent> getVesEventStructure(final @PathVariable String identifier) { + @GetMapping(value = "/{identifier}/pmConfig") + public ResponseEntity<RanPeriodicEvent> getPMConfig(final @PathVariable String identifier) { checkIfCellExistOrThrowException(identifier); if (!ranVesBrokerService.getEnabledEventElementIdentifiers().contains(identifier)) { return ResponseEntity.notFound().build(); } - return ResponseEntity.ok(ranVesBrokerService.getEventStructure(identifier)); + return ResponseEntity.ok(ranVesBrokerService.getPeriodicEvent(identifier)); } private Integer getInterval(Integer requested) { 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(); } } |