Sha256: 1b5e2f17e218db0dbbb9b79b0de98dc6324f74a93d24b3452125024baac49540

Contents?: true

Size: 1.05 KB

Versions: 20

Compression:

Stored size: 1.05 KB

Contents

module Katello
  module Pulp3
    class DockerManifest < PulpContentUnit
      include LazyAccessor
      CONTENT_TYPE = "docker_manifest".freeze

      def self.content_api
        PulpContainerClient::ContentManifestsApi.new(Katello::Pulp3::Api::Docker.new(SmartProxy.pulp_primary!).api_client)
      end

      def self.ids_for_repository(repo_id)
        repo = Katello::Pulp3::Repository::Docker.new(Katello::Repository.find(repo_id), SmartProxy.pulp_primary)
        repo_content_list = repo.content_list
        repo_content_list.map { |content| content.try(:pulp_href) }
      end

      def self.content_unit_list(page_opts)
        page_opts[:media_type] = ['application/vnd.docker.distribution.manifest.v1+json',
                                  'application/vnd.docker.distribution.manifest.v2+json']
        self.content_api.list(page_opts)
      end

      def self.generate_model_row(unit)
        {
          schema_version: unit['schema_version'],
          digest: unit['digest'],
          pulp_id: unit[unit_identifier]
        }
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
katello-4.6.2.1 app/services/katello/pulp3/docker_manifest.rb
katello-4.6.2 app/services/katello/pulp3/docker_manifest.rb
katello-4.6.1 app/services/katello/pulp3/docker_manifest.rb
katello-4.7.0.rc1 app/services/katello/pulp3/docker_manifest.rb
katello-4.4.2.2 app/services/katello/pulp3/docker_manifest.rb
katello-4.4.2.1 app/services/katello/pulp3/docker_manifest.rb
katello-4.4.2 app/services/katello/pulp3/docker_manifest.rb
katello-4.5.1 app/services/katello/pulp3/docker_manifest.rb
katello-4.6.0 app/services/katello/pulp3/docker_manifest.rb
katello-4.6.0.rc2 app/services/katello/pulp3/docker_manifest.rb
katello-4.6.0.rc1 app/services/katello/pulp3/docker_manifest.rb
katello-4.5.0 app/services/katello/pulp3/docker_manifest.rb
katello-4.5.0.rc2 app/services/katello/pulp3/docker_manifest.rb
katello-4.4.1 app/services/katello/pulp3/docker_manifest.rb
katello-4.5.0.rc1 app/services/katello/pulp3/docker_manifest.rb
katello-4.4.0.2 app/services/katello/pulp3/docker_manifest.rb
katello-4.4.0.1 app/services/katello/pulp3/docker_manifest.rb
katello-4.4.0 app/services/katello/pulp3/docker_manifest.rb
katello-4.4.0.rc2 app/services/katello/pulp3/docker_manifest.rb
katello-4.4.0.rc1 app/services/katello/pulp3/docker_manifest.rb