Skip to content

Commit

Permalink
Added the DELETE,UPDATE Method allow more resource
Browse files Browse the repository at this point in the history
  • Loading branch information
sudhakaropsmx committed Nov 8, 2020
1 parent a4e4055 commit 953b7ed
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,27 @@ class OpsmxOesController {
return opsmxOesService.deleteOesResponse4(type, source, source1)
}

@ApiOperation(value = "Endpoint for Oes rest services")
@RequestMapping(value = "/{type}/{source}/{source1}", method = RequestMethod.DELETE)
Object deleteOesResponse5(@PathVariable("type") String type,
@PathVariable("source") String source,
@PathVariable("source1") String source1,
@PathVariable("source2") String source2) {

return opsmxOesService.deleteOesResponse5(type, source, source1, source2)
}

@ApiOperation(value = "Endpoint for Oes rest services")
@RequestMapping(value = "/{type}/{source}/{source1}", method = RequestMethod.DELETE)
Object deleteOesResponse6(@PathVariable("type") String type,
@PathVariable("source") String source,
@PathVariable("source1") String source1,
@PathVariable("source2") String source2,
@PathVariable("source3") String source3) {

return opsmxOesService.deleteOesResponse6(type, source, source1, source2, source3)
}

@ApiOperation(value = "Add or Update dynamic account configured in Spinnaker", response = String.class)
@RequestMapping(value = "/addOrUpdateDynamicAccount", method = RequestMethod.POST)
String addOrUpdateAccount(@RequestParam MultipartFile files, @RequestParam Map<String, String> postData) {
Expand Down Expand Up @@ -195,6 +216,31 @@ class OpsmxOesController {
return opsmxOesService.updateOesResponse4(type, source, source1, data)
}

@ApiOperation(value = "Endpoint for Oes rest services")
@RequestMapping(value = "/{type}/{source}/{source1}", method = RequestMethod.PUT)
Object updateOesResponse5(@PathVariable("type") String type,
@PathVariable("source") String source,
@PathVariable("source1") String source1,
@PathVariable("source2") String source2,
@RequestBody Object data) {

return opsmxOesService.updateOesResponse5(type, source, source1, source2, data)
}

@ApiOperation(value = "Endpoint for Oes rest services")
@RequestMapping(value = "/{type}/{source}/{source1}", method = RequestMethod.PUT)
Object updateOesResponse6(@PathVariable("type") String type,
@PathVariable("source") String source,
@PathVariable("source1") String source1,
@PathVariable("source2") String source2,
@PathVariable("source3") String source3,
@RequestBody Object data) {

return opsmxOesService.updateOesResponse6(type, source, source1, source2, source3, data)
}



private String addOrUpdateDynamicAccount(byte[] bytes, String filename, String data) {

AuthenticatedRequest.propagate {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,19 @@ interface OpsmxOesService {
@Path('source') String source,
@Path('source1') String source1)

@DELETE("/oes/{type}/{source}/{source1}/{source2}")
Object deleteOesResponse5(@Path('type') String type,
@Path('source') String source,
@Path('source1') String source1,
@Path('source2') String source2)

@DELETE("/oes/{type}/{source}/{source1}/{source2}/{source3}")
Object deleteOesResponse6(@Path('type') String type,
@Path('source') String source,
@Path('source1') String source1,
@Path('source2') String source2,
@Path('source3') String source3)

@POST("/oes/{type}/{source}")
Object postOesResponse(@Path('type') String type,
@Path('source') String source,
Expand Down Expand Up @@ -98,4 +111,19 @@ interface OpsmxOesService {
@Path('source') String source,
@Path('source1') String source1,
@Body Object data)

@PUT("/oes/{type}/{source}/{source1}/{source2}")
Object updateOesResponse5(@Path('type') String type,
@Path('source') String source,
@Path('source1') String source1,
@Path('source2') String source2,
@Body Object data)

@PUT("/oes/{type}/{source}/{source1}/{source2}/{source3}")
Object updateOesResponse6(@Path('type') String type,
@Path('source') String source,
@Path('source1') String source1,
@Path('source2') String source2,
@Path('source3') String source3,
@Body Object data)
}

0 comments on commit 953b7ed

Please sign in to comment.