Class: Actions::Pulp3::Repository::CopyVersion

Inherits:
AbstractAsyncTask show all
Defined in:
app/lib/actions/pulp3/repository/copy_version.rb

Instance Method Summary collapse

Methods inherited from AbstractAsyncTask

#cancel, #cancel!, #combined_tasks, #done?, #external_task, #humanized_state, #new_or_existing_objects, #pulp_tasks, #rescue_external_task, #run, #task_groups

Methods inherited from Abstract

#smart_proxy

Instance Method Details

#invoke_external_taskObject



11
12
13
14
15
# File 'app/lib/actions/pulp3/repository/copy_version.rb', line 11

def invoke_external_task
  source = ::Katello::Repository.find(input[:source_repository_id])
  target = ::Katello::Repository.find(input[:target_repository_id] || input[:target_repository])
  output[:pulp_tasks] = target.backend_service(smart_proxy).copy_version(source)
end

#plan(source_repository, smart_proxy, target_repository) ⇒ Object



5
6
7
8
9
# File 'app/lib/actions/pulp3/repository/copy_version.rb', line 5

def plan(source_repository, smart_proxy, target_repository)
  plan_self(:source_repository_id => source_repository.id,
            :target_repository_id => target_repository.id,
            :smart_proxy_id => smart_proxy.id)
end