Module: Actions::Katello::AlternateContentSource::AlternateContentSourceCommon

Included in:
Create, Update
Defined in:
app/lib/actions/katello/alternate_content_source/alternate_content_source_common.rb

Instance Method Summary collapse

Instance Method Details

#create_simplified_acs(acs, smart_proxy) ⇒ Object



5
6
7
8
9
10
11
12
# File 'app/lib/actions/katello/alternate_content_source/alternate_content_source_common.rb', line 5

def create_simplified_acs(acs, smart_proxy)
  acs.products.each do |product|
    product.repositories.has_url.library.with_type(acs.content_type).each do |repo|
      smart_proxy_acs = ::Katello::SmartProxyAlternateContentSource.create(alternate_content_source_id: acs.id, smart_proxy_id: smart_proxy.id, repository_id: repo.id)
      plan_action(Pulp3::Orchestration::AlternateContentSource::Create, smart_proxy_acs)
    end
  end
end