Sha256: e6fad23944b85b418735b07c372d66af8fc460254e6eaa11b0c20c512d2deb66
Contents?: true
Size: 963 Bytes
Versions: 4
Compression:
Stored size: 963 Bytes
Contents
module Actions module Katello module Host class RemoveSubscriptions < Actions::EntryAction middleware.use Actions::Middleware::KeepCurrentUser def plan(host, entitlements) action_subject(host) entitlements.each do |entitlement| plan_action(::Actions::Candlepin::Consumer::RemoveSubscription, :uuid => host.subscription_facet.uuid, :entitlement_id => entitlement['id'], :pool_id => entitlement['pool']['id']) plan_self(:host_name => host.name) end end def rescue_strategy Dynflow::Action::Rescue::Skip end def humanized_name if input.try(:[], :host_name) _('Remove subscriptions from %s') % (input[:host_name] || _('Unknown')) else _('Remove subscriptions') end end def resource_locks :link end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems