Sha256: e6fad56b84c3dd4958f651b9f49bd05ac6bba931d61e8ee53eb8f63741befbe0

Contents?: true

Size: 782 Bytes

Versions: 35

Compression:

Stored size: 782 Bytes

Contents

module Actions
  module Pulp3
    module Repository
      class CommitUpload < Pulp3::AbstractAsyncTask
        def plan(repository, smart_proxy, upload_href, sha256)
          plan_self(:repository_id => repository.id, :smart_proxy_id => smart_proxy.id, :upload_href => upload_href, :sha256 => sha256)
        end

        def invoke_external_task
          repo = ::Katello::Repository.find(input[:repository_id])
          repo_backend_service = repo.backend_service(smart_proxy)
          uploads_api = repo_backend_service.core_api.uploads_api
          upload_commit = repo_backend_service.core_api.upload_commit_class.new(sha256: input[:sha256])
          output[:pulp_tasks] = [uploads_api.commit(input[:upload_href], upload_commit)]
        end
      end
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
katello-4.1.4 app/lib/actions/pulp3/repository/commit_upload.rb
katello-4.0.3 app/lib/actions/pulp3/repository/commit_upload.rb
katello-3.18.5 app/lib/actions/pulp3/repository/commit_upload.rb
katello-4.1.3 app/lib/actions/pulp3/repository/commit_upload.rb
katello-4.2.0.rc1 app/lib/actions/pulp3/repository/commit_upload.rb
katello-4.0.2.1 app/lib/actions/pulp3/repository/commit_upload.rb
katello-4.1.2.1 app/lib/actions/pulp3/repository/commit_upload.rb
katello-4.0.2 app/lib/actions/pulp3/repository/commit_upload.rb
katello-4.1.2 app/lib/actions/pulp3/repository/commit_upload.rb
katello-3.18.4 app/lib/actions/pulp3/repository/commit_upload.rb
katello-4.1.1 app/lib/actions/pulp3/repository/commit_upload.rb
katello-4.1.0 app/lib/actions/pulp3/repository/commit_upload.rb
katello-4.0.1.2 app/lib/actions/pulp3/repository/commit_upload.rb
katello-3.18.3.1 app/lib/actions/pulp3/repository/commit_upload.rb
katello-4.1.0.rc2.2 app/lib/actions/pulp3/repository/commit_upload.rb
katello-4.1.0.rc2.1 app/lib/actions/pulp3/repository/commit_upload.rb
katello-4.0.1.1 app/lib/actions/pulp3/repository/commit_upload.rb
katello-3.18.3 app/lib/actions/pulp3/repository/commit_upload.rb
katello-4.1.0.rc2 app/lib/actions/pulp3/repository/commit_upload.rb
katello-4.0.1 app/lib/actions/pulp3/repository/commit_upload.rb