Sha256: f95e764a68af414ed88fcb93109fdf5a274b7e446858d88728b669fd565b3e20
Contents?: true
Size: 816 Bytes
Versions: 7
Compression:
Stored size: 816 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(input[:options][:file_name], artifact: artifact_href)] end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems