Sha256: 9306b9e20f9b92135258bc9b28bef21cea07c2e2b39602adcb369d5adf7caeac

Contents?: true

Size: 1.01 KB

Versions: 45

Compression:

Stored size: 1.01 KB

Contents

module Katello
  module Pulp3
    class DockerTag < PulpContentUnit
      include LazyAccessor
      CONTENT_TYPE = "docker_tag".freeze

      def self.content_api
        PulpContainerClient::ContentTagsApi.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 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

45 entries across 45 versions & 1 rubygems

Version Path
katello-4.3.1 app/services/katello/pulp3/docker_tag.rb
katello-4.2.2 app/services/katello/pulp3/docker_tag.rb
katello-4.3.0 app/services/katello/pulp3/docker_tag.rb
katello-4.3.0.rc4 app/services/katello/pulp3/docker_tag.rb
katello-4.3.0.rc3 app/services/katello/pulp3/docker_tag.rb
katello-4.3.0.rc2.1 app/services/katello/pulp3/docker_tag.rb
katello-4.3.0.rc2 app/services/katello/pulp3/docker_tag.rb
katello-4.3.0.rc1 app/services/katello/pulp3/docker_tag.rb
katello-4.2.1 app/services/katello/pulp3/docker_tag.rb
katello-4.2.0.1 app/services/katello/pulp3/docker_tag.rb
katello-4.1.4 app/services/katello/pulp3/docker_tag.rb
katello-4.0.3 app/services/katello/pulp3/docker_tag.rb
katello-4.2.0.1.rc3 app/services/katello/pulp3/docker_tag.rb
katello-3.18.5 app/services/katello/pulp3/docker_tag.rb
katello-4.2.0.1.rc2 app/services/katello/pulp3/docker_tag.rb
katello-4.2.0.rc2 app/services/katello/pulp3/docker_tag.rb
katello-4.1.3 app/services/katello/pulp3/docker_tag.rb
katello-4.2.0.rc1 app/services/katello/pulp3/docker_tag.rb
katello-4.0.2.1 app/services/katello/pulp3/docker_tag.rb
katello-4.1.2.1 app/services/katello/pulp3/docker_tag.rb