Sha256: 882166174651baa811d5d42a0e7d32deb5bf1311ce63e1295aaa095ad0ed1391

Contents?: true

Size: 1.13 KB

Versions: 23

Compression:

Stored size: 1.13 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',
                                  'application/vnd.oci.image.manifest.v1+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

23 entries across 23 versions & 1 rubygems

Version Path
katello-4.10.0 app/services/katello/pulp3/docker_manifest.rb
katello-4.9.2 app/services/katello/pulp3/docker_manifest.rb
katello-4.10.0.rc2 app/services/katello/pulp3/docker_manifest.rb
katello-4.10.0.rc1 app/services/katello/pulp3/docker_manifest.rb
katello-4.8.4 app/services/katello/pulp3/docker_manifest.rb
katello-4.9.1 app/services/katello/pulp3/docker_manifest.rb
katello-4.8.3 app/services/katello/pulp3/docker_manifest.rb
katello-4.9.0 app/services/katello/pulp3/docker_manifest.rb
katello-4.7.6 app/services/katello/pulp3/docker_manifest.rb
katello-4.8.2 app/services/katello/pulp3/docker_manifest.rb
katello-4.9.0.rc2 app/services/katello/pulp3/docker_manifest.rb
katello-4.9.0.rc1 app/services/katello/pulp3/docker_manifest.rb
katello-4.8.1 app/services/katello/pulp3/docker_manifest.rb
katello-4.7.5 app/services/katello/pulp3/docker_manifest.rb
katello-4.8.0 app/services/katello/pulp3/docker_manifest.rb
katello-4.8.0.rc2 app/services/katello/pulp3/docker_manifest.rb
katello-4.7.4 app/services/katello/pulp3/docker_manifest.rb
katello-4.8.0.rc1 app/services/katello/pulp3/docker_manifest.rb
katello-4.7.3 app/services/katello/pulp3/docker_manifest.rb
katello-4.7.2 app/services/katello/pulp3/docker_manifest.rb