lib/runcible/extensions/repository.rb in runcible-1.4.0 vs lib/runcible/extensions/repository.rb in runcible-1.5.0
- old
+ new
@@ -238,9 +238,29 @@
def puppet_modules(id)
criteria = {:type_ids => [Runcible::Extensions::PuppetModule.content_type]}
unit_search(id, criteria).map { |i| i['metadata'].with_indifferent_access }
end
+ # Retrieves the docker manifest IDs for a single repository
+ #
+ # @param [String] id the ID of the repository
+ # @return [RestClient::Response] the set of repository docker manifest IDs
+ def docker_manifest_ids(id)
+ criteria = {:type_ids => [Runcible::Extensions::DockerManifest.content_type],
+ :fields => {:unit => [], :association => ['unit_id']}}
+
+ unit_search(id, criteria).map { |i| i['unit_id'] }
+ end
+
+ # Retrieves the docker manifests for a single repository
+ #
+ # @param [String] id the ID of the repository
+ # @return [RestClient::Response] the set of repository docker manifests
+ def docker_manifests(id)
+ criteria = {:type_ids => [Runcible::Extensions::DockerManifest.content_type]}
+ unit_search(id, criteria).map { |i| i['metadata'].with_indifferent_access }
+ end
+
# Retrieves the docker image IDs for a single repository
#
# @param [String] id the ID of the repository
# @return [RestClient::Response] the set of repository docker image IDs
def docker_image_ids(id)