Skip to content

Commit

Permalink
OP 21132: Feature-multi spinnaker configuration - Adding cdNames para…
Browse files Browse the repository at this point in the history
…m for platform and audit apis (#444)
  • Loading branch information
emanipravallika authored Nov 16, 2023
1 parent 3726ab1 commit 2b54fd2
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ class OpsmxPlatformController {
@RequestParam(value = "applicationId", required = false) Integer applicationId,
@RequestParam(value = "applicationName", required = false) String applicationName,
@RequestParam(value = "noOfDays", required = false) Integer noOfDays,
@RequestParam(value = "filterBy", required = false) String filterBy) {
return opsmxPlatformService.getPlatformResponse1(version, type, datasourceType, accountName, source, permission, search, username, pageNo, pageLimit, sortBy, sortOrder, applicationId, applicationName, noOfDays, filterBy)
@RequestParam(value = "filterBy", required = false) String filterBy,
@RequestParam(value = "cdName", required = false) List<String> cdNames) {
return opsmxPlatformService.getPlatformResponse1(version, type, datasourceType, accountName, source, permission, search, username, pageNo, pageLimit, sortBy, sortOrder, applicationId, applicationName, noOfDays, filterBy, cdNames)
}

@ApiOperation(value = "Endpoint for platform rest services")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ interface OpsmxPlatformService {
@Query("applicationId") Integer applicationId,
@Query("applicationName") String applicationName,
@Query("noOfDays") Integer noOfDays,
@Query("filterBy") String filterBy)
@Query("filterBy") String filterBy,
@Query("cdName") List<String> cdNames)

@GET("/platformservice/{version}/{type}/{source}")
Object getPlatformResponse(@Path('version') String version,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ class OpsmxAuditClientServiceController {
@RequestParam(value = "sortOrder", required = false) String sortOrder,
@RequestParam(value = "sortBy", required = false) String sortBy,
@RequestParam(value = "startDate", required = false) Long startDate,
@RequestParam(value = "endDate", required = false) Long endDate) {
return opsmxAuditClientService.getAuditClientResponse3(version, type, source, source1, isTreeView, isLatest, pageNo, pageLimit, noOfDays, search, sortOrder, sortBy, startDate, endDate)
@RequestParam(value = "endDate", required = false) Long endDate,
@RequestParam(value = "cdName", required = false) List<String> cdNames) {
return opsmxAuditClientService.getAuditClientResponse3(version, type, source, source1, isTreeView, isLatest, pageNo, pageLimit, noOfDays, search, sortOrder, sortBy, startDate, endDate, cdNames)
}

@ApiOperation(value = "Endpoint for audit-client rest services")
Expand All @@ -104,9 +105,10 @@ class OpsmxAuditClientServiceController {
@RequestParam(value = "updatedTimestamp", required = false) Long updatedTimestamp,
@RequestParam(value = "size", required = false) Integer size,
@RequestParam(value = "startDate", required = false) Long startDate,
@RequestParam(value = "endDate", required = false) Long endDate) {
@RequestParam(value = "endDate", required = false) Long endDate,
@RequestParam(value = "cdName", required = false) List<String> cdNames) {

return opsmxAuditClientService.getAuditClientResponse4(version, type, source, source1, source2, noOfDays, updatedTimestamp, size, startDate, endDate)
return opsmxAuditClientService.getAuditClientResponse4(version, type, source, source1, source2, noOfDays, updatedTimestamp, size, startDate, endDate, cdNames)
}

@ApiOperation(value = "Endpoint for audit-client rest services")
Expand All @@ -119,8 +121,9 @@ class OpsmxAuditClientServiceController {
@PathVariable("source3") String source3,
@RequestParam(value = "noOfDays", required = false) String noOfDays,
@RequestParam(value = "startDate", required = false) Long startDate,
@RequestParam(value = "endDate", required = false) Long endDate) {
return opsmxAuditClientService.getAuditClientResponse5(version, type, source, source1, source2, source3, noOfDays, startDate, endDate)
@RequestParam(value = "endDate", required = false) Long endDate,
@RequestParam(value = "cdName", required = false) List<String> cdNames) {
return opsmxAuditClientService.getAuditClientResponse5(version, type, source, source1, source2, source3, noOfDays, startDate, endDate, cdNames)
}

@ApiOperation(value = "Endpoint for audit-client rest services")
Expand Down Expand Up @@ -161,8 +164,9 @@ class OpsmxAuditClientServiceController {
@RequestParam(value = "size", required = false) Integer size,
@RequestParam(value = "noOfDays", required = false) String noOfDays,
@RequestParam(value = "startDate", required = false) Long startDate,
@RequestParam(value = "endDate", required = false) Long endDate) {
Response response = opsmxAuditClientService.downloadCSVFile(version, username, source, isTreeView, isLatest, pageNo, size, noOfDays, startDate, endDate)
@RequestParam(value = "endDate", required = false) Long endDate,
@RequestParam(value = "cdName", required = false) List<String> cdNames) {
Response response = opsmxAuditClientService.downloadCSVFile(version, username, source, isTreeView, isLatest, pageNo, size, noOfDays, startDate, endDate, cdNames)
log.info("response for the insgiths endpoint:" + response.getHeaders())
if (response.getBody()!=null) {
InputStream inputStream = response.getBody().in()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ interface OpsmxAuditClientService {
@Query("sortOrder") String sortOrder,
@Query("sortBy") String sortBy,
@Query("startDate") Long startDate,
@Query("endDate") Long endDate)
@Query("endDate") Long endDate,
@Query("cdNames") List<String> cdNames)

@GET("/auditclientservice/{version}/{type}/{source}/{source1}/{source2}")
Object getAuditClientResponse4(@Path('version') String version,
Expand All @@ -76,7 +77,8 @@ interface OpsmxAuditClientService {
@Query("updatedTimestamp") Long updatedTimestamp,
@Query("size") Integer size,
@Query("startDate") Long startDate,
@Query("endDate") Long endDate)
@Query("endDate") Long endDate,
@Query("cdNames") List<String> cdNames)

@GET("/auditclientservice/{version}/{type}/{source}/{source1}/{source2}/{source3}")
Object getAuditClientResponse5(@Path('version') String version,
Expand All @@ -87,7 +89,8 @@ interface OpsmxAuditClientService {
@Path('source3') String source3,
@Query("noOfDays") String noOfDays,
@Query("startDate") Long startDate,
@Query("endDate") Long endDate)
@Query("endDate") Long endDate,
@Query("cdNames") List<String> cdNames)

@GET("/auditclientservice/{version}/{type}/{source}/{source1}/{source2}/{source3}/{source4}")
Object getAuditClientResponse6(@Path('version') String version,
Expand Down Expand Up @@ -118,7 +121,8 @@ interface OpsmxAuditClientService {
@Query("size") Integer size,
@Query("noOfDays") String noOfDays,
@Query("startDate") Long startDate,
@Query("endDate") Long endDate)
@Query("endDate") Long endDate,
@Query("cdNames") List<String> cdNames)

@GET("/auditclientservice/{version}/{type}/{source}/download")
Response downloadDeliveryInsightsCSVFile(@Path('version') String version,
Expand Down

0 comments on commit 2b54fd2

Please sign in to comment.