Skip to content

Commit

Permalink
feat(cf): Expose open service broker information (#730)
Browse files Browse the repository at this point in the history
spinnaker/spinnaker#3637

Co-Authored-By: Jammy Louie <jlouie@pivotal.io>
  • Loading branch information
2 people authored and jkschneider committed Feb 21, 2019
1 parent df09201 commit f1f5499
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -373,4 +373,10 @@ interface ClouddriverService {
@Query(value = "region") String region,
@Path(value = "account") String account)

@GET("/servicebroker/{account}/serviceInstance")
Map getServiceInstance(@Path(value = "account") String account,
@Query(value = "cloudProvider") String cloudProvider,
@Query(value = "region") String region,
@Query(value = "serviceInstanceName") String serviceInstanceName)

}
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,12 @@ public List<Map> listServices(@RequestParam(value = "cloudProvider", required =
@PathVariable String account) {
return serviceBrokerService.listServices(cloudProvider, region, account);
}

@RequestMapping(value = "{account}/serviceInstance", method = RequestMethod.GET)
public Map getServiceInstance(@PathVariable(value = "account") String account,
@RequestParam(value = "cloudProvider") String cloudProvider,
@RequestParam(value = "region") String region,
@RequestParam(value = "serviceInstanceName") String serviceInstanceName) {
return serviceBrokerService.getServiceInstance(account, cloudProvider, region, serviceInstanceName);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,8 @@ public class ServiceBrokerService {
public List<Map> listServices(String cloudProvider, String region, String account) {
return this.clouddriverService.listServices(cloudProvider, region, account);
}

public Map getServiceInstance(String account, String cloudProvider, String region, String serviceInstanceName) {
return this.clouddriverService.getServiceInstance(account, cloudProvider, region, serviceInstanceName);
}
}

0 comments on commit f1f5499

Please sign in to comment.