Sha256: 644623d5a964b402dab330c567bcf4490c58b78835cba21910575ea9df819639

Contents?: true

Size: 831 Bytes

Versions: 35

Compression:

Stored size: 831 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_primary.content_service(content_type)
          output[:pulp_tasks] = [content_backend_service.content_api_create(relative_path: input[:options][:file_name], artifact: artifact_href)]
        end
      end
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
katello-4.1.0.rc1.1 app/lib/actions/pulp3/repository/save_artifact.rb
katello-4.1.0.rc1 app/lib/actions/pulp3/repository/save_artifact.rb
katello-4.0.0 app/lib/actions/pulp3/repository/save_artifact.rb
katello-4.0.0.rc3.1 app/lib/actions/pulp3/repository/save_artifact.rb
katello-4.0.0.rc3 app/lib/actions/pulp3/repository/save_artifact.rb
katello-3.18.2.1 app/lib/actions/pulp3/repository/save_artifact.rb
katello-3.18.2 app/lib/actions/pulp3/repository/save_artifact.rb
katello-4.0.0.rc2 app/lib/actions/pulp3/repository/save_artifact.rb
katello-3.18.1.1 app/lib/actions/pulp3/repository/save_artifact.rb
katello-4.0.0.rc1 app/lib/actions/pulp3/repository/save_artifact.rb
katello-3.18.1 app/lib/actions/pulp3/repository/save_artifact.rb
katello-3.18.0 app/lib/actions/pulp3/repository/save_artifact.rb
katello-3.18.0.rc2.1 app/lib/actions/pulp3/repository/save_artifact.rb
katello-3.18.0.rc2 app/lib/actions/pulp3/repository/save_artifact.rb
katello-3.18.0.rc1 app/lib/actions/pulp3/repository/save_artifact.rb