From 8ee7d73022412ebe5d5f95745c54844d7a2b47ef Mon Sep 17 00:00:00 2001 From: Bartosz Gardziejewski Date: Wed, 15 Apr 2020 07:20:35 +0200 Subject: Change rest method access to public Issue-ID: INT-1517 Signed-off-by: Bartosz Gardziejewski Change-Id: I8993d3c45c616890ea1fd08528557e6e25dcb3f8 --- .../java/org/onap/netconfsimulator/kafka/StoreController.java | 6 +++--- .../onap/netconfsimulator/netconfcore/NetconfController.java | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'netconfsimulator') diff --git a/netconfsimulator/src/main/java/org/onap/netconfsimulator/kafka/StoreController.java b/netconfsimulator/src/main/java/org/onap/netconfsimulator/kafka/StoreController.java index 33bbdf7..2a196d9 100644 --- a/netconfsimulator/src/main/java/org/onap/netconfsimulator/kafka/StoreController.java +++ b/netconfsimulator/src/main/java/org/onap/netconfsimulator/kafka/StoreController.java @@ -42,17 +42,17 @@ public class StoreController { } @GetMapping("/ping") - String ping() { + public String ping() { return "pong"; } @GetMapping("cm-history") - List getAllConfigurationChanges() { + public List getAllConfigurationChanges() { return service.getAllMessages(); } @GetMapping("/less") - List less(@RequestParam(value = "offset", required = false, defaultValue = "${spring.kafka.default-offset}") long offset) { + public List less(@RequestParam(value = "offset", required = false, defaultValue = "${spring.kafka.default-offset}") long offset) { return service.getLastMessages(offset); } diff --git a/netconfsimulator/src/main/java/org/onap/netconfsimulator/netconfcore/NetconfController.java b/netconfsimulator/src/main/java/org/onap/netconfsimulator/netconfcore/NetconfController.java index cdb4a8f..05cee88 100644 --- a/netconfsimulator/src/main/java/org/onap/netconfsimulator/netconfcore/NetconfController.java +++ b/netconfsimulator/src/main/java/org/onap/netconfsimulator/netconfcore/NetconfController.java @@ -58,12 +58,12 @@ class NetconfController { } @GetMapping(value = "get", produces = "application/xml") - ResponseEntity getNetconfConfiguration() throws IOException, JNCException { + public ResponseEntity getNetconfConfiguration() throws IOException, JNCException { return ResponseEntity.ok(netconfService.getCurrentConfiguration()); } @GetMapping(value = "get/{model}/{container}", produces = "application/xml") - ResponseEntity getNetconfConfiguration(@PathVariable String model, + public ResponseEntity getNetconfConfiguration(@PathVariable String model, @PathVariable String container) throws IOException { ResponseEntity entity; @@ -79,7 +79,7 @@ class NetconfController { @PostMapping(value = "edit-config", produces = "application/xml") @ResponseStatus(HttpStatus.ACCEPTED) - ResponseEntity editConfig(@RequestPart("editConfigXml") MultipartFile editConfig) + public ResponseEntity editConfig(@RequestPart("editConfigXml") MultipartFile editConfig) throws IOException, JNCException { log.info("Loading updated configuration"); if (editConfig == null || editConfig.isEmpty()) { @@ -91,7 +91,7 @@ class NetconfController { } @PostMapping("model/{moduleName}") - ResponseEntity loadNewYangModel(@RequestBody MultipartFile yangModel, + public ResponseEntity loadNewYangModel(@RequestBody MultipartFile yangModel, @RequestBody MultipartFile initialConfig, @PathVariable String moduleName) throws IOException { LoadModelResponse response = netconfModelLoaderService.loadYangModel(yangModel, initialConfig, moduleName); @@ -101,7 +101,7 @@ class NetconfController { } @DeleteMapping("model/{modelName}") - ResponseEntity deleteYangModel(@PathVariable String modelName) + public ResponseEntity deleteYangModel(@PathVariable String modelName) throws IOException { LoadModelResponse response = netconfModelLoaderService.deleteYangModel(modelName); return ResponseEntity -- cgit 1.2.3-korg