Sha256: 8d0a027185f492a89aecbed28b5b318f41d1af16bd70537d6abc6202f5618251

Contents?: true

Size: 590 Bytes

Versions: 75

Compression:

Stored size: 590 Bytes

Contents

module Katello
  module Agent
    class InstallPackageMessage < BaseMessage
      def initialize(content:, consumer_id:)
        @packages = content
        @consumer_id = consumer_id
        @content_type = 'rpm'
        @method = 'install'
      end

      protected

      def units
        @packages.map do |package|
          nvra = ::Katello::Util::Package.parse_nvrea_nvre(package)
          unit_key = nvra || {
            name: package
          }

          {
            type_id: @content_type,
            unit_key: unit_key
          }
        end
      end
    end
  end
end

Version data entries

75 entries across 75 versions & 1 rubygems

Version Path
katello-4.4.0.rc1 app/lib/katello/agent/install_package_message.rb
katello-4.2.2 app/lib/katello/agent/install_package_message.rb
katello-4.3.0 app/lib/katello/agent/install_package_message.rb
katello-4.3.0.rc4 app/lib/katello/agent/install_package_message.rb
katello-4.3.0.rc3 app/lib/katello/agent/install_package_message.rb
katello-4.3.0.rc2.1 app/lib/katello/agent/install_package_message.rb
katello-4.3.0.rc2 app/lib/katello/agent/install_package_message.rb
katello-4.3.0.rc1 app/lib/katello/agent/install_package_message.rb
katello-4.2.1 app/lib/katello/agent/install_package_message.rb
katello-4.2.0.1 app/lib/katello/agent/install_package_message.rb
katello-4.1.4 app/lib/katello/agent/install_package_message.rb
katello-4.0.3 app/lib/katello/agent/install_package_message.rb
katello-4.2.0.1.rc3 app/lib/katello/agent/install_package_message.rb
katello-4.2.0.1.rc2 app/lib/katello/agent/install_package_message.rb
katello-4.2.0.rc2 app/lib/katello/agent/install_package_message.rb
katello-4.1.3 app/lib/katello/agent/install_package_message.rb
katello-4.2.0.rc1 app/lib/katello/agent/install_package_message.rb
katello-4.0.2.1 app/lib/katello/agent/install_package_message.rb
katello-4.1.2.1 app/lib/katello/agent/install_package_message.rb
katello-4.0.2 app/lib/katello/agent/install_package_message.rb