Class: Actions::Pulp3::CapsuleContent::VerifyChecksum

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



9
10
11
12
# File 'app/lib/actions/pulp3/capsule_content/verify_checksum.rb', line 9

def invoke_external_task
  repo = ::Katello::Repository.find(input[:repository_id])
  output[:pulp_tasks] = repo.backend_service(smart_proxy).with_mirror_adapter.repair
end

#plan(repository, smart_proxy) ⇒ Object



5
6
7
# File 'app/lib/actions/pulp3/capsule_content/verify_checksum.rb', line 5

def plan(repository, smart_proxy)
  plan_self(:repository_id => repository.id, :smart_proxy_id => smart_proxy.id)
end

#repos_to_repair(smart_proxy, environment, content_view, repository) ⇒ Object



14
15
16
17
18
19
20
21
22
# File 'app/lib/actions/pulp3/capsule_content/verify_checksum.rb', line 14

def repos_to_repair(smart_proxy, environment, content_view, repository)
  smart_proxy_helper = ::Katello::SmartProxyHelper.new(smart_proxy)
  smart_proxy_helper.lifecycle_environment_check(environment, repository)
  if repository
    [repository]
  else
    smart_proxy_helper.repositories_available_to_capsule(environment, content_view).by_rpm_count
  end
end