Sha256: 851520174763d93947f936080baa90a43e1b0dda46d951d1f4fa4414ce97c04b

Contents?: true

Size: 940 Bytes

Versions: 64

Compression:

Stored size: 940 Bytes

Contents

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

    self.table_name = 'katello_ansible_collections'
    CONTENT_TYPE = 'ansible collection'.freeze

    has_many :ansible_collection_tags, :class_name => "Katello::AnsibleCollectionTag", :dependent => :delete_all
    has_many :tags, :through => :ansible_collection_tags

    scoped_search :on => :name, :complete_value => true
    scoped_search :on => :namespace, :complete_value => true, :rename => :author
    scoped_search :on => :version, :complete_value => true
    scoped_search :on => :checksum, :complete_value => true
    scoped_search :on => :name, :complete_value => true, :relation => :tags, :rename => :tag

    def self.default_sort
      order(:name)
    end

    def self.unit_id_field
      'ansible_collection_id'
    end

    def self.total_for_repositories(repos)
      self.in_repositories(repos).count
    end
  end
end

Version data entries

64 entries across 64 versions & 1 rubygems

Version Path
katello-4.2.2 app/models/katello/ansible_collection.rb
katello-4.2.1 app/models/katello/ansible_collection.rb
katello-4.2.0.1 app/models/katello/ansible_collection.rb
katello-4.1.4 app/models/katello/ansible_collection.rb
katello-4.0.3 app/models/katello/ansible_collection.rb
katello-4.2.0.1.rc3 app/models/katello/ansible_collection.rb
katello-3.18.5 app/models/katello/ansible_collection.rb
katello-4.2.0.1.rc2 app/models/katello/ansible_collection.rb
katello-4.2.0.rc2 app/models/katello/ansible_collection.rb
katello-4.1.3 app/models/katello/ansible_collection.rb
katello-4.2.0.rc1 app/models/katello/ansible_collection.rb
katello-4.0.2.1 app/models/katello/ansible_collection.rb
katello-4.1.2.1 app/models/katello/ansible_collection.rb
katello-4.0.2 app/models/katello/ansible_collection.rb
katello-4.1.2 app/models/katello/ansible_collection.rb
katello-3.18.4 app/models/katello/ansible_collection.rb
katello-4.1.1 app/models/katello/ansible_collection.rb
katello-4.1.0 app/models/katello/ansible_collection.rb
katello-4.0.1.2 app/models/katello/ansible_collection.rb
katello-3.18.3.1 app/models/katello/ansible_collection.rb