Sha256: bb9de8937c45859abac359f3a49969b9f01c4154a2456023c3aceef77204197a
Contents?: true
Size: 765 Bytes
Versions: 28
Compression:
Stored size: 765 Bytes
Contents
module Actions module Katello module SyncPlan class AddProducts < Actions::EntryAction middleware.use Actions::Middleware::PulpServicesCheck def plan(sync_plan, product_ids) action_subject(sync_plan) ::Katello::Repository.ensure_sync_notification 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 => sync_plan.id) end end def humanized_name _("Add Sync Plan Products") end end end end end
Version data entries
28 entries across 28 versions & 1 rubygems