Skip to content

Commit

Permalink
feat(images): endpoint to get all image tags - only docker for now
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaslin committed Apr 7, 2017
1 parent d7cc324 commit 32f5d75
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,12 @@ interface ClouddriverService {
@Query("count") Integer count,
@QueryMap Map additionalFilters)

@Headers("Accept: application/json")
@GET("/{provider}/images/tags")
List<String> findTags(@Path("provider") String provider,
@Query("account") String account,
@Query("repository") String repository)

@Headers("Accept: application/json")
@GET("/search")
List<Map> search(@Query("q") String query,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,11 @@ class ImageController {
}
imageService.search(provider, query, region, account, count, additionalFilters)
}

@RequestMapping(value = "/tags", method = RequestMethod.GET)
List<String> findTags(@RequestParam(value = "provider", defaultValue = "aws", required = false) String provider,
@RequestParam(value = "account", required = true) String account,
@RequestParam(value = "repository", required = true) String repository) {
imageService.findTags(provider, account, repository)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,10 @@ class ImageService {
clouddriverService.findImages(provider, query, region, account, count, additionalFilters)
} execute()
}

List<String> findTags(String provider, String account, String repository) {
HystrixFactory.newListCommand(GROUP, "getTags-${providerLookupService.providerForAccount(account)}") {
clouddriverService.findTags(provider, account, repository)
} execute()
}
}

0 comments on commit 32f5d75

Please sign in to comment.