Sha256: b9e0d313791ccd632585dcf20ae312f470fb8ce4de80468c1a702cd07fb855c6

Contents?: true

Size: 815 Bytes

Versions: 32

Compression:

Stored size: 815 Bytes

Contents

module Actions
  module Pulp3
    module Repository
      class SaveArtifact < Pulp3::AbstractAsyncTask
        def plan(file, repository, smart_proxy, tasks, unit_type_id, options = {})
          options[:file_name] = file[:filename]
          plan_self(:repository_id => repository.id, :smart_proxy_id => smart_proxy.id, :tasks => tasks, :unit_type_id => unit_type_id, :options => options)
        end

        def invoke_external_task
          artifact_href = input[:tasks].last[:created_resources].first
          content_type = input[:unit_type_id]
          content_backend_service = SmartProxy.pulp_master.content_service(content_type)
          output[:pulp_tasks] = [content_backend_service.content_api.create(input[:options][:file_name], artifact: artifact_href)]
        end
      end
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
katello-3.16.0.rc1 app/lib/actions/pulp3/repository/save_artifact.rb
katello-3.15.0.1 app/lib/actions/pulp3/repository/save_artifact.rb
katello-3.15.0 app/lib/actions/pulp3/repository/save_artifact.rb
katello-3.15.0.rc2 app/lib/actions/pulp3/repository/save_artifact.rb
katello-3.15.0.rc1.3 app/lib/actions/pulp3/repository/save_artifact.rb
katello-3.15.0.rc1.2 app/lib/actions/pulp3/repository/save_artifact.rb
katello-3.15.0.rc1.1 app/lib/actions/pulp3/repository/save_artifact.rb
katello-3.15.0.rc1 app/lib/actions/pulp3/repository/save_artifact.rb
katello-3.14.1 app/lib/actions/pulp3/repository/save_artifact.rb
katello-3.14.0 app/lib/actions/pulp3/repository/save_artifact.rb
katello-3.14.0.rc2 app/lib/actions/pulp3/repository/save_artifact.rb
katello-3.14.0.rc1 app/lib/actions/pulp3/repository/save_artifact.rb