Sha256: 2801d6278e7e3b0f4fd63b4fb0237c0a2829164d7a6e22734f169eaf6183037b

Contents?: true

Size: 591 Bytes

Versions: 75

Compression:

Stored size: 591 Bytes

Contents

module Katello
  module Agent
    class RemovePackageMessage < BaseMessage
      def initialize(content:, consumer_id:)
        @packages = content
        @consumer_id = consumer_id
        @content_type = 'rpm'
        @method = 'uninstall'
      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.9.2 app/lib/katello/agent/remove_package_message.rb
katello-4.8.4 app/lib/katello/agent/remove_package_message.rb
katello-4.9.1 app/lib/katello/agent/remove_package_message.rb
katello-4.8.3 app/lib/katello/agent/remove_package_message.rb
katello-4.9.0 app/lib/katello/agent/remove_package_message.rb
katello-4.7.6 app/lib/katello/agent/remove_package_message.rb
katello-4.8.2 app/lib/katello/agent/remove_package_message.rb
katello-4.9.0.rc2 app/lib/katello/agent/remove_package_message.rb
katello-4.9.0.rc1 app/lib/katello/agent/remove_package_message.rb
katello-4.8.1 app/lib/katello/agent/remove_package_message.rb
katello-4.7.5 app/lib/katello/agent/remove_package_message.rb
katello-4.8.0 app/lib/katello/agent/remove_package_message.rb
katello-4.8.0.rc2 app/lib/katello/agent/remove_package_message.rb
katello-4.7.4 app/lib/katello/agent/remove_package_message.rb
katello-4.8.0.rc1 app/lib/katello/agent/remove_package_message.rb
katello-4.7.3 app/lib/katello/agent/remove_package_message.rb
katello-4.7.2 app/lib/katello/agent/remove_package_message.rb
katello-4.7.1 app/lib/katello/agent/remove_package_message.rb
katello-4.6.2.1 app/lib/katello/agent/remove_package_message.rb
katello-4.6.2 app/lib/katello/agent/remove_package_message.rb