Class: Actions::Katello::Host::RemoveSubscriptions
- Inherits:
-
EntryAction
- Object
- EntryAction
- Actions::Katello::Host::RemoveSubscriptions
- Defined in:
- app/lib/actions/katello/host/remove_subscriptions.rb
Instance Method Summary collapse
- #humanized_name ⇒ Object
- #plan(host, entitlements) ⇒ Object
- #rescue_strategy ⇒ Object
- #resource_locks ⇒ Object
Instance Method Details
#humanized_name ⇒ Object
21 22 23 24 25 26 27 |
# File 'app/lib/actions/katello/host/remove_subscriptions.rb', line 21 def humanized_name if input.try(:[], :host_name) _('Remove subscriptions from %s') % (input[:host_name] || _('Unknown')) else _('Remove subscriptions') end end |
#plan(host, entitlements) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'app/lib/actions/katello/host/remove_subscriptions.rb', line 7 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']) plan_self(:host_name => host.name) end end |
#rescue_strategy ⇒ Object
17 18 19 |
# File 'app/lib/actions/katello/host/remove_subscriptions.rb', line 17 def rescue_strategy Dynflow::Action::Rescue::Skip end |
#resource_locks ⇒ Object
29 30 31 |
# File 'app/lib/actions/katello/host/remove_subscriptions.rb', line 29 def resource_locks :link end |