Class: Actions::Katello::Host::RemoveSubscriptions

Inherits:
EntryAction
  • Object
show all
Defined in:
app/lib/actions/katello/host/remove_subscriptions.rb

Instance Method Summary collapse

Instance Method Details

#humanized_nameObject



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_strategyObject



17
18
19
# File 'app/lib/actions/katello/host/remove_subscriptions.rb', line 17

def rescue_strategy
  Dynflow::Action::Rescue::Skip
end

#resource_locksObject



29
30
31
# File 'app/lib/actions/katello/host/remove_subscriptions.rb', line 29

def resource_locks
  :link
end