Sha256: e7b4b7ff204dd9471574e69787d2b414eaaae1c8bcb813ecf922a159b6fdb2f6

Contents?: true

Size: 856 Bytes

Versions: 35

Compression:

Stored size: 856 Bytes

Contents

module Katello
  class PackageGroup < Katello::Model
    include Concerns::PulpDatabaseUnit

    CONTENT_TYPE = "package_group".freeze
    has_many :roots, :through => :repositories, :class_name => "Katello::RootRepository"

    scoped_search :on => :name, :complete_value => true
    scoped_search :on => :pulp_id, :rename => :id, :complete_value => true

    def repository
      self.repositories.first
    end

    def package_names
      service_class = SmartProxy.pulp_primary!.content_service(CONTENT_TYPE)
      group = service_class.new(self.pulp_id)
      group.default_package_names + group.conditional_package_names + group.optional_package_names + group.mandatory_package_names
    end

    def content_view_filters
      Katello::ContentViewPackageGroupFilterRule.where(uuid: self.pulp_id).eager_load(:filter).map(&:filter)
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
katello-4.15.0.rc2 app/models/katello/package_group.rb
katello-4.15.0.rc1 app/models/katello/package_group.rb
katello-4.14.1 app/models/katello/package_group.rb
katello-4.14.0 app/models/katello/package_group.rb
katello-4.14.0.rc3 app/models/katello/package_group.rb
katello-4.14.0.rc2 app/models/katello/package_group.rb
katello-4.14.0.rc1.1 app/models/katello/package_group.rb
katello-4.14.0.rc1 app/models/katello/package_group.rb
katello-4.13.1 app/models/katello/package_group.rb
katello-4.13.0 app/models/katello/package_group.rb
katello-4.12.1 app/models/katello/package_group.rb
katello-4.13.0.rc1 app/models/katello/package_group.rb
katello-4.12.0 app/models/katello/package_group.rb
katello-4.12.0.rc3 app/models/katello/package_group.rb
katello-4.12.0.rc2 app/models/katello/package_group.rb
katello-4.12.0.rc1 app/models/katello/package_group.rb
katello-4.11.1 app/models/katello/package_group.rb
katello-4.11.0 app/models/katello/package_group.rb
katello-4.11.0.rc2 app/models/katello/package_group.rb
katello-4.11.0.rc1 app/models/katello/package_group.rb