Class: Actions::Pulp3::Repository::RemoveUnits
Instance Method Summary
collapse
#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_task ⇒ Object
11
12
13
14
15
16
17
18
19
|
# File 'app/lib/actions/pulp3/repository/remove_units.rb', line 11
def invoke_external_task
repo = ::Katello::Repository.find(input[:repository_id])
content_unit_ids = input[:options][:contents]
content_type = ::Katello::RepositoryTypeManager.find_content_type(input[:options][:content_unit_type].downcase)
units = content_type.model_class.where(:id => content_unit_ids)
output[:pulp_tasks] = repo.backend_service(smart_proxy).remove_content(units)
end
|
#plan(repository, smart_proxy, options) ⇒ Object
5
6
7
8
9
|
# File 'app/lib/actions/pulp3/repository/remove_units.rb', line 5
def plan(repository, smart_proxy, options)
plan_self(repository_id: repository.id,
smart_proxy_id: smart_proxy.id,
options: options)
end
|