Class: Actions::Pulp3::Repository::ReclaimSpace

Inherits:
AbstractAsyncTask show all
Defined in:
app/lib/actions/pulp3/repository/reclaim_space.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
# File 'app/lib/actions/pulp3/repository/reclaim_space.rb', line 11

def invoke_external_task
  output[:pulp_tasks] = ::Katello::Pulp3::Api::Core.new(SmartProxy.find(input[:smart_proxy_id])).
    repositories_reclaim_space_api.reclaim(repo_hrefs: input[:repository_hrefs])
end

#plan(repo, smart_proxy = SmartProxy.pulp_primary) ⇒ Object



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

def plan(repo, smart_proxy = SmartProxy.pulp_primary)
  action_subject(repo)
  repository_hrefs = ::Katello::Pulp3::RepositoryReference.default_cv_repository_hrefs([repo], repo.organization)
  plan_self(repository_hrefs: repository_hrefs, smart_proxy_id: smart_proxy.id)
end