Sha256: 986a0aa9ad5ef3b3fa9821ce711639830dc446cdc1c115c8ef565f0126ac0e00

Contents?: true

Size: 912 Bytes

Versions: 16

Compression:

Stored size: 912 Bytes

Contents

# This action takes a content unit and a repository
# Creates a content unit based on content type and then creates a new repository version with the added content.
module Actions
  module Pulp3
    module Repository
      class ImportUpload < Pulp3::AbstractAsyncTask
        def plan(content_unit, repository, smart_proxy)
          plan_self(:content_unit => content_unit, :repository_id => repository.id, :smart_proxy_id => smart_proxy.id)
        end

        def invoke_external_task
          content_unit = input[:content_unit]
          content_unit_href = content_unit.is_a?(String) ? content_unit : content_unit.last[:created_resources].first
          repo = ::Katello::Repository.find(input[:repository_id])
          repo_backend_service = repo.backend_service(smart_proxy)
          output[:pulp_tasks] = repo_backend_service.add_content(content_unit_href)
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
katello-3.15.3.1 app/lib/actions/pulp3/repository/import_upload.rb
katello-3.15.3 app/lib/actions/pulp3/repository/import_upload.rb
katello-3.15.2 app/lib/actions/pulp3/repository/import_upload.rb
katello-3.15.1.1 app/lib/actions/pulp3/repository/import_upload.rb
katello-3.15.1 app/lib/actions/pulp3/repository/import_upload.rb
katello-3.15.0.1 app/lib/actions/pulp3/repository/import_upload.rb
katello-3.15.0 app/lib/actions/pulp3/repository/import_upload.rb
katello-3.15.0.rc2 app/lib/actions/pulp3/repository/import_upload.rb
katello-3.15.0.rc1.3 app/lib/actions/pulp3/repository/import_upload.rb
katello-3.15.0.rc1.2 app/lib/actions/pulp3/repository/import_upload.rb
katello-3.15.0.rc1.1 app/lib/actions/pulp3/repository/import_upload.rb
katello-3.15.0.rc1 app/lib/actions/pulp3/repository/import_upload.rb
katello-3.14.1 app/lib/actions/pulp3/repository/import_upload.rb
katello-3.14.0 app/lib/actions/pulp3/repository/import_upload.rb
katello-3.14.0.rc2 app/lib/actions/pulp3/repository/import_upload.rb
katello-3.14.0.rc1 app/lib/actions/pulp3/repository/import_upload.rb