Sha256: 8a07be948ae817a20fa4cff8b185f5f7fb3b7eaa4dc38aa44dd6ea63d745b4cf

Contents?: true

Size: 871 Bytes

Versions: 75

Compression:

Stored size: 871 Bytes

Contents

module Actions
  module Katello
    module Host
      module Package
        class Install < Actions::Katello::AgentAction
          def self.agent_message
            :install_package
          end

          def agent_action_type
            :content_install
          end

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

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

          def finalize
            host = ::Host.find_by(:id => input[:host_id])
            host.update(audit_comment: (_("Installation of package(s) requested: %{packages}") % {packages: 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.7.0 app/lib/actions/katello/host/package/install.rb
katello-4.6.1 app/lib/actions/katello/host/package/install.rb
katello-4.7.0.rc2 app/lib/actions/katello/host/package/install.rb
katello-4.7.0.rc1 app/lib/actions/katello/host/package/install.rb
katello-4.4.2.2 app/lib/actions/katello/host/package/install.rb
katello-4.4.2.1 app/lib/actions/katello/host/package/install.rb
katello-4.4.2 app/lib/actions/katello/host/package/install.rb
katello-4.5.1 app/lib/actions/katello/host/package/install.rb
katello-4.6.0 app/lib/actions/katello/host/package/install.rb
katello-4.6.0.rc2 app/lib/actions/katello/host/package/install.rb
katello-4.6.0.rc1 app/lib/actions/katello/host/package/install.rb
katello-4.5.0 app/lib/actions/katello/host/package/install.rb
katello-4.5.0.rc2 app/lib/actions/katello/host/package/install.rb
katello-4.4.1 app/lib/actions/katello/host/package/install.rb
katello-4.5.0.rc1 app/lib/actions/katello/host/package/install.rb
katello-4.4.0.2 app/lib/actions/katello/host/package/install.rb
katello-4.4.0.1 app/lib/actions/katello/host/package/install.rb
katello-4.3.1 app/lib/actions/katello/host/package/install.rb
katello-4.4.0 app/lib/actions/katello/host/package/install.rb
katello-4.4.0.rc2 app/lib/actions/katello/host/package/install.rb