From f6ce5c96ef59a251b5725b42af86249c6577c626 Mon Sep 17 00:00:00 2001 From: Tomas Lin Date: Wed, 11 Jan 2017 10:36:49 -0800 Subject: [PATCH] Titus: use api/v2 endpoints --- .../titus/client/TitusRestAdapter.java | 26 +++++++------------ 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/clouddriver-titus/src/main/groovy/com/netflix/spinnaker/clouddriver/titus/client/TitusRestAdapter.java b/clouddriver-titus/src/main/groovy/com/netflix/spinnaker/clouddriver/titus/client/TitusRestAdapter.java index 05c44ece513..3e47c748b10 100644 --- a/clouddriver-titus/src/main/groovy/com/netflix/spinnaker/clouddriver/titus/client/TitusRestAdapter.java +++ b/clouddriver-titus/src/main/groovy/com/netflix/spinnaker/clouddriver/titus/client/TitusRestAdapter.java @@ -26,34 +26,28 @@ public interface TitusRestAdapter { - @GET("/v2/jobs/{jobId}") + @GET("/api/v2/jobs/{jobId}") Call getJob(@Path("jobId") String jobId); - @POST("/v2/jobs") + @POST("/api/v2/jobs") Call submitJob(@Body JobDescription jobDescription); - @PATCH("/v2/jobs/{jobId}") + @PATCH("/api/v2/jobs/{jobId}") Call updateJob(@Path("jobId") String jobId, @Body MapjobAttributes); - @POST("/v2/jobs/kill") + @POST("/api/v2/jobs/kill") Call killJob(@Body TerminateJobRequest terminateJobRequest); - @GET("/v2/tasks/{taskId}") + @GET("/api/v2/tasks/{taskId}") Call getTask(@Path("taskId") String taskId); - @GET("/v2/jobs") - Call> getJobsByTaskState(@Query("taskState") TaskState taskState); - - @GET("/v2/jobs") + @GET("/api/v2/jobs") Call> getJobsByType(@Query("type") String type); - @GET("/v2/jobs") + @GET("/api/v2/jobs") Call> getJobsByLabel(@Query("labels") String labels); - @GET("/v2/jobs") - Call> getJobsByUser(@Query("user") String user); - - @GET("/v2/jobs") + @GET("/api/v2/jobs") Call> getJobsByApplication(@Query("appName") String application); @POST("/api/v2/tasks/kill") @@ -62,9 +56,9 @@ public interface TitusRestAdapter { @GET("/api/v2/logs/download/{taskId}") Call logsDownload(@Path("taskId") String taskId); - @POST("/v2/jobs/setinstancecounts") + @POST("/api/v2/jobs/setinstancecounts") Call resizeJob(@Body ResizeJobRequest resizeJob); - @POST("/v2/jobs/setinservice") + @POST("/api/v2/jobs/setinservice") Call activateJob(@Body ActivateJobRequest activateJob); }