Sha256: 1df1347c9c0394db18f7d19d0e12bdd0a1526e3334f288334624023301f79633

Contents?: true

Size: 1.07 KB

Versions: 36

Compression:

Stored size: 1.07 KB

Contents

module Actions
  module Katello
    module AlternateContentSource
      class Create < Actions::EntryAction
        include Actions::Katello::AlternateContentSource::AlternateContentSourceCommon

        def plan(acs, smart_proxies, products = nil)
          acs.save!
          action_subject(acs)
          if products.present?
            acs.update!(products: products)
          end
          smart_proxies = smart_proxies.present? ? smart_proxies.uniq : []
          concurrence do
            smart_proxies.each do |smart_proxy|
              if acs.custom? || acs.rhui?
                smart_proxy_acs = ::Katello::SmartProxyAlternateContentSource.create(alternate_content_source_id: acs.id, smart_proxy_id: smart_proxy.id)
                plan_action(Pulp3::Orchestration::AlternateContentSource::Create, smart_proxy_acs)
              elsif acs.simplified?
                create_simplified_acs(acs, smart_proxy)
              end
            end
          end
        end

        def humanized_name
          _("Create Alternate Content Source")
        end
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
katello-4.14.2 app/lib/actions/katello/alternate_content_source/create.rb
katello-4.15.0 app/lib/actions/katello/alternate_content_source/create.rb
katello-4.15.0.rc2 app/lib/actions/katello/alternate_content_source/create.rb
katello-4.15.0.rc1 app/lib/actions/katello/alternate_content_source/create.rb
katello-4.14.1 app/lib/actions/katello/alternate_content_source/create.rb
katello-4.14.0 app/lib/actions/katello/alternate_content_source/create.rb
katello-4.14.0.rc3 app/lib/actions/katello/alternate_content_source/create.rb
katello-4.14.0.rc2 app/lib/actions/katello/alternate_content_source/create.rb
katello-4.14.0.rc1.1 app/lib/actions/katello/alternate_content_source/create.rb
katello-4.14.0.rc1 app/lib/actions/katello/alternate_content_source/create.rb
katello-4.13.1 app/lib/actions/katello/alternate_content_source/create.rb
katello-4.13.0 app/lib/actions/katello/alternate_content_source/create.rb
katello-4.12.1 app/lib/actions/katello/alternate_content_source/create.rb
katello-4.13.0.rc1 app/lib/actions/katello/alternate_content_source/create.rb
katello-4.12.0 app/lib/actions/katello/alternate_content_source/create.rb
katello-4.12.0.rc3 app/lib/actions/katello/alternate_content_source/create.rb
katello-4.12.0.rc2 app/lib/actions/katello/alternate_content_source/create.rb
katello-4.12.0.rc1 app/lib/actions/katello/alternate_content_source/create.rb
katello-4.11.1 app/lib/actions/katello/alternate_content_source/create.rb
katello-4.11.0 app/lib/actions/katello/alternate_content_source/create.rb