Sha256: aadd3e6197a65e83ad905895d42f4f49df5bce6ed739349094231c8a691174a9

Contents?: true

Size: 1.11 KB

Versions: 19

Compression:

Stored size: 1.11 KB

Contents

module Katello
  module Util
    module PulpcoreContentFilters
      def filter_distribution_trees_by_pulp_hrefs(distributiontree_results, _content_pulp_hrefs)
        distributiontree_results.collect { |result| result.pulp_href }.flatten.uniq
      end

      def filter_package_groups_by_pulp_href(package_groups, package_pulp_hrefs)
        rpms = Katello::Rpm.where(:pulp_id => package_pulp_hrefs)
        package_groups.reject do |package_group|
          (package_group.package_names - rpms.pluck(:name)).any?
        end
      end

      def filter_package_environments_by_pulp_hrefs(packageenvironment_results, package_pulp_hrefs)
        matching_package_env_groups = []

        packageenvironment_results.each do |result|
          if (result.packagegroups & package_pulp_hrefs).any?
            matching_package_env_groups << result.pulp_href
          end
        end

        matching_package_env_groups.flatten.uniq
      end

      def filter_metadatafiles_by_pulp_hrefs(metadatafiles_results, _package_pulp_hrefs)
        metadatafiles_results.collect { |result| result.pulp_href }.flatten.uniq
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
katello-4.1.4 app/lib/katello/util/pulpcore_content_filters.rb
katello-3.18.5 app/lib/katello/util/pulpcore_content_filters.rb
katello-4.2.0.1.rc2 app/lib/katello/util/pulpcore_content_filters.rb
katello-4.2.0.rc2 app/lib/katello/util/pulpcore_content_filters.rb
katello-4.1.3 app/lib/katello/util/pulpcore_content_filters.rb
katello-4.2.0.rc1 app/lib/katello/util/pulpcore_content_filters.rb
katello-4.1.2.1 app/lib/katello/util/pulpcore_content_filters.rb
katello-4.1.2 app/lib/katello/util/pulpcore_content_filters.rb
katello-3.18.4 app/lib/katello/util/pulpcore_content_filters.rb
katello-4.1.1 app/lib/katello/util/pulpcore_content_filters.rb
katello-4.1.0 app/lib/katello/util/pulpcore_content_filters.rb
katello-3.18.3.1 app/lib/katello/util/pulpcore_content_filters.rb
katello-4.1.0.rc2.2 app/lib/katello/util/pulpcore_content_filters.rb
katello-4.1.0.rc2.1 app/lib/katello/util/pulpcore_content_filters.rb
katello-3.18.3 app/lib/katello/util/pulpcore_content_filters.rb
katello-4.1.0.rc2 app/lib/katello/util/pulpcore_content_filters.rb
katello-4.1.0.rc1.1 app/lib/katello/util/pulpcore_content_filters.rb
katello-4.1.0.rc1 app/lib/katello/util/pulpcore_content_filters.rb
katello-3.18.2.1 app/lib/katello/util/pulpcore_content_filters.rb