Sha256: b5d1606791cde39d3b9414c0e081387d3ea4bf7c86af5397e9455e67f74bf561

Contents?: true

Size: 990 Bytes

Versions: 16

Compression:

Stored size: 990 Bytes

Contents

module Katello
  module Pulp3
    class DockerTag < PulpContentUnit
      include LazyAccessor

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

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

      def update_model(model)
        custom_json = {}
        taggable = ::Katello::DockerManifest.find_by(:pulp_id => backend_data['tagged_manifest'])
        if taggable.nil?
          taggable = ::Katello::DockerManifestList.find_by(:pulp_id => backend_data['tagged_manifest'])
        end
        custom_json['docker_taggable'] = taggable
        custom_json['name'] = backend_data['name']
        model.update!(custom_json)
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
katello-3.16.2 app/services/katello/pulp3/docker_tag.rb
katello-3.16.1.2 app/services/katello/pulp3/docker_tag.rb
katello-3.16.1.1 app/services/katello/pulp3/docker_tag.rb
katello-3.16.1 app/services/katello/pulp3/docker_tag.rb
katello-3.17.0.rc1 app/services/katello/pulp3/docker_tag.rb
katello-3.16.0 app/services/katello/pulp3/docker_tag.rb
katello-3.16.0.rc5.1 app/services/katello/pulp3/docker_tag.rb
katello-3.16.0.rc5 app/services/katello/pulp3/docker_tag.rb
katello-3.16.0.rc4.1 app/services/katello/pulp3/docker_tag.rb
katello-3.16.0.rc4 app/services/katello/pulp3/docker_tag.rb
katello-3.16.0.rc3.1 app/services/katello/pulp3/docker_tag.rb
katello-3.16.0.rc3 app/services/katello/pulp3/docker_tag.rb
katello-3.16.0.rc2.1 app/services/katello/pulp3/docker_tag.rb
katello-3.16.0.rc2 app/services/katello/pulp3/docker_tag.rb
katello-3.16.0.rc1.1 app/services/katello/pulp3/docker_tag.rb
katello-3.16.0.rc1 app/services/katello/pulp3/docker_tag.rb