Sha256: 8efd6593b3f9d3d86eb095d4d5043be6b295235d13b8fd2de89c24db5e476afc

Contents?: true

Size: 1001 Bytes

Versions: 12

Compression:

Stored size: 1001 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_attributes!(custom_json)
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
katello-3.15.3.1 app/services/katello/pulp3/docker_tag.rb
katello-3.15.3 app/services/katello/pulp3/docker_tag.rb
katello-3.15.2 app/services/katello/pulp3/docker_tag.rb
katello-3.15.1.1 app/services/katello/pulp3/docker_tag.rb
katello-3.15.1 app/services/katello/pulp3/docker_tag.rb
katello-3.15.0.1 app/services/katello/pulp3/docker_tag.rb
katello-3.15.0 app/services/katello/pulp3/docker_tag.rb
katello-3.15.0.rc2 app/services/katello/pulp3/docker_tag.rb
katello-3.15.0.rc1.3 app/services/katello/pulp3/docker_tag.rb
katello-3.15.0.rc1.2 app/services/katello/pulp3/docker_tag.rb
katello-3.15.0.rc1.1 app/services/katello/pulp3/docker_tag.rb
katello-3.15.0.rc1 app/services/katello/pulp3/docker_tag.rb