Class: Actions::Pulp3::Repository::UpdateRemote

Inherits:
AbstractAsyncTask show all
Defined in:
app/lib/actions/pulp3/repository/update_remote.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



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

def invoke_external_task
  repo = ::Katello::Repository.find(input[:repository_id])
  repo.backend_service(smart_proxy).update_remote
end

#plan(repository, smart_proxy) ⇒ Object



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

def plan(repository, smart_proxy)
  if repository.root.url
    repository.backend_service(smart_proxy).create_test_remote if smart_proxy.pulp_primary?
    plan_self(:repository_id => repository.id, :smart_proxy_id => smart_proxy.id)
  end
end