Project

General

Profile

Revision c2292684

Added by Partha Aji over 4 years ago

Fixes #21161 - Docker manifest list model bindings

View differences:

lib/runcible/extensions/docker_manifest_list.rb
1
module Runcible
2
  module Extensions
3
    class DockerManifestList < Runcible::Extensions::Unit
4
      def self.content_type
5
        'docker_manifest_list'
6
      end
7
    end
8
  end
9
end
lib/runcible/extensions/repository.rb
278 278
        unit_search(id, criteria).map { |i| i['metadata'].with_indifferent_access }
279 279
      end
280 280

  
281
      # Retrieves the docker manifest list IDs for a single repository
282
      #
283
      # @param  [String]                id the ID of the repository
284
      # @return [RestClient::Response]  the set of repository docker manifest IDs
285
      def docker_manifest_list_ids(id)
286
        criteria = {:type_ids => [Runcible::Extensions::DockerManifestList.content_type],
287
                    :fields => {:unit => [], :association => ['unit_id']}}
288

  
289
        unit_search(id, criteria).map { |i| i['unit_id'] }
290
      end
291

  
292
      # Retrieves the docker manifest lists for a single repository
293
      #
294
      # @param  [String]                id the ID of the repository
295
      # @return [RestClient::Response]  the set of repository docker manifests
296
      def docker_manifest_lists(id)
297
        criteria = {:type_ids => [Runcible::Extensions::DockerManifestList.content_type]}
298
        unit_search(id, criteria).map { |i| i['metadata'].with_indifferent_access }
299
      end
300

  
281 301
      # Retrieves the docker tag IDs for a single repository
282 302
      #
283 303
      # @param  [String]                id the ID of the repository

Also available in: Unified diff