Sha256: 841fc399644b5b65acf7c720d6aff184ec7a6987b2139d1eedc1a55a31ce9b41

Contents?: true

Size: 682 Bytes

Versions: 10

Compression:

Stored size: 682 Bytes

Contents

module Actions
  module Katello
    module Product
      class ReindexSubscriptions < Actions::EntryAction
        middleware.use Actions::Middleware::KeepCurrentUser

        input_format do
          param :id
          param :subscription_id
        end

        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

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
katello-3.5.2 app/lib/actions/katello/product/reindex_subscriptions.rb
katello-3.6.0 app/lib/actions/katello/product/reindex_subscriptions.rb
katello-3.6.0.1.rc2 app/lib/actions/katello/product/reindex_subscriptions.rb
katello-3.6.0.rc2 app/lib/actions/katello/product/reindex_subscriptions.rb
katello-3.6.0.rc1 app/lib/actions/katello/product/reindex_subscriptions.rb
katello-3.5.1.1 app/lib/actions/katello/product/reindex_subscriptions.rb
katello-3.5.1 app/lib/actions/katello/product/reindex_subscriptions.rb
katello-3.5.0.1 app/lib/actions/katello/product/reindex_subscriptions.rb
katello-3.5.0 app/lib/actions/katello/product/reindex_subscriptions.rb
katello-3.5.0.rc2 app/lib/actions/katello/product/reindex_subscriptions.rb