Revision ae6943ed
Added by David Davis almost 8 years ago
lib/runcible/extensions/repository.rb | ||
---|---|---|
256 | 256 |
unit_search(id, criteria).collect{|i| i['metadata'].with_indifferent_access} |
257 | 257 |
end |
258 | 258 |
|
259 |
# Retrieves the docker image IDs for a single repository |
|
260 |
# |
|
261 |
# @param [String] id the ID of the repository |
|
262 |
# @return [RestClient::Response] the set of repository docker image IDs |
|
263 |
def docker_image_ids(id) |
|
264 |
criteria = {:type_ids=>[Runcible::Extensions::DockerImage.content_type], |
|
265 |
:fields=>{:unit=>[], :association=>['unit_id']}} |
|
266 |
|
|
267 |
unit_search(id, criteria).collect{|i| i['unit_id']} |
|
268 |
end |
|
269 |
|
|
270 |
# Retrieves the docker images for a single repository |
|
271 |
# |
|
272 |
# @param [String] id the ID of the repository |
|
273 |
# @return [RestClient::Response] the set of repository docker images |
|
274 |
def docker_images(id) |
|
275 |
criteria = {:type_ids=>[Runcible::Extensions::DockerImage.content_type]} |
|
276 |
unit_search(id, criteria).collect{|i| i['metadata'].with_indifferent_access} |
|
277 |
end |
|
278 |
|
|
259 | 279 |
# Creates or updates a sync schedule for a repository |
260 | 280 |
# |
261 | 281 |
# @param [String] repo_id the ID of the repository |
Also available in: Unified diff
Fixes #7765 - Add docker methods to repo