Class: Actions::Pulp3::CapsuleContent::GenerateMetadata
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
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'app/lib/actions/pulp3/capsule_content/generate_metadata.rb', line 18
def invoke_external_task
repository = ::Katello::Repository.find(input[:repository_id])
backend = repository.backend_service(smart_proxy).with_mirror_adapter
if repository.yum? && backend.publication_href.present?
[]
else
backend.create_publication
end
end
|
#plan(repository, smart_proxy, options = {}) ⇒ Object
6
7
8
9
10
11
12
13
14
15
16
|
# File 'app/lib/actions/pulp3/capsule_content/generate_metadata.rb', line 6
def plan(repository, smart_proxy, options = {})
options[:contents_changed] = (options && options.key?(:contents_changed)) ? options[:contents_changed] : true
sequence do
unless repository.repository_type.pulp3_skip_publication
plan_self(:repository_id => repository.id, :smart_proxy_id => smart_proxy.id,
:options => options).output
end
plan_action(RefreshDistribution, repository, smart_proxy,
:contents_changed => options[:contents_changed])
end
end
|