Sha256: 76472cef16cb0b9bd1f87ca476fa693f348e1f8946e1f8786ac49d94750e9b0d

Contents?: true

Size: 1011 Bytes

Versions: 64

Compression:

Stored size: 1011 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[:content_unit_href] = content_unit_href
          output[:pulp_tasks] = [repo_backend_service.add_content(content_unit_href)]
        end
      end
    end
  end
end

Version data entries

64 entries across 64 versions & 1 rubygems

Version Path
katello-4.2.2 app/lib/actions/pulp3/repository/import_upload.rb
katello-4.2.1 app/lib/actions/pulp3/repository/import_upload.rb
katello-4.2.0.1 app/lib/actions/pulp3/repository/import_upload.rb
katello-4.1.4 app/lib/actions/pulp3/repository/import_upload.rb
katello-4.0.3 app/lib/actions/pulp3/repository/import_upload.rb
katello-4.2.0.1.rc3 app/lib/actions/pulp3/repository/import_upload.rb
katello-3.18.5 app/lib/actions/pulp3/repository/import_upload.rb
katello-4.2.0.1.rc2 app/lib/actions/pulp3/repository/import_upload.rb
katello-4.2.0.rc2 app/lib/actions/pulp3/repository/import_upload.rb
katello-4.1.3 app/lib/actions/pulp3/repository/import_upload.rb
katello-4.2.0.rc1 app/lib/actions/pulp3/repository/import_upload.rb
katello-4.0.2.1 app/lib/actions/pulp3/repository/import_upload.rb
katello-4.1.2.1 app/lib/actions/pulp3/repository/import_upload.rb
katello-4.0.2 app/lib/actions/pulp3/repository/import_upload.rb
katello-4.1.2 app/lib/actions/pulp3/repository/import_upload.rb
katello-3.18.4 app/lib/actions/pulp3/repository/import_upload.rb
katello-4.1.1 app/lib/actions/pulp3/repository/import_upload.rb
katello-4.1.0 app/lib/actions/pulp3/repository/import_upload.rb
katello-4.0.1.2 app/lib/actions/pulp3/repository/import_upload.rb
katello-3.18.3.1 app/lib/actions/pulp3/repository/import_upload.rb