Sha256: e89cdadad46aeff7f2ec78d3717d6136074ce4916af98eca4ee1665f54cd6db5

Contents?: true

Size: 1.08 KB

Versions: 36

Compression:

Stored size: 1.08 KB

Contents

module Katello
  module Pulp3
    class DockerManifestList < PulpContentUnit
      include LazyAccessor

      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.list.v2+json"
        self.content_api.list(page_opts)
      end

      def update_model(model)
        custom_json = {}
        custom_json['schema_version'], = backend_data['schema_version']
        custom_json['digest'], = backend_data['digest']
        custom_json['docker_manifests'] = ::Katello::DockerManifest.where(:pulp_id => backend_data[:listed_manifests])
        model.update!(custom_json)
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
katello-4.0.3 app/services/katello/pulp3/docker_manifest_list.rb
katello-3.18.5 app/services/katello/pulp3/docker_manifest_list.rb
katello-4.0.2.1 app/services/katello/pulp3/docker_manifest_list.rb
katello-4.0.2 app/services/katello/pulp3/docker_manifest_list.rb
katello-3.18.4 app/services/katello/pulp3/docker_manifest_list.rb
katello-4.1.0 app/services/katello/pulp3/docker_manifest_list.rb
katello-4.0.1.2 app/services/katello/pulp3/docker_manifest_list.rb
katello-3.18.3.1 app/services/katello/pulp3/docker_manifest_list.rb
katello-4.1.0.rc2.2 app/services/katello/pulp3/docker_manifest_list.rb
katello-4.1.0.rc2.1 app/services/katello/pulp3/docker_manifest_list.rb
katello-4.0.1.1 app/services/katello/pulp3/docker_manifest_list.rb
katello-3.18.3 app/services/katello/pulp3/docker_manifest_list.rb
katello-4.1.0.rc2 app/services/katello/pulp3/docker_manifest_list.rb
katello-4.0.1 app/services/katello/pulp3/docker_manifest_list.rb
katello-4.1.0.rc1.1 app/services/katello/pulp3/docker_manifest_list.rb
katello-4.1.0.rc1 app/services/katello/pulp3/docker_manifest_list.rb
katello-4.0.0 app/services/katello/pulp3/docker_manifest_list.rb
katello-4.0.0.rc3.1 app/services/katello/pulp3/docker_manifest_list.rb
katello-4.0.0.rc3 app/services/katello/pulp3/docker_manifest_list.rb
katello-3.18.2.1 app/services/katello/pulp3/docker_manifest_list.rb