From 6bde5586194384a1f75d3589e3abe215b9b2bb66 Mon Sep 17 00:00:00 2001 From: vivek-opsmx Date: Mon, 11 Mar 2024 15:12:08 +0530 Subject: [PATCH 1/5] Added Boolean Flag to download the argo manifest file --- .../spinnaker/gate/controllers/OpsmxOesController.groovy | 3 ++- .../spinnaker/gate/services/internal/OpsmxOesService.groovy | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gate-web/src/main/groovy/com/netflix/spinnaker/gate/controllers/OpsmxOesController.groovy b/gate-web/src/main/groovy/com/netflix/spinnaker/gate/controllers/OpsmxOesController.groovy index 767fa59286..bfc7947393 100644 --- a/gate-web/src/main/groovy/com/netflix/spinnaker/gate/controllers/OpsmxOesController.groovy +++ b/gate-web/src/main/groovy/com/netflix/spinnaker/gate/controllers/OpsmxOesController.groovy @@ -513,8 +513,9 @@ class OpsmxOesController { @RequestParam(value = "nameSpace", required = false) String nameSpace, @RequestParam(value = "argoCdUrl", required = false) String argoCdUrl, @RequestParam(value ="rolloutsEnabled", required = false) Boolean rolloutsEnabled, + @PathVariable(value ="updatedFlag", required = false) Boolean updatedFlag, @RequestParam(value = "isdUrl", required = false) String isdUrl) { - Response response = opsmxOesService.agentManifestDownloadFile(type, source, source1, description, isExists, nameSpace, argoCdUrl, rolloutsEnabled, isdUrl) + Response response = opsmxOesService.agentManifestDownloadFile(type, source, source1, description, isExists, nameSpace, argoCdUrl, rolloutsEnabled, updatedFlag,isdUrl) InputStream inputStream = response.getBody().in() try { byte[] manifestFile = IOUtils.toByteArray(inputStream) diff --git a/gate-web/src/main/groovy/com/netflix/spinnaker/gate/services/internal/OpsmxOesService.groovy b/gate-web/src/main/groovy/com/netflix/spinnaker/gate/services/internal/OpsmxOesService.groovy index 03c13e7ce9..503ff48d67 100644 --- a/gate-web/src/main/groovy/com/netflix/spinnaker/gate/services/internal/OpsmxOesService.groovy +++ b/gate-web/src/main/groovy/com/netflix/spinnaker/gate/services/internal/OpsmxOesService.groovy @@ -37,6 +37,7 @@ interface OpsmxOesService { @Query("nameSpace") String nameSpace, @Query("argoCdUrl") String argoCdUrl, @Query("rolloutsEnabled") boolean rolloutsEnabled, + @Path("updatedFlag") boolean updatedFlag, @Query("isdUrl") String isdUrl) @GET("/oes/accountsConfig/{version}/agents/{agentName}/manifest/apple/automation") From e79ca1771b74de97a93327d3e711123daf04746a Mon Sep 17 00:00:00 2001 From: vivek-opsmx Date: Mon, 11 Mar 2024 16:00:25 +0530 Subject: [PATCH 2/5] changed to pathvariable to RequestParam --- .../spinnaker/gate/controllers/OpsmxOesController.groovy | 2 +- .../spinnaker/gate/services/internal/OpsmxOesService.groovy | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gate-web/src/main/groovy/com/netflix/spinnaker/gate/controllers/OpsmxOesController.groovy b/gate-web/src/main/groovy/com/netflix/spinnaker/gate/controllers/OpsmxOesController.groovy index bfc7947393..d903f76ab7 100644 --- a/gate-web/src/main/groovy/com/netflix/spinnaker/gate/controllers/OpsmxOesController.groovy +++ b/gate-web/src/main/groovy/com/netflix/spinnaker/gate/controllers/OpsmxOesController.groovy @@ -513,7 +513,7 @@ class OpsmxOesController { @RequestParam(value = "nameSpace", required = false) String nameSpace, @RequestParam(value = "argoCdUrl", required = false) String argoCdUrl, @RequestParam(value ="rolloutsEnabled", required = false) Boolean rolloutsEnabled, - @PathVariable(value ="updatedFlag", required = false) Boolean updatedFlag, + @RequestParam(value ="updatedFlag", required = false) Boolean updatedFlag, @RequestParam(value = "isdUrl", required = false) String isdUrl) { Response response = opsmxOesService.agentManifestDownloadFile(type, source, source1, description, isExists, nameSpace, argoCdUrl, rolloutsEnabled, updatedFlag,isdUrl) InputStream inputStream = response.getBody().in() diff --git a/gate-web/src/main/groovy/com/netflix/spinnaker/gate/services/internal/OpsmxOesService.groovy b/gate-web/src/main/groovy/com/netflix/spinnaker/gate/services/internal/OpsmxOesService.groovy index 503ff48d67..4bf7ecd9dc 100644 --- a/gate-web/src/main/groovy/com/netflix/spinnaker/gate/services/internal/OpsmxOesService.groovy +++ b/gate-web/src/main/groovy/com/netflix/spinnaker/gate/services/internal/OpsmxOesService.groovy @@ -37,7 +37,7 @@ interface OpsmxOesService { @Query("nameSpace") String nameSpace, @Query("argoCdUrl") String argoCdUrl, @Query("rolloutsEnabled") boolean rolloutsEnabled, - @Path("updatedFlag") boolean updatedFlag, + @Query("updatedFlag") boolean updatedFlag, @Query("isdUrl") String isdUrl) @GET("/oes/accountsConfig/{version}/agents/{agentName}/manifest/apple/automation") From 1e96a8011a002230a281268281e74f9ebc4ae8a3 Mon Sep 17 00:00:00 2001 From: vivek-opsmx Date: Tue, 12 Mar 2024 14:46:35 +0530 Subject: [PATCH 3/5] added createdStatus param in gate API --- .../spinnaker/gate/controllers/OpsmxPlatformController.groovy | 3 ++- .../gate/services/internal/OpsmxPlatformService.groovy | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gate-web/src/main/groovy/com/netflix/spinnaker/gate/controllers/OpsmxPlatformController.groovy b/gate-web/src/main/groovy/com/netflix/spinnaker/gate/controllers/OpsmxPlatformController.groovy index 9add092696..8b6d4fad57 100644 --- a/gate-web/src/main/groovy/com/netflix/spinnaker/gate/controllers/OpsmxPlatformController.groovy +++ b/gate-web/src/main/groovy/com/netflix/spinnaker/gate/controllers/OpsmxPlatformController.groovy @@ -435,9 +435,10 @@ class OpsmxPlatformController { @PathVariable("source3") String source3, @PathVariable("source4") String source4, @RequestParam(value = "featureType", required = false) String featureType, + @RequestParam(name = "createdStatus", required = false) boolean createdStatus, @RequestBody(required = false) Object data) { - return opsmxPlatformService.updatePlatformResponse4(version, type, source, source1, source2, source3, source4, featureType,data) + return opsmxPlatformService.updatePlatformResponse4(version, type, source, source1, source2, source3, source4, featureType,createdStatus,data) } @ApiOperation(value = "download metric analysis sample template") diff --git a/gate-web/src/main/groovy/com/netflix/spinnaker/gate/services/internal/OpsmxPlatformService.groovy b/gate-web/src/main/groovy/com/netflix/spinnaker/gate/services/internal/OpsmxPlatformService.groovy index c9d3bace21..5cab107764 100644 --- a/gate-web/src/main/groovy/com/netflix/spinnaker/gate/services/internal/OpsmxPlatformService.groovy +++ b/gate-web/src/main/groovy/com/netflix/spinnaker/gate/services/internal/OpsmxPlatformService.groovy @@ -259,6 +259,7 @@ interface OpsmxPlatformService { @Path('source3') String source3, @Path('source4') String source4, @Query("featureType") String featureType, + @Query("createdStatus") String createdStatus, @Body Object data) @GET("/platformservice/{version}/argo/sampleTemplate") From 26d13d90524d038d5340048187a14f098a6002e6 Mon Sep 17 00:00:00 2001 From: vivek-opsmx Date: Tue, 12 Mar 2024 15:32:52 +0530 Subject: [PATCH 4/5] changed string to boolean datatype --- .../gate/services/internal/OpsmxPlatformService.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gate-web/src/main/groovy/com/netflix/spinnaker/gate/services/internal/OpsmxPlatformService.groovy b/gate-web/src/main/groovy/com/netflix/spinnaker/gate/services/internal/OpsmxPlatformService.groovy index 5cab107764..7860e3625b 100644 --- a/gate-web/src/main/groovy/com/netflix/spinnaker/gate/services/internal/OpsmxPlatformService.groovy +++ b/gate-web/src/main/groovy/com/netflix/spinnaker/gate/services/internal/OpsmxPlatformService.groovy @@ -259,7 +259,7 @@ interface OpsmxPlatformService { @Path('source3') String source3, @Path('source4') String source4, @Query("featureType") String featureType, - @Query("createdStatus") String createdStatus, + @Query("createdStatus") boolean createdStatus, @Body Object data) @GET("/platformservice/{version}/argo/sampleTemplate") From 5d3eb1f21914b6f6ee9393deb440b7536b5d5943 Mon Sep 17 00:00:00 2001 From: vivek-opsmx Date: Wed, 13 Mar 2024 10:22:52 +0530 Subject: [PATCH 5/5] Changed updateFlag param as createdStatus --- .../spinnaker/gate/controllers/OpsmxOesController.groovy | 4 ++-- .../spinnaker/gate/services/internal/OpsmxOesService.groovy | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gate-web/src/main/groovy/com/netflix/spinnaker/gate/controllers/OpsmxOesController.groovy b/gate-web/src/main/groovy/com/netflix/spinnaker/gate/controllers/OpsmxOesController.groovy index d903f76ab7..6e00cac7f5 100644 --- a/gate-web/src/main/groovy/com/netflix/spinnaker/gate/controllers/OpsmxOesController.groovy +++ b/gate-web/src/main/groovy/com/netflix/spinnaker/gate/controllers/OpsmxOesController.groovy @@ -513,9 +513,9 @@ class OpsmxOesController { @RequestParam(value = "nameSpace", required = false) String nameSpace, @RequestParam(value = "argoCdUrl", required = false) String argoCdUrl, @RequestParam(value ="rolloutsEnabled", required = false) Boolean rolloutsEnabled, - @RequestParam(value ="updatedFlag", required = false) Boolean updatedFlag, + @RequestParam(value ="createdStatus", required = false) Boolean createdStatus, @RequestParam(value = "isdUrl", required = false) String isdUrl) { - Response response = opsmxOesService.agentManifestDownloadFile(type, source, source1, description, isExists, nameSpace, argoCdUrl, rolloutsEnabled, updatedFlag,isdUrl) + Response response = opsmxOesService.agentManifestDownloadFile(type, source, source1, description, isExists, nameSpace, argoCdUrl, rolloutsEnabled, createdStatus,isdUrl) InputStream inputStream = response.getBody().in() try { byte[] manifestFile = IOUtils.toByteArray(inputStream) diff --git a/gate-web/src/main/groovy/com/netflix/spinnaker/gate/services/internal/OpsmxOesService.groovy b/gate-web/src/main/groovy/com/netflix/spinnaker/gate/services/internal/OpsmxOesService.groovy index 4bf7ecd9dc..984f98b3b2 100644 --- a/gate-web/src/main/groovy/com/netflix/spinnaker/gate/services/internal/OpsmxOesService.groovy +++ b/gate-web/src/main/groovy/com/netflix/spinnaker/gate/services/internal/OpsmxOesService.groovy @@ -37,7 +37,7 @@ interface OpsmxOesService { @Query("nameSpace") String nameSpace, @Query("argoCdUrl") String argoCdUrl, @Query("rolloutsEnabled") boolean rolloutsEnabled, - @Query("updatedFlag") boolean updatedFlag, + @Query("createdStatus") boolean createdStatus, @Query("isdUrl") String isdUrl) @GET("/oes/accountsConfig/{version}/agents/{agentName}/manifest/apple/automation")