From 7d9a8742d4bf5f0d98003b6836b09f6ff17b0331 Mon Sep 17 00:00:00 2001 From: MD IRSHAD SHEIKH Date: Sat, 22 May 2021 22:45:54 +0530 Subject: Added CSIT for Macroflow with HELM Issue-ID: SO-3585 Signed-off-by: MD IRSHAD SHEIKH Change-Id: I3eb3ec1005f19fc109e28b1e709bdc0d32f1180a --- .../controller/MultiCloudController.java | 32 +++++++++++----------- .../src/main/resources/application.yaml | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) (limited to 'plans/so/integration-etsi-testing') diff --git a/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/controller/MultiCloudController.java b/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/controller/MultiCloudController.java index c99e246e..8361f240 100644 --- a/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/controller/MultiCloudController.java +++ b/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/controller/MultiCloudController.java @@ -30,14 +30,13 @@ import org.onap.so.multicloudsimulator.beans.MulticloudRequest; import org.springframework.http.ResponseEntity; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.GetMapping; import java.io.IOException; import java.io.InputStream; @@ -45,22 +44,22 @@ import java.io.InputStream; import static org.onap.so.multicloudsimulator.utils.Constants.BASE_URL; @RestController -@RequestMapping(path = BASE_URL) public class MultiCloudController { public static final String X_HTTP_METHOD_OVERRIDE = "X-HTTP-Method-Override"; private static final Logger LOGGER = LoggerFactory.getLogger(MultiCloudController.class); - @PostMapping(value = "/v1/instance") + @PostMapping("/v1/instance") public ResponseEntity createInstance(@RequestBody MulticloudInstanceRequest req) { - System.out.println("MultiCloud createInstance "); + LOGGER.info("MultiCloud createInstance "); final InstanceResponse InstanceResponse = new InstanceResponse(); - LOGGER.info("Calling createInstance"); - return ResponseEntity.ok(InstanceResponse); + LOGGER.info("Calling v1 instance method"); + return ResponseEntity.ok(req); } - @GetMapping(value = "/{cloud-owner}/{cloud-region-id}/infra_workload", produces = { MediaType.APPLICATION_JSON }) + @GetMapping(value = BASE_URL + "/{cloud-owner}/{cloud-region-id}/infra_workload", + produces = { MediaType.APPLICATION_JSON }) public ResponseEntity getInstance(@PathVariable("cloud-owner") String cloudOwner, @PathVariable("cloud-region-id") String cloudRegionId, @RequestParam(value = "depth", required = false, defaultValue = "0") Integer depth, @@ -76,8 +75,9 @@ public class MultiCloudController { return ResponseEntity.ok(output); } - @PostMapping(value = "/{cloud-owner}/{cloud-region-id}/infra_workload", consumes = { MediaType.APPLICATION_JSON, - MediaType.APPLICATION_XML }, produces = { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) + @PostMapping(value = BASE_URL + "/{cloud-owner}/{cloud-region-id}/infra_workload", + consumes = { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }, + produces = { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public ResponseEntity postCreateInstance(@RequestBody final MulticloudCreateResponse inputRequest, @PathVariable("cloud-owner") final String cloudOwner, @PathVariable("cloud-region-id") final String cloudRegionId, @@ -94,8 +94,8 @@ public class MultiCloudController { return ResponseEntity.status(201).body(inputRequest); } - @GetMapping(value = "/{cloud-owner}/{cloud-region-id}/infra_workload/{workload-id}", produces = { - MediaType.APPLICATION_JSON }) + @GetMapping(value = BASE_URL + "/{cloud-owner}/{cloud-region-id}/infra_workload/{workload-id}", + produces = {MediaType.APPLICATION_JSON }) public ResponseEntity getInstanceName(@PathVariable("cloud-owner") final String cloudOwner, @PathVariable("cloud-region-id") final String cloudRegionId, @PathVariable("workload-id") final String workloadId, @RequestParam(value = "depth", required = false, defaultValue = "0") final Integer depth, @@ -112,9 +112,9 @@ public class MultiCloudController { return ResponseEntity.ok(output); } - @PostMapping(value = "/{cloud-owner}/{cloud-region-id}/infra_workload/{workload-id}", consumes = { - MediaType.APPLICATION_JSON, - MediaType.APPLICATION_XML }, produces = { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) + @PostMapping(value = BASE_URL + "/{cloud-owner}/{cloud-region-id}/infra_workload/{workload-id}", + consumes = {MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }, + produces = { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public ResponseEntity postCreateInstanceName(@RequestBody final MulticloudRequest inputRequest, @PathVariable("cloud-owner") final String cloudOwner, @PathVariable("workload-id") String workloadId, @PathVariable("cloud-region-id") final String cloudRegionId, diff --git a/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/resources/application.yaml b/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/resources/application.yaml index 393d1b7b..c24b9dc1 100644 --- a/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/resources/application.yaml +++ b/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/resources/application.yaml @@ -1,5 +1,5 @@ server: - port: 9996 + port: 9015 tomcat: max-threads: 4 ssl-enable: false -- cgit 1.2.3-korg