Skip to content

Commit

Permalink
Merge pull request #55 from Pranav-b-7/OP-3829
Browse files Browse the repository at this point in the history
Bypass the external CD tool request and create entries for all new au…
  • Loading branch information
sriharshakancharla authored Nov 9, 2020
2 parents 60298af + 0462f05 commit 1696729
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ class AuthConfig {
.antMatchers('/auth/user').permitAll()
.antMatchers(HttpMethod.POST,'/autopilot/registerCanary').permitAll()
.antMatchers(HttpMethod.GET,'/autopilot/canaries/{id}').permitAll()
.antMatchers(HttpMethod.POST,'/visibilityservice/v1/approvalGates/{id}/trigger').permitAll()
.antMatchers(HttpMethod.GET,'/autopilot/mgmt/**').permitAll()
.antMatchers('/plugins/deck/**').permitAll()
.antMatchers(HttpMethod.POST, '/webhooks/**').permitAll()
Expand Down Expand Up @@ -130,6 +131,7 @@ class AuthConfig {
.antMatchers("/auth/login").permitAll()
.antMatchers(HttpMethod.POST,'/autopilot/registerCanary').permitAll()
.antMatchers(HttpMethod.GET,'/autopilot/canaries/{id}').permitAll()
.antMatchers(HttpMethod.POST,'/visibilityservice/v1/approvalGates/{id}/trigger').permitAll()
.antMatchers(HttpMethod.GET,'/autopilot/mgmt/**').permitAll()
.antMatchers('/**/favicon.ico').permitAll()
.antMatchers(HttpMethod.OPTIONS, "/**").permitAll()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,18 @@ class OpsmxAutopilotController {
return opsmxAutopilotService.deleteAutoResponse5(type, source, source1, source2, source3)
}

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

return opsmxAutopilotService.deleteAutoResponse6(type, source, source1, source2, source3, source4)
}

@ApiOperation(value = "Endpoint for autopilot rest services")
@RequestMapping(value = "/{type}", method = RequestMethod.POST)
Object postAutoResponse(@PathVariable("type") String type,
Expand Down Expand Up @@ -259,9 +271,10 @@ class OpsmxAutopilotController {
@PathVariable("source") String source,
@PathVariable("source1") String source1,
@PathVariable("source2") String source2,
@RequestParam(value = "isEdit", required = false) Boolean isEdit,
@RequestBody(required = false) Object data) {

return opsmxAutopilotService.postAutoResponse5(type, source, source1, source2, data)
return opsmxAutopilotService.postAutoResponse5(type, source, source1, source2, isEdit, data)
}

@ApiOperation(value = "Endpoint for autopilot rest services")
Expand Down Expand Up @@ -339,4 +352,18 @@ class OpsmxAutopilotController {
return opsmxAutopilotService.updateAutopilotResponse5(type, source, source1, source2, source3, source4, data)
}

@ApiOperation(value = "Endpoint for autopilot rest services")
@RequestMapping(value = "/{type}/{source}/{source1}/{source2}/{source3}/{source4}/{source5}", method = RequestMethod.PUT)
Object updatePlatformResponse4(@PathVariable("type") String type,
@PathVariable("source") String source,
@PathVariable("source1") String source1,
@PathVariable("source2") String source2,
@PathVariable("source3") String source3,
@PathVariable("source4") String source4,
@PathVariable("source5") String source5,
@RequestBody(required = false) Object data) {

return opsmxAutopilotService.updateAutopilotResponse6(type, source, source1, source2, source3, source4, source5, data)
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,14 @@ interface OpsmxAutopilotService {
@Path('source2') String source2,
@Path('source3') String source3)

@DELETE("/autopilot/{type}/{source}/{source1}/{source2}/{source3}/{source4}")
Object deleteAutoResponse6(@Path('type') String type,
@Path('source') String source,
@Path('source1') String source1,
@Path('source2') String source2,
@Path('source3') String source3,
@Path('source4') String source4)

@POST("/autopilot/{type}")
Object postAutoResponse(@Path('type') String type,
@Body Object data)
Expand All @@ -171,6 +179,7 @@ interface OpsmxAutopilotService {
@Path('source') String source,
@Path('source1') String source1,
@Path('source2') String source2,
@Query("isEdit") Boolean isEdit,
@Body Object data)

@POST("/autopilot/{type}/{source}/{source1}/{source2}/{source3}")
Expand Down Expand Up @@ -220,4 +229,14 @@ interface OpsmxAutopilotService {
@Path('source4') String source4,
@Body Object data)

@PUT("/autopilot/{type}/{source}/{source1}/{source2}/{source3}/{source4}/{source5}")
Object updateAutopilotResponse6(@Path('type') String type,
@Path('source') String source,
@Path('source1') String source1,
@Path('source2') String source2,
@Path('source3') String source3,
@Path('source4') String source4,
@Path('source5') String source5,
@Body Object data)

}

0 comments on commit 1696729

Please sign in to comment.