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

#plan(product) ⇒ Object



9
10
11
12
13
# File 'app/lib/actions/katello/product/reindex_subscriptions.rb', line 9

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

#runObject



15
16
17
18
# File 'app/lib/actions/katello/product/reindex_subscriptions.rb', line 15

def run
  product = ::Katello::Product.find_by!(:id => input[:id])
  product.import_custom_subscription
end