Class: Katello::ContentViewPackageGroupFilter

Inherits:
ContentViewFilter show all
Defined in:
app/models/katello/content_view_package_group_filter.rb

Constant Summary collapse

CONTENT_TYPE =
PackageGroup::CONTENT_TYPE

Constants inherited from ContentViewFilter

Katello::ContentViewFilter::CONTENT_OPTIONS, Katello::ContentViewFilter::CONTENT_TYPES, Katello::ContentViewFilter::ERRATA, Katello::ContentViewFilter::PACKAGE_GROUP, Katello::ContentViewFilter::RPM

Instance Method Summary collapse

Methods inherited from ContentViewFilter

applicable, #applicable_repos, #as_json, class_for, #content_type, create_for, #filter_type, #original_packages=, #params_format, #resulting_products, rule_class_for, rule_ids_for, #validate_content_view, #validate_filter_repos, yum

Methods inherited from Model

#destroy!

Instance Method Details

#generate_clauses(_repo) ⇒ Object



9
10
11
12
# File 'app/models/katello/content_view_package_group_filter.rb', line 9

def generate_clauses(_repo)
  package_group_ids = package_group_rules.reject { |rule| rule.uuid.blank? }.flat_map.map(&:uuid)
  { "_id" => { "$in" => package_group_ids } } unless package_group_ids.empty?
end