Sha256: 62113eb40e1a503b44ab24325cfef422b8be60aeff1742e3c0a0d9cb95848247

Contents?: true

Size: 924 Bytes

Versions: 75

Compression:

Stored size: 924 Bytes

Contents

module Actions
  module Katello
    module Host
      module Erratum
        class Install < Actions::Katello::AgentAction
          def self.agent_message
            :install_errata
          end

          def agent_action_type
            :content_install
          end

          def humanized_name
            if input.try(:[], :hostname)
              _("Install erratum for %s") % input[:hostname]
            else
              _("Install erratum")
            end
          end

          def humanized_input
            [input[:content].join(", ")] + super
          end

          def resource_locks
            :link
          end

          def finalize
            host = ::Host.find_by(:id => input[:host_id])
            host.update(audit_comment: (_("Installation of errata requested: %{errata}") % {errata: input[:content].join(", ")}).truncate(255))
          end
        end
      end
    end
  end
end

Version data entries

75 entries across 75 versions & 1 rubygems

Version Path
katello-4.9.2 app/lib/actions/katello/host/erratum/install.rb
katello-4.8.4 app/lib/actions/katello/host/erratum/install.rb
katello-4.9.1 app/lib/actions/katello/host/erratum/install.rb
katello-4.8.3 app/lib/actions/katello/host/erratum/install.rb
katello-4.9.0 app/lib/actions/katello/host/erratum/install.rb
katello-4.7.6 app/lib/actions/katello/host/erratum/install.rb
katello-4.8.2 app/lib/actions/katello/host/erratum/install.rb
katello-4.9.0.rc2 app/lib/actions/katello/host/erratum/install.rb
katello-4.9.0.rc1 app/lib/actions/katello/host/erratum/install.rb
katello-4.8.1 app/lib/actions/katello/host/erratum/install.rb
katello-4.7.5 app/lib/actions/katello/host/erratum/install.rb
katello-4.8.0 app/lib/actions/katello/host/erratum/install.rb
katello-4.8.0.rc2 app/lib/actions/katello/host/erratum/install.rb
katello-4.7.4 app/lib/actions/katello/host/erratum/install.rb
katello-4.8.0.rc1 app/lib/actions/katello/host/erratum/install.rb
katello-4.7.3 app/lib/actions/katello/host/erratum/install.rb
katello-4.7.2 app/lib/actions/katello/host/erratum/install.rb
katello-4.7.1 app/lib/actions/katello/host/erratum/install.rb
katello-4.6.2.1 app/lib/actions/katello/host/erratum/install.rb
katello-4.6.2 app/lib/actions/katello/host/erratum/install.rb