Sha256: 1aa60bb8408dce981c5744b32e5346dac655f9fc54674d9592ca823f9f20f359

Contents?: true

Size: 818 Bytes

Versions: 14

Compression:

Stored size: 818 Bytes

Contents

module Actions
  module Katello
    module UpstreamSubscriptions
      class BindEntitlements < Actions::Base
        middleware.use Actions::Middleware::KeepCurrentTaxonomies

        def plan(pools = [])
          fail _("No pools were provided.") unless pools.any?
          fail _("Current organization is not set.") unless ::Organization.current
          input[:pools] = pools

          sequence do
            concurrence do
              pools.each do |pool|
                plan_action(Katello::UpstreamSubscriptions::BindEntitlement, pool)
              end
            end
            plan_action(Katello::Organization::ManifestRefresh, ::Organization.current)
          end
        end

        def humanized_name
          N_("Bind entitlements to an allocation")
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
katello-3.9.1 app/lib/actions/katello/upstream_subscriptions/bind_entitlements.rb
katello-3.9.0 app/lib/actions/katello/upstream_subscriptions/bind_entitlements.rb
katello-3.8.1 app/lib/actions/katello/upstream_subscriptions/bind_entitlements.rb
katello-3.9.0.rc2 app/lib/actions/katello/upstream_subscriptions/bind_entitlements.rb
katello-3.9.0.rc1 app/lib/actions/katello/upstream_subscriptions/bind_entitlements.rb
katello-3.7.1.1 app/lib/actions/katello/upstream_subscriptions/bind_entitlements.rb
katello-3.7.1 app/lib/actions/katello/upstream_subscriptions/bind_entitlements.rb
katello-3.8.0 app/lib/actions/katello/upstream_subscriptions/bind_entitlements.rb
katello-3.8.0.rc3 app/lib/actions/katello/upstream_subscriptions/bind_entitlements.rb
katello-3.8.0.rc2 app/lib/actions/katello/upstream_subscriptions/bind_entitlements.rb
katello-3.7.0 app/lib/actions/katello/upstream_subscriptions/bind_entitlements.rb
katello-3.8.0.rc1 app/lib/actions/katello/upstream_subscriptions/bind_entitlements.rb
katello-3.7.0.rc2 app/lib/actions/katello/upstream_subscriptions/bind_entitlements.rb
katello-3.7.0.rc1 app/lib/actions/katello/upstream_subscriptions/bind_entitlements.rb