Skip to content

Commit

Permalink
chore(orca): removed active executions / instance endpoint no longer …
Browse files Browse the repository at this point in the history
…in orca
  • Loading branch information
robfletcher committed Jul 19, 2017
1 parent f3c1762 commit aa015e8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package com.netflix.spinnaker.gate.controllers;

import com.netflix.spinnaker.gate.services.TaskService;
import java.util.List;
import com.netflix.spinnaker.gate.services.internal.OrcaService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
Expand All @@ -24,28 +24,17 @@
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RequestMapping("/executions")
@RestController
public class ExecutionsController {

private TaskService taskService;
private OrcaService orcaService;

@Autowired
public ExecutionsController(TaskService taskService, OrcaService orcaService) {
this.taskService = taskService;
public ExecutionsController(OrcaService orcaService) {
this.orcaService = orcaService;
}

@ApiOperation(value = "Retrieve a list of active executions, grouped by Orca instance")
@RequestMapping(value = "/activeByInstance", method = RequestMethod.GET)
Map getActiveExecutionsByInstance() {
return taskService.getActiveExecutionsByInstance();
}

@ApiOperation(value = "Retrieve a list of the most recent pipeline executions for the provided `pipelineConfigIds` that match the provided `statuses` query parameter")
@RequestMapping(method = RequestMethod.GET)
List getLatestExecutionsByConfigIds(@RequestParam(value = "pipelineConfigIds") String pipelineConfigIds,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,6 @@ class TaskService {
} execute()
}

Map getActiveExecutionsByInstance() {
HystrixFactory.newMapCommand(GROUP, "getActiveExecutionsByInstance") {
orcaService.getActiveExecutionsByInstance()
} execute()
}

/**
* @deprecated This pipeline operation does not belong here.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@ interface OrcaService {
@PUT("/tasks/cancel")
Map cancelTasks(@Body List<String> taskIds)

@Headers("Accept: application/json")
@GET("/executions/activeByInstance")
Map getActiveExecutionsByInstance()

@Headers("Accept: application/json")
@GET("/pipelines")
List getLatestExecutionsByConfigIds(@Query("pipelineConfigIds") String pipelineConfigIds, @Query("limit") Integer limit, @Query("statuses") String statuses)
Expand Down

0 comments on commit aa015e8

Please sign in to comment.