Sha256: 77a51024af5cf8e97a46ed3ebeb316d4f29f0f43cf42edba5860ecfecb54aec4

Contents?: true

Size: 641 Bytes

Versions: 67

Compression:

Stored size: 641 Bytes

Contents

module Actions
  module Katello
    module SyncPlan
      class RemoveProducts < Actions::EntryAction
        def plan(sync_plan, product_ids)
          action_subject(sync_plan)

          products = ::Katello::Product.where(:id => product_ids).editable
          sync_plan.product_ids = (sync_plan.product_ids - products.collect { |p| p.id }).uniq
          sync_plan.save!

          products.each do |product|
            plan_action(::Actions::Katello::Product::Update, product, :sync_plan_id => nil)
          end
        end

        def humanized_name
          _("Update Sync Plan Products")
        end
      end
    end
  end
end

Version data entries

67 entries across 67 versions & 1 rubygems

Version Path
katello-3.8.1 app/lib/actions/katello/sync_plan/remove_products.rb
katello-3.7.1.1 app/lib/actions/katello/sync_plan/remove_products.rb
katello-3.7.1 app/lib/actions/katello/sync_plan/remove_products.rb
katello-3.8.0 app/lib/actions/katello/sync_plan/remove_products.rb
katello-3.8.0.rc3 app/lib/actions/katello/sync_plan/remove_products.rb
katello-3.8.0.rc2 app/lib/actions/katello/sync_plan/remove_products.rb
katello-3.7.0 app/lib/actions/katello/sync_plan/remove_products.rb
katello-3.8.0.rc1 app/lib/actions/katello/sync_plan/remove_products.rb
katello-3.7.0.rc2 app/lib/actions/katello/sync_plan/remove_products.rb
katello-3.7.0.rc1 app/lib/actions/katello/sync_plan/remove_products.rb
katello-3.5.2 app/lib/actions/katello/sync_plan/remove_products.rb
katello-3.6.0 app/lib/actions/katello/sync_plan/remove_products.rb
katello-3.6.0.1.rc2 app/lib/actions/katello/sync_plan/remove_products.rb
katello-3.6.0.rc2 app/lib/actions/katello/sync_plan/remove_products.rb
katello-3.6.0.rc1 app/lib/actions/katello/sync_plan/remove_products.rb
katello-3.5.1.1 app/lib/actions/katello/sync_plan/remove_products.rb
katello-3.5.1 app/lib/actions/katello/sync_plan/remove_products.rb
katello-3.5.0.1 app/lib/actions/katello/sync_plan/remove_products.rb
katello-3.5.0 app/lib/actions/katello/sync_plan/remove_products.rb
katello-3.5.0.rc2 app/lib/actions/katello/sync_plan/remove_products.rb