Class: Actions::Katello::Host::Erratum::ApplicableErrataInstall

Inherits:
EntryAction
  • Object
show all
Includes:
Helpers::Presenter
Defined in:
app/lib/actions/katello/host/erratum/applicable_errata_install.rb

Instance Method Summary collapse

Instance Method Details

#humanized_nameObject



15
16
17
18
19
20
21
# File 'app/lib/actions/katello/host/erratum/applicable_errata_install.rb', line 15

def humanized_name
  if input[:hostname]
    _("Install Applicable Errata")
  else
    _("Install Applicable Errata on %s") % input[:hostname]
  end
end

#plan(host, errata_ids) ⇒ Object

takes a list of errata and schedules the installation of those that are applicable



9
10
11
12
13
# File 'app/lib/actions/katello/host/erratum/applicable_errata_install.rb', line 9

def plan(host, errata_ids)
  applicable_errata = host.content_facet.applicable_errata.with_identifiers(errata_ids)
  plan_action(Actions::Katello::Host::Erratum::Install, host, applicable_errata.pluck(:errata_id))
  plan_self(:hostname => host.name)
end

#presenterObject



23
24
25
# File 'app/lib/actions/katello/host/erratum/applicable_errata_install.rb', line 23

def presenter
  Helpers::Presenter::Delegated.new(self, planned_actions(Katello::Host::Erratum::Install))
end