Class: Actions::Katello::Product::ReindexSubscriptions

Inherits:
EntryAction
  • Object
show all
Defined in:
app/lib/actions/katello/product/reindex_subscriptions.rb

Instance Method Summary collapse

Instance Method Details

#finalizeObject



18
19
20
21
# File 'app/lib/actions/katello/product/reindex_subscriptions.rb', line 18

def finalize
  product = ::Katello::Product.find_by!(:id => input[:id])
  product.import_subscription(input[:subscription_id])
end

#plan(product, subscription_id) ⇒ Object



12
13
14
15
16
# File 'app/lib/actions/katello/product/reindex_subscriptions.rb', line 12

def plan(product, subscription_id)
  fail "Only custom products supported." if product.redhat?
  Type! product, ::Katello::Product
  plan_self(id: product.id, subscription_id: subscription_id)
end