Sha256: 6fd8e1fc90d602d6f39910d3a7e67a9561dec1758cdc021d750837b76294d4f8

Contents?: true

Size: 985 Bytes

Versions: 84

Compression:

Stored size: 985 Bytes

Contents

module Actions
  module Katello
    module Host
      module Erratum
        class ApplicableErrataInstall < Actions::EntryAction
          include Helpers::Presenter

          #takes a list of errata and schedules the installation of those that are applicable
          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

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

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

Version data entries

84 entries across 84 versions & 1 rubygems

Version Path
katello-3.15.0.rc1.1 app/lib/actions/katello/host/erratum/applicable_errata_install.rb
katello-3.15.0.rc1 app/lib/actions/katello/host/erratum/applicable_errata_install.rb
katello-3.14.1 app/lib/actions/katello/host/erratum/applicable_errata_install.rb
katello-3.13.4 app/lib/actions/katello/host/erratum/applicable_errata_install.rb
katello-3.14.0 app/lib/actions/katello/host/erratum/applicable_errata_install.rb
katello-3.13.3 app/lib/actions/katello/host/erratum/applicable_errata_install.rb
katello-3.14.0.rc2 app/lib/actions/katello/host/erratum/applicable_errata_install.rb
katello-3.13.2 app/lib/actions/katello/host/erratum/applicable_errata_install.rb
katello-3.14.0.rc1 app/lib/actions/katello/host/erratum/applicable_errata_install.rb
katello-3.13.1 app/lib/actions/katello/host/erratum/applicable_errata_install.rb
katello-3.13.0 app/lib/actions/katello/host/erratum/applicable_errata_install.rb
katello-3.13.0.rc2.1 app/lib/actions/katello/host/erratum/applicable_errata_install.rb
katello-3.13.0.rc2 app/lib/actions/katello/host/erratum/applicable_errata_install.rb
katello-3.12.3 app/lib/actions/katello/host/erratum/applicable_errata_install.rb
katello-3.12.2 app/lib/actions/katello/host/erratum/applicable_errata_install.rb
katello-3.13.0.rc1 app/lib/actions/katello/host/erratum/applicable_errata_install.rb
katello-3.12.1 app/lib/actions/katello/host/erratum/applicable_errata_install.rb
katello-3.11.2 app/lib/actions/katello/host/erratum/applicable_errata_install.rb
katello-3.10.2 app/lib/actions/katello/host/erratum/applicable_errata_install.rb
katello-3.12.0 app/lib/actions/katello/host/erratum/applicable_errata_install.rb