Sha256: d0d216ff9a6c9eb5986092c2ce5887a3d988e8f204b39645dd3f9a43f9c8c98a
Contents?: true
Size: 783 Bytes
Versions: 10
Compression:
Stored size: 783 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) plan_action(::Actions::Pulp::Repository::EnsureSyncNotification) 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
10 entries across 10 versions & 1 rubygems