Skip to content

Commit

Permalink
feat(servergroups): send clusters param on /serverGroups
Browse files Browse the repository at this point in the history
  • Loading branch information
anotherchrisberry committed Apr 6, 2017
1 parent b3c7e4c commit 6975e2d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ interface ClouddriverService {
@GET("/applications/{name}/serverGroups")
List getServerGroups(@Path("name") String name,
@Query("expand") String expand,
@Query("cloudProvider") String cloudProvider)
@Query("cloudProvider") String cloudProvider,
@Query("clusters") String clusters)

@Headers("Accept: application/json")
@GET("/applications/{name}/jobs")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ class ServerGroupController {
@RequestMapping(value = "/applications/{applicationName}/serverGroups", method = RequestMethod.GET)
List getServerGroups(@PathVariable String applicationName,
@RequestParam(required = false, value = 'expand', defaultValue = 'false') String expand,
@RequestParam(required = false, value = 'cloudProvider') String cloudProvider) {
serverGroupService.getForApplication(applicationName, expand, cloudProvider)
@RequestParam(required = false, value = 'cloudProvider') String cloudProvider,
@RequestParam(required = false, value = 'clusters') String clusters) {
serverGroupService.getForApplication(applicationName, expand, cloudProvider, clusters)
}

@RequestMapping(value = "/applications/{applicationName}/serverGroups/{account}/{region}/{serverGroupName:.+}", method = RequestMethod.GET)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ class ServerGroupService {
@Autowired
ProviderLookupService providerLookupService

List getForApplication(String applicationName, String expand, String cloudProvider) {
List getForApplication(String applicationName, String expand, String cloudProvider, String clusters) {
String commandKey = Boolean.valueOf(expand) ? "getExpandedServerGroupsForApplication" : "getServerGroupsForApplication"
HystrixFactory.newListCommand(GROUP, commandKey) {
clouddriverService.getServerGroups(applicationName, expand, cloudProvider)
clouddriverService.getServerGroups(applicationName, expand, cloudProvider, clusters)
} execute()
}

Expand Down

0 comments on commit 6975e2d

Please sign in to comment.